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

indexed_binder allows a variable number of configurables accessed by index. More...

#include <indexed_binder.hpp>

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

List of all members.

Public Member Functions

 indexed_binder ()
virtual ~indexed_binder ()
const T & operator[] (const size_t index) const
T & operator[] (const size_t index)
size_t size ()
void resize (size_t size)
void read (std::istream &source)
 load state from source
void write (std::ostream &dest, int indent=0) const
 persist state to dest
void set (const std::string &key, const std::string &value)
 set one key/value pair
void get (const std::string &key, std::string &value) const
 get one key/value pair
void list (std::vector< std::pair< std::string, std::string > > &items)
 get all key/value pairs
void set_default ()
 if this object can be used without deserializing (otherwise throw)

Private Attributes

std::vector< boost::shared_ptr
< configurable > > 
m_pconfigurables

Detailed Description

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

indexed_binder allows a variable number of configurables accessed by index.

Note that template parameter T must be of type configurable.

Definition at line 52 of file indexed_binder.hpp.


Constructor & Destructor Documentation

template<typename T>
moost::configurable::indexed_binder< T >::indexed_binder ( ) [inline]

Definition at line 60 of file indexed_binder.hpp.

template<typename T>
virtual moost::configurable::indexed_binder< T >::~indexed_binder ( ) [inline, virtual]

Definition at line 62 of file indexed_binder.hpp.


Member Function Documentation

template<typename T >
void moost::configurable::indexed_binder< T >::get ( const std::string &  key,
std::string &  value 
) const [virtual]

get one key/value pair

Implements moost::configurable::configurable.

Definition at line 217 of file indexed_binder.hpp.

template<typename T >
void moost::configurable::indexed_binder< T >::list ( std::vector< std::pair< std::string, std::string > > &  items) [virtual]

get all key/value pairs

Implements moost::configurable::configurable.

Definition at line 236 of file indexed_binder.hpp.

template<typename T>
const T& moost::configurable::indexed_binder< T >::operator[] ( const size_t  index) const [inline]

Definition at line 64 of file indexed_binder.hpp.

template<typename T>
T& moost::configurable::indexed_binder< T >::operator[] ( const size_t  index) [inline]

Definition at line 69 of file indexed_binder.hpp.

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

load state from source

Implements moost::configurable::persistable.

Definition at line 104 of file indexed_binder.hpp.

Here is the caller graph for this function:

template<typename T>
void moost::configurable::indexed_binder< T >::resize ( size_t  size) [inline]

Definition at line 79 of file indexed_binder.hpp.

template<typename T >
void moost::configurable::indexed_binder< T >::set ( const std::string &  key,
const std::string &  value 
) [virtual]

set one key/value pair

Implements moost::configurable::configurable.

Definition at line 197 of file indexed_binder.hpp.

template<typename T >
void moost::configurable::indexed_binder< T >::set_default ( ) [virtual]

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

Implements moost::configurable::persistable.

Definition at line 250 of file indexed_binder.hpp.

template<typename T>
size_t moost::configurable::indexed_binder< T >::size ( ) [inline]

Definition at line 74 of file indexed_binder.hpp.

Here is the caller graph for this function:

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

persist state to dest

Implements moost::configurable::persistable.

Definition at line 172 of file indexed_binder.hpp.

Here is the call graph for this function:


Member Data Documentation

template<typename T>
std::vector< boost::shared_ptr< configurable > > moost::configurable::indexed_binder< T >::m_pconfigurables [private]

Definition at line 56 of file indexed_binder.hpp.


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