Go to the documentation of this file.
64 #ifndef UIListStream_H
65 #define UIListStream_H
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,
309 const UList<char>& buf,
Similar to IStringStream but using an externally managed buffer for its input. This allows the input ...
memorybuf::in buf_
The stream buffer.
UIListStream(const char *buffer, size_t nbytes, IOstreamOption streamOpt=IOstreamOption())
Construct using specified buffer and number of bytes.
const T * cdata() const noexcept
Return pointer to the underlying array serving as data storage.
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).
constexpr IOstreamOption(streamFormat fmt=streamFormat::ASCII, compressionType comp=compressionType::UNCOMPRESSED) noexcept
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.
const UList< char > list() const
Const UList access to the input characters (shallow copy).
void setGood() noexcept
Set stream state to be good.
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)....
The IOstreamOption is a simple container for options an IOstream can normally have.
versionNumber version() const noexcept
Get the stream version.
streamFormat
Data format (ascii | binary)
OBJstream os(runTime.globalPath()/outputName)
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.
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>, where the size of the vector is known and can be used for subscri...
std::streampos pos() const
Return the current get position in the buffer.
label size() const
The list size.
void size(const label n)
Older name for setAddressableSize.
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
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).