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)
 Constructor.
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.

Example:

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

Constructor & Destructor Documentation

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

Constructor.

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
inline
template<typename ObjectType >
PropertiesOObject& cxxtools::PropertiesOObject< ObjectType >::outputSize ( bool  sw)
inline
template<typename ObjectType >
bool cxxtools::PropertiesOObject< ObjectType >::outputSize ( ) const
inline

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