cxxtools::PropertiesOObject< ObjectType > Class Template Reference

Wrapper object to easily print serializable objects as properties to a output stream. More...

#include <cxxtools/properties.h>

Inheritance diagram for cxxtools::PropertiesOObject< ObjectType >:
cxxtools::PropertiesIOObject< ObjectType >

Public Member Functions

 PropertiesOObject (const ObjectType &object, bool outputSize=true)
PropertiesOObjectoutputSize (bool sw)
bool outputSize () const
const ObjectType & object () const

Detailed Description

template<typename ObjectType>
class cxxtools::PropertiesOObject< ObjectType >

Wrapper object to easily print serializable objects as properties to a output stream.

PropertiesOObject is a little wrapper which makes it easy to output serializable objects into a ostream. For this the PropertiesOObject 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 properties format.


std::vector<unsigned> v;
std::cout << cxxtools::Properties(v) << std::endl;

Constructor & Destructor Documentation

template<typename ObjectType >
cxxtools::PropertiesOObject< ObjectType >::PropertiesOObject ( const ObjectType &  object,
bool  outputSize = true 


Needs the wrapped object. Optionally a flag can be passed whether the properties should be nicely formatted.

Member Function Documentation

template<typename ObjectType >
const ObjectType& cxxtools::PropertiesOObject< ObjectType >::object ( ) const
template<typename ObjectType >
PropertiesOObject& cxxtools::PropertiesOObject< ObjectType >::outputSize ( bool  sw)
template<typename ObjectType >
bool cxxtools::PropertiesOObject< ObjectType >::outputSize ( ) const

The documentation for this class was generated from the following file: