nlib
nn::nlib::binary_writer Namespace Reference

Defines functions that are used to write user-defined classes with the BinaryWriter class. More...

Functions

template<class T >
bool Write (BinaryWriter *w, T x)
 You can write user-defined class objects by specializing this function template. More...
 
template<class T >
bool WriteArray (BinaryWriter *w, const T *x, size_t n)
 You can write user-defined class objects by specializing this function template. More...
 

Detailed Description

Defines functions that are used to write user-defined classes with the BinaryWriter class.

Function Documentation

§ Write()

template<class T >
nn::nlib::binary_writer::Write ( BinaryWriter w,
x 
)
inline

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

Template Parameters
TThe element type.
Parameters
[in]wThe pointer to BinaryWriter.
[in,out]xThe object to write.
Returns
Returns true when successful.
Examples:
msgpack/usertype/usertype.cpp.

Definition at line 116 of file BinaryWriter.h.

§ WriteArray()

template<class T >
nn::nlib::binary_writer::WriteArray ( BinaryWriter w,
const T *  x,
size_t  n 
)
inline

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

Template Parameters
TThe element type.
Parameters
[in]wThe pointer to BinaryWriter.
[in,out]xThe pointer to the object array to write.
[in]nSize of the array.
Returns
Returns true when successful.

Definition at line 119 of file BinaryWriter.h.