Go to the previous, next section.
#include <nihcl/OIO.h>
Class
OIOout
is the abstract base class for classes implementing various formats of object output for the
storeOn()
function. It declares pure virtual member functions for writing the fundamental data types, arrays of fundamental data types, and C-style (null-terminated) character strings. It also declares pure virtual member functions for setting and accessing the output format precision and field width.
Since all output functions are virtual, derived classes can easily provide a variety of output formats to a variety of output destinations, such as C++ iostreams. This is a more flexible form of object I/O than the
file descriptor
object I/O provided by classes
OIOofd
and
OIOifd
, but is less efficient.
OIOout(unsigned
capacity
=256)
OIOout
with an initial object capacity of
capacity
objects (see class
StoreOnTbl
).
virtual OIOout& operator<<(const char*) = 0
OIOout
if successful.
virtual OIOout& operator<<(char) = 0
virtual OIOout& operator<<(unsigned char) = 0
virtual OIOout& operator<<(short) = 0
virtual OIOout& operator<<(unsigned short) = 0
virtual OIOout& operator<<(int) = 0
virtual OIOout& operator<<(unsigned int) = 0
virtual OIOout& operator<<(long) = 0
virtual OIOout& operator<<(unsigned long) = 0
virtual OIOout& operator<<(float) = 0
virtual OIOout& operator<<(double) = 0
OIOout
if successful.
virtual OIOout& put(char
val) = 0
OIOout
if successful.
virtual OIOout& put(const char*
val, unsigned
size) = 0
virtual OIOout& put(const unsigned char*
val, unsigned
size) = 0
virtual OIOout& put(const short*
val, unsigned
size) = 0
virtual OIOout& put(const unsigned short*
val, unsigned
size) = 0
virtual OIOout& put(const int*
val, unsigned
size) = 0
virtual OIOout& put(const unsigned int*
val, unsigned
size) = 0
virtual OIOout& put(const long*
val, unsigned
size) = 0
virtual OIOout& put(const unsigned long*
val, unsigned
size) = 0
virtual OIOout& put(const float*
val, unsigned
size) = 0
virtual OIOout& put(const double*
val, unsigned
size) = 0
OIOout
if successful.
virtual OIOout& putCString(const char*
s) = 0
OIOout
if successful.
virtual int precision(int
n) = 0
virtual int precision() = 0
virtual int width(int
n) = 0
virtual int width() = 0
void _storer(const Object&
ob) { ob.storer(*this); }
OIOout
by applying the virtual
storer()
function to it with this
OIOout
as the argument.
virtual void storeObject(const Object&
ob) = 0
OIOout
. Decides whether to store the object's class description or a reference to a previous class description. Decides whether to store the object itself, or a reference to a previously stored object.
Go to the previous, next section.