Go to the documentation of this file.
82 #ifndef UOListStream_H
83 #define UOListStream_H
123 buf_(buffer, nbytes),
156 inline label
size()
const
164 buf_.pubseekpos(0, std::ios_base::out);
233 template<
int SizeMin>
258 #ifdef Foam_IOstream_extras
299 FixedList<char, N>& buffer,
308 template<
int SizeMin>
311 DynamicList<char,SizeMin>& buf,
const UList< char > list() const
Const UList access to the characters written (shallow copy).
std::streamsize capacity() const
The buffer capacity.
constexpr IOstreamOption(streamFormat fmt=streamFormat::ASCII, compressionType comp=compressionType::UNCOMPRESSED) noexcept
T * data() noexcept
Return pointer to the underlying array serving as data storage.
A 1D vector of objects of type <T> that resizes itself as necessary to accept the new objects.
stream_type stream_
The stream.
UList< char > list()
Non-const UList access to the characters written (shallow copy).
void printBufInfo(Ostream &os) const
streamFormat format() const noexcept
Get the current stream format.
static const versionNumber currentVersion
The current version number (2.0)
label capacity() const noexcept
Size of the underlying storage.
UOListStreamAllocator(char *buffer, size_t nbytes)
Construct for character array and number of bytes.
void setGood() noexcept
Set stream state to be good.
std::streamsize tellp() const
The buffer put position.
Representation of a major/minor version number.
An output streambuf for memory access.
An stream/stream-buffer allocator for external buffers.
OSstream(const OSstream &)=default
Copy construct.
The IOstreamOption is a simple container for options an IOstream can normally have.
Generic output stream using a standard (STL) stream.
versionNumber version() const noexcept
Get the stream version.
streamFormat
Data format (ascii | binary)
An OSstream attached to an unallocated external buffer.
T * data() noexcept
Return pointer to the underlying array serving as data storage.
OBJstream os(runTime.globalPath()/outputName)
virtual void rewind()
Rewind the stream, clearing any old errors.
const UList< char > list() const
Const UList access to the characters written (shallow copy).
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...
void rewind()
Move to buffer start, clear errors.
virtual void print(Ostream &os) const
Print stream description to Ostream.
void printBufInfo(Ostream &os) const
Some information about the output buffer position/capacity.
UOListStream(char *buffer, size_t nbytes, IOstreamOption streamOpt=IOstreamOption())
Construct using specified buffer and number of bytes.
void size(const label n)
Older name for setAddressableSize.
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
const Vector< label > N(dict.get< Vector< label >>("N"))
label capacity() const
The current list output capacity.
memorybuf::out buf_
The stream buffer.
Database for solution data, solver performance and other reduced data.