xref: /AOO41X/main/cosv/source/service/csv_ostream.cxx (revision 2694e8342f8da7abb15ff7dcb61e2de5a28d6b30)
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 
38 ostream::~ostream() { }
39 
40 ostream & ostream::operator<<(
41                             const char *        i_s )   { *pData << i_s; return *this; }
42 ostream & ostream::operator<<(
43                             char                i_c )   { *pData << i_c; return *this; }
44 ostream & ostream::operator<<(
45                             unsigned char       i_c )   { *pData << i_c; return *this; }
46 ostream & ostream::operator<<(
47                             signed char         i_c )   { *pData << i_c; return *this; }
48 
49 ostream & ostream::operator<<(
50                             short               i_n )   { *pData << i_n; return *this; }
51 ostream & ostream::operator<<(
52                             unsigned short      i_n )   { *pData << i_n; return *this; }
53 ostream & ostream::operator<<(
54                             int                 i_n )   { *pData << i_n; return *this; }
55 ostream & ostream::operator<<(
56                             unsigned int        i_n )   { *pData << i_n; return *this; }
57 ostream & ostream::operator<<(
58                             long                i_n )   { *pData << i_n; return *this; }
59 ostream & ostream::operator<<(
60                             unsigned long       i_n )   { *pData << i_n; return *this; }
61 
62 ostream & ostream::operator<<(
63                             float               i_n )   { *pData << i_n; return *this; }
64 ostream & ostream::operator<<(
65                             double              i_n )   { *pData << i_n; return *this; }
66 
67 ostream &
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 
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