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/csv_ostream.hxx>
26 
27 // NOT FULLY DECLARED SERVICES
28 
29 
30 #ifndef CSV_NO_IOSTREAMS
31 #else
32 
33 #include <cosv/streamstr.hxx>
34 
35 namespace csv
36 {
37 
~ostream()38 ostream::~ostream() { }
39 
operator <<(const char * i_s)40 ostream & ostream::operator<<(
41                             const char *        i_s )   { *pData << i_s; return *this; }
operator <<(char i_c)42 ostream & ostream::operator<<(
43                             char                i_c )   { *pData << i_c; return *this; }
operator <<(unsigned char i_c)44 ostream & ostream::operator<<(
45                             unsigned char       i_c )   { *pData << i_c; return *this; }
operator <<(signed char i_c)46 ostream & ostream::operator<<(
47                             signed char         i_c )   { *pData << i_c; return *this; }
48 
operator <<(short i_n)49 ostream & ostream::operator<<(
50                             short               i_n )   { *pData << i_n; return *this; }
operator <<(unsigned short i_n)51 ostream & ostream::operator<<(
52                             unsigned short      i_n )   { *pData << i_n; return *this; }
operator <<(int i_n)53 ostream & ostream::operator<<(
54                             int                 i_n )   { *pData << i_n; return *this; }
operator <<(unsigned int i_n)55 ostream & ostream::operator<<(
56                             unsigned int        i_n )   { *pData << i_n; return *this; }
operator <<(long i_n)57 ostream & ostream::operator<<(
58                             long                i_n )   { *pData << i_n; return *this; }
operator <<(unsigned long i_n)59 ostream & ostream::operator<<(
60                             unsigned long       i_n )   { *pData << i_n; return *this; }
61 
operator <<(float i_n)62 ostream & ostream::operator<<(
63                             float               i_n )   { *pData << i_n; return *this; }
operator <<(double i_n)64 ostream & ostream::operator<<(
65                             double              i_n )   { *pData << i_n; return *this; }
66 
67 ostream &
seekp(intt i_nOffset,seek_dir i_eStart)68 ostream::seekp( intt                i_nOffset,
69                 seek_dir            i_eStart )
70 {
71     pData->seekp(i_nOffset, csv::seek_dir(int(i_eStart)) );
72     return *this;
73 }
74 
ostream(uintt i_nStartSize)75 ostream::ostream( uintt i_nStartSize )
76     :   pData( new StreamStr(i_nStartSize) )
77 {
78 }
79 
80 
81 
82 }   // namespace csv
83 
84 #endif
85 
86 
87 
88 
89