39 #ifndef Foam_ISstream_H 40 #define Foam_ISstream_H 76 virtual bool readCompoundToken(
token& tok,
const word& compoundType);
79 void operator=(
const ISstream&) =
delete;
91 const string& streamName,
99 const string& streamName,
111 const string& streamName,
131 virtual const fileName&
name()
const override {
return name_; }
142 virtual const std::istream&
stdStream()
const {
return is_; }
145 virtual std::istream&
stdStream() {
return is_; }
151 virtual std::ios_base::fmtflags
flags()
const override 157 virtual std::ios_base::fmtflags
flags 159 std::ios_base::fmtflags
f 187 const bool stripComments =
true 207 inline std::streamsize
getLine(std::nullptr_t,
char delim =
'\n');
249 std::streamsize
count 259 virtual void rewind()
override;
**return False if stream exhausted before finding the comment end *bool seekCommentEnd_Cstyle()
Discard until end of C-style comment '.
virtual Istream & readRaw(char *data, std::streamsize count) override
Low-level raw binary read (without possible block delimiters). Reading into a null pointer behaves li...
A class for handling file names.
virtual void rewind() override
Rewind the stream so that it may be read again.
compressionType
Compression treatment (UNCOMPRESSED | COMPRESSED)
ISstream & putback(const char c)
Raw, low-level putback character function.
virtual const std::istream & stdStream() const
Const access to underlying std::istream.
void setState(std::ios_base::iostate state) noexcept
Set stream state.
ISstream(std::istream &is, const string &streamName, IOstreamOption streamOpt=IOstreamOption())
Construct wrapper around std::istream, set stream status.
virtual std::ios_base::fmtflags flags() const override
Return current stream flags.
An Istream is an abstract base class for all input systems (streams, files, token lists etc)...
A token holds an item read from Istream.
void syncState()
Set stream state to match that of the std::istream.
bool continueReadUntilRightBrace(std::string &str, const bool stripComments=true)
Raw, low-level get into a string. Continues reading after an initial left-brace until it finds the ma...
A simple container for options an IOstream can normally have.
constexpr IOstreamOption(streamFormat fmt=streamFormat::ASCII, compressionType comp=compressionType::UNCOMPRESSED) noexcept
Default construct (ASCII, UNCOMPRESSED, currentVersion) or construct with format, compression...
virtual bool endRawRead() override
End of low-level raw binary read.
unsigned int count(const UList< bool > &bools, const bool val=true)
Count number of 'true' entries.
virtual ~ISstream()=default
Destructor.
A class for handling words, derived from Foam::string.
int peek()
Raw, low-level peek function.
virtual bool beginRawRead() override
Start of low-level raw binary read.
virtual const fileName & name() const override
The name of the input serial stream. (eg, the name of the Fstream file name)
Representation of a major/minor version number.
An Ostream is an abstract base class for all output systems (streams, files, token lists...
ISstream & getLine(std::string &str, char delim='\n')
Raw, low-level getline (until delimiter) into a string.
OBJstream os(runTime.globalPath()/outputName)
virtual Istream & read(token &t) override
Return next token from stream.
Generic input stream using a standard (STL) stream.
const dimensionedScalar c
Speed of light in a vacuum.
streamFormat
Data format (ascii | binary)
virtual void print(Ostream &os) const override
Print stream description to Ostream.