nlib
nn::nlib::binary_reader Namespace Reference

Defines functions that are used to read to user-defined classes with the BinaryReader class. More...

Functions

template<class T >
bool Read (BinaryReader *r, T *x)
 You can read to user-defined class objects by specializing this function template. More...
 
template<class T >
bool ReadArray (BinaryReader *r, T *x, size_t n)
 You can read to user-defined class objects by specializing this function template. More...
 

Detailed Description

Defines functions that are used to read to user-defined classes with the BinaryReader class.

Function Documentation

template<class T >
nn::nlib::binary_reader::Read ( BinaryReader r,
T *  x 
)
inline

You can read to user-defined class objects by specializing this function template.

Template Parameters
TThe element type.
Parameters
[in]rThe pointer to BinaryReader.
[in,out]xThe pointer to the configured object.
Returns
Returns true when successful.
Examples:
msgpack/jsonrpc/server.cpp.

Definition at line 158 of file BinaryReader.h.

template<class T >
nn::nlib::binary_reader::ReadArray ( BinaryReader r,
T *  x,
size_t  n 
)
inline

You can read to user-defined class objects by specializing this function template.

Template Parameters
TThe element type.
Parameters
[in]rThe pointer to BinaryReader.
[in,out]xThe pointer to the configured object array.
[in]nSize of the array.
Returns
Returns true when successful.

Definition at line 161 of file BinaryReader.h.