Go to the documentation of this file.
64 #ifndef UIListStream_H
65 #define UIListStream_H
86 virtual public std::ios,
100 inline void reset(
char *buffer,
size_t nbytes)
108 this->pubseekpos(0, std::ios_base::in);
142 buf_(buffer, nbytes),
150 inline void reset(
char* buffer,
size_t nbytes)
177 inline label
size()
const
183 std::streampos
tellg()
const
191 buf_.pubseekpos(0, std::ios_base::in);
273 std::streampos
pos()
const
Similar to IStringStream but using an externally managed buffer for its input. This allows the input ...
memorybuf::in buf_
The stream buffer.
void printBufInfo(Ostream &os) const
Some information about the input buffer position/capacity.
const UList< char > list() const
Const UList access to the input characters (shallow copy).
const T * cdata() const noexcept
Return a const pointer to the first data element.
streamFormat format() const noexcept
Get the current stream format.
static const versionNumber currentVersion
The current version number (2.0)
std::streamsize capacity() const
The buffer capacity.
Generic input stream using a standard (STL) stream.
UIListStream(const char *buffer, size_t nbytes, streamFormat format=ASCII, versionNumber version=currentVersion, const Foam::string &name="input")
Construct using specified buffer and number of bytes.
const UList< char > list() const
Const UList access to the input characters (shallow copy).
A class for handling character strings derived from std::string.
virtual void rewind()
Rewind the stream, clearing any old errors.
An input streambuf for memory access.
An stream/stream-buffer input allocator for a externally allocated list.
Istream & operator()() const
A non-const reference to const Istream.
void rewind()
Rewind the stream, clearing any old errors.
std::streampos tellg() const
Position of the get buffer.
Representation of a major/minor version number.
void resetg(char *s, std::streamsize n)
Reset for character array (can be nullptr) and number of bytes.
An Istream is an abstract base class for all input systems (streams, files, token lists etc)....
virtual const fileName & name() const
Return the name of the stream.
versionNumber version() const noexcept
Get the stream version.
streamFormat
Data format (ascii | binary)
void reset(char *buffer, size_t nbytes)
Reset buffer pointers.
ISstream(std::istream &is, const string &streamName, IOstreamOption streamOpt=IOstreamOption())
Construct wrapper around std::istream, set stream status.
void reset(char *buffer, size_t nbytes)
Reset buffer pointers.
stream_type stream_
The stream.
std::streamsize tellg() const
The buffer get position.
uiliststream(const char *buffer, size_t nbytes)
Construct for character array and number of bytes.
Similar to std::istringstream, but with an externally managed input buffer.
void setGood()
Set stream to be good.
virtual void print(Ostream &os) const
Print stream description to Ostream.
UIListStreamAllocator(char *buffer, size_t nbytes)
Construct for character array and number of bytes.
A 1D vector of objects of type <T> with a fixed length <N>.
A 1D vector of objects of type <T>, where the size of the vector is known and can be used for subscri...
const T * cdata() const
Return a const pointer to the first data element.
std::streampos pos() const
Return the current get position in the buffer.
void size(const label n) noexcept
Override size to be inconsistent with allocated storage.
label size() const
The list size.
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
const Vector< label > N(dict.get< Vector< label >>("N"))
void rewind()
Move to buffer start, clear errors.
void printBufInfo(Ostream &os) const
UList< char > list()
Non-const UList access to the input characters (shallow copy).