xref: /aoo41x/main/cosv/source/service/std_outp.cxx (revision 59617ebc)
1 /**************************************************************
2  *
3  * Licensed to the Apache Software Foundation (ASF) under one
4  * or more contributor license agreements.  See the NOTICE file
5  * distributed with this work for additional information
6  * regarding copyright ownership.  The ASF licenses this file
7  * to you under the Apache License, Version 2.0 (the
8  * "License"); you may not use this file except in compliance
9  * with the License.  You may obtain a copy of the License at
10  *
11  *   http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing,
14  * software distributed under the License is distributed on an
15  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16  * KIND, either express or implied.  See the License for the
17  * specific language governing permissions and limitations
18  * under the License.
19  *
20  *************************************************************/
21 
22 
23 
24 #include <precomp.h>
25 #include <cosv/std_outp.hxx>
26 
27 // NOT FULLY DECLARED SERVICES
28 #include <stdlib.h>
29 
30 
31 namespace csv
32 {
33 
34 #ifdef CSV_NO_IOSTREAMS
35 redirect_out *  redirect_out::pStdOut_ = 0;
36 redirect_out *  redirect_out::pStdErr_ = 0;
37 #endif // defined(CSV_NO_IOSTREAMS)
38 
39 
40 void
Endl(ostream & io_rStream,bool,int *)41 Endl( ostream & io_rStream, bool /*bUseRedirect*/, int* )
42 {
43 #ifndef CSV_NO_IOSTREAMS
44 //    if (NOT bUseRedirect)
45         io_rStream << std::endl;
46 //    else
47 #endif
48 //        static_cast< redirect_out& >(io_rStream).re_endl();
49 }
50 
51 void
Flush(ostream & io_rStream,bool,int *)52 Flush( ostream & io_rStream, bool /*bUseRedirect*/, int* )
53 {
54 #ifndef CSV_NO_IOSTREAMS
55 //    if (NOT bUseRedirect)
56         io_rStream << std::flush;
57 //    else
58 #endif
59 //        static_cast< redirect_out& >(io_rStream).re_flush();
60 }
61 
62 void
PerformAssertion(const char * condition,const char * file,unsigned line)63 PerformAssertion(const char * condition, const char * file, unsigned line)
64 {
65 	Cout() << "assertion failed: "
66 		 << condition
67 		 << " in file: "
68 		 << file
69 		 << " at line: "
70 		 << line
71 		 << Endl;
72 
73 	exit(3);
74 }
75 
76 }   // namespace csv
77 
78