cxxtools::bin::BinOObject< ObjectType > Class Template Reference

Wrapper object to easily print serializable objects in cxxtools binary format to a output stream. More...

#include <cxxtools/bin/bin.h>

Inheritance diagram for cxxtools::bin::BinOObject< ObjectType >:
cxxtools::bin::BinIOObject< ObjectType >

Public Member Functions

 BinOObject (const ObjectType &object)
 Constructor. Needs the wrapped object.
const ObjectType & object () const

Detailed Description

template<typename ObjectType>
class cxxtools::bin::BinOObject< ObjectType >

Wrapper object to easily print serializable objects in cxxtools binary format to a output stream.

BinOObject is a little wrapper which makes it easy to output serializable objects into s ostream. For this the BinOObject expects a reference to the wrapped object and has a output operator for a std::ostream, or actually a std::basic_ostream, which prints the object in cxxtools binary format.

Example:

std::vector<unsigned> v;
v.push_back(4);
v.push_back(17);
v.push_back(12);
std::cout << cxxtools::bin::Bin(v) << std::endl;

Constructor & Destructor Documentation

template<typename ObjectType >
cxxtools::bin::BinOObject< ObjectType >::BinOObject ( const ObjectType &  object)
inlineexplicit

Constructor. Needs the wrapped object.

Member Function Documentation

template<typename ObjectType >
const ObjectType& cxxtools::bin::BinOObject< ObjectType >::object ( ) const
inline

The documentation for this class was generated from the following file:
  • include/cxxtools/bin/bin.h