85 virtual public std::ios,
99 inline void reset(
char *buffer,
size_t nbytes)
107 this->pubseekpos(0, std::ios_base::in);
141 buf_(buffer, nbytes),
149 inline void reset(
char* buffer,
size_t nbytes)
176 inline label
size()
const
182 std::streampos
tellg()
const
190 buf_.pubseekpos(0, std::ios_base::in);
251 std::streampos
pos()
const
279 #ifdef Foam_IOstream_extras
296 const UList<char>& buffer,
302 UIListStream(buffer.cdata(), nbytes, IOstreamOption(fmt, ver))
309 const UList<char>& buf,
An stream/stream-buffer input allocator for a externally allocated list.
void printBufInfo(Ostream &os) const
UList< char > list()
Non-const UList access to the input characters (shallow copy).
std::streampos tellg() const
Position of the get buffer.
const UList< char > list() const
Const UList access to the input characters (shallow copy).
memorybuf::in buf_
The stream buffer.
UIListStreamAllocator(char *buffer, size_t nbytes)
Construct for character array and number of bytes.
label size() const
The list size.
void reset(char *buffer, size_t nbytes)
Reset buffer pointers.
void rewind()
Move to buffer start, clear errors.
stream_type stream_
The stream.
Representation of a major/minor version number.
The IOstreamOption is a simple container for options an IOstream can normally have.
versionNumber version() const noexcept
Get the stream version.
constexpr IOstreamOption(streamFormat fmt=streamFormat::ASCII, compressionType comp=compressionType::UNCOMPRESSED) noexcept
streamFormat format() const noexcept
Get the current stream format.
streamFormat
Data format (ascii | binary)
static const versionNumber currentVersion
The current version number (2.0)
void setGood() noexcept
Set stream state to be good.
Generic input stream using a standard (STL) stream.
An Istream is an abstract base class for all input systems (streams, files, token lists etc)....
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
Similar to IStringStream but using an externally managed buffer for its input. This allows the input ...
UIListStream(const UList< char > &buffer, size_t nbytes, IOstreamOption streamOpt=IOstreamOption())
Construct using data area from a List and number of bytes.
Istream & operator()() const
A non-const reference to const Istream.
virtual void print(Ostream &os) const
Print stream description to Ostream.
UIListStream(const char *buffer, size_t nbytes, IOstreamOption streamOpt=IOstreamOption())
Construct using specified buffer and number of bytes.
std::streampos pos() const
Return the current get position in the buffer.
virtual void rewind()
Rewind the stream, clearing any old errors.
A 1D vector of objects of type <T>, where the size of the vector is known and can be used for subscri...
An input streambuf for memory access.
void printBufInfo(Ostream &os) const
Some information about the input buffer position/capacity.
void resetg(char *s, std::streamsize n)
Reset for character array (can be nullptr) and number of bytes.
const UList< char > list() const
Const UList access to the input characters (shallow copy).
std::streamsize capacity() const
The buffer capacity.
std::streamsize tellg() const
The buffer get position.
Similar to std::istringstream, but with an externally managed input buffer.
uiliststream(const char *buffer, size_t nbytes)
Construct for character array and number of bytes.
void reset(char *buffer, size_t nbytes)
Reset buffer pointers.
void rewind()
Rewind the stream, clearing any old errors.
OBJstream os(runTime.globalPath()/outputName)