1 /*---------------------------------------------------------------------------*\
3 \\ / F ield | foam-extend: Open Source CFD
4 \\ / O peration | Version: 3.2
5 \\ / A nd | Web: http://www.foam-extend.org
6 \\/ M anipulation | For copyright notice see file Copyright
7 -------------------------------------------------------------------------------
9 This file is part of foam-extend.
11 foam-extend is free software: you can redistribute it and/or modify it
12 under the terms of the GNU General Public License as published by the
13 Free Software Foundation, either version 3 of the License, or (at your
14 option) any later version.
16 foam-extend is distributed in the hope that it will be useful, but
17 WITHOUT ANY WARRANTY; without even the implied warranty of
18 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
19 General Public License for more details.
21 You should have received a copy of the GNU General Public License
22 along with foam-extend. If not, see <http://www.gnu.org/licenses/>.
35 \*---------------------------------------------------------------------------*/
44 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
49 /*---------------------------------------------------------------------------*\
50 Class ISstream Declaration
51 \*---------------------------------------------------------------------------*/
63 // Private member functions
68 // Private Member Functions
70 //- Disallow default bitwise assignment
71 void operator=(const ISstream&);
76 // Protected member functions
78 //- Return the stream reference
84 //- Return the const stream reference
85 const istream& stream() const
95 //- Construct as wrapper around istream
100 streamFormat format = ASCII,
101 versionNumber version = currentVersion,
102 compressionType compression = UNCOMPRESSED
116 //- Return the name of the stream
117 // Useful for Fstream to return the filename
118 virtual const fileName& name() const
123 //- Return non-const access to the name of the stream
124 // Useful to alter the stream name
125 virtual fileName& name()
130 //- Return flags of output stream
131 virtual ios_base::fmtflags flags() const;
136 //- Raw, low-level get character function.
137 inline ISstream& get(char&);
139 //- Raw, low-level getline into a string function.
140 inline ISstream& getLine(string&);
142 //- Raw, low-level putback character function.
143 inline ISstream& putback(const char&);
145 //- Return next token from stream
146 virtual Istream& read(token&);
149 virtual Istream& read(char&);
152 virtual Istream& read(word&);
154 //- Read a string (including enclosing double-quotes).
155 // Backslashes are retained, except when escaping double-quotes
156 // and an embedded newline character.
157 virtual Istream& read(string&);
160 virtual Istream& read(label&);
162 //- Read a floatScalar
163 virtual Istream& read(floatScalar&);
165 //- Read a doubleScalar
166 virtual Istream& read(doubleScalar&);
168 //- Read a longDoubleScalar
169 virtual Istream& read(longDoubleScalar&);
171 //- Read binary block
172 virtual Istream& read(char*, std::streamsize);
174 //- Rewind and return the stream so that it may be read again
175 virtual Istream& rewind();
178 // Stream state functions
180 //- Set flags of output stream
181 virtual ios_base::fmtflags flags(const ios_base::fmtflags flags);
186 //- Print description of IOstream to Ostream
187 virtual void print(Ostream&) const;
191 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
193 } // End namespace Foam
195 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
197 #include "ISstreamI.H"
199 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
203 // ************************************************************************* //