libmoost
moost::configurable::binding< T > Class Template Reference

binding wraps the reference to a value with persistable qualities More...

#include <binding.hpp>

Inheritance diagram for moost::configurable::binding< T >:
Collaboration diagram for moost::configurable::binding< T >:

List of all members.

Public Member Functions

 binding (T &value)
 binding (T &value, const T &default_value)
void read (std::istream &source)
 load state from source
void write (std::ostream &dest, int=0) const
 persist state to dest
void set_default ()
 if this object can be used without deserializing (otherwise throw)

Private Attributes

T & m_value
const bool m_has_default_value
const T m_default_value

Detailed Description

template<typename T>
class moost::configurable::binding< T >

binding wraps the reference to a value with persistable qualities

Definition at line 40 of file binding.hpp.


Constructor & Destructor Documentation

template<typename T >
moost::configurable::binding< T >::binding ( T &  value) [inline]

Definition at line 48 of file binding.hpp.

template<typename T >
moost::configurable::binding< T >::binding ( T &  value,
const T &  default_value 
) [inline]

Definition at line 53 of file binding.hpp.


Member Function Documentation

template<typename T >
void moost::configurable::binding< T >::read ( std::istream &  source) [inline, virtual]

load state from source

Implements moost::configurable::persistable.

Definition at line 58 of file binding.hpp.

template<typename T >
void moost::configurable::binding< T >::set_default ( ) [inline, virtual]

if this object can be used without deserializing (otherwise throw)

Implements moost::configurable::persistable.

Definition at line 65 of file binding.hpp.

template<typename T >
void moost::configurable::binding< T >::write ( std::ostream &  dest,
int  indent = 0 
) const [inline, virtual]

persist state to dest

Implements moost::configurable::persistable.

Definition at line 64 of file binding.hpp.


Member Data Documentation

template<typename T >
const T moost::configurable::binding< T >::m_default_value [private]

Definition at line 45 of file binding.hpp.

template<typename T >
const bool moost::configurable::binding< T >::m_has_default_value [private]

Definition at line 44 of file binding.hpp.

template<typename T >
T& moost::configurable::binding< T >::m_value [private]

Definition at line 43 of file binding.hpp.


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