update credits
[LibreOffice.git] / include / cosv / csv_ostream.hxx
blob911fcb8c799e41f11255b8cd90ac400c10868943
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
20 #ifndef CSV_CSV_OSTREAM_HXX
21 #define CSV_CSV_OSTREAM_HXX
23 // USED SERVICES
24 // BASE CLASSES
25 // COMPONENTS
26 // PARAMETERS
30 #ifndef CSV_NO_IOSTREAMS
32 #include <iostream>
35 namespace csv
38 typedef std::ios ios;
39 typedef std::ostream ostream;
41 } // namespace csv
44 #else
46 #include <cosv/tpl/dyn.hxx>
48 namespace csv
51 class StreamStr;
53 class ios
55 public:
56 enum seek_dir
58 beg=0,
59 cur=1,
60 end=2
64 class ostream : public ios
66 public:
67 typedef ostream self;
69 virtual ~ostream();
71 self & operator<<(
72 const char * i_s );
73 self & operator<<(
74 char i_c );
75 self & operator<<(
76 unsigned char i_c );
77 self & operator<<(
78 signed char i_c );
80 self & operator<<(
81 short i_n );
82 self & operator<<(
83 unsigned short i_n );
84 self & operator<<(
85 int i_n );
86 self & operator<<(
87 unsigned int i_n );
88 self & operator<<(
89 long i_n );
90 self & operator<<(
91 unsigned long i_n );
93 self & operator<<(
94 float i_n );
95 self & operator<<(
96 double i_n );
98 self & seekp(
99 intt i_nOffset,
100 seek_dir i_eStart = ios::beg );
101 protected:
102 ostream(
103 uintt i_nStartSize );
104 const StreamStr & Data() const;
106 private:
107 Dyn<StreamStr> pData;
112 inline const StreamStr &
113 ostream::Data() const
114 { return *pData; }
117 } // namespace csv
120 #endif
125 #endif
127 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */