LOOS 4.1.0
The Lightweight Object Oriented Structural analysis library/toolkit
|
This class provides some facility for handling XDR data. More...
#include <xdr.hpp>
Public Types | |
typedef unsigned int | block_type |
Type (and hence size) of the external block. | |
Public Member Functions | |
XDRReader (std::istream *s) | |
Constructor determines need to convert data at instantiation. | |
std::istream * | get (void) |
Returns the stored istream pointer. | |
template<typename T > | |
uint | read (T *p) |
Read a single datum. | |
uint | read (double *p) |
template<typename T > | |
uint | read (T &t) |
template<typename T > | |
uint | read (T *ary, const uint n) |
Read an n-array of data. | |
uint | read (char *p, uint n) |
Read in an opaque array of n-bytes (same as xdr_opaque) | |
uint | read (boost::shared_ptr< char > &p) |
Same as xdr_string. | |
uint | read (std::string &s) |
This class provides some facility for handling XDR data.
The read and write functions use templates to read the appropriate raw data. Beware of unexpected type conversions... All functions also return a 0 for error, or a 1 for success (or the number of elements actually read/written).