RSB  0.9.6
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
rsb::converter::PredicateConverterList< WireType > Class Template Reference

Objects of this class are used to perform Converter selection via a chain-of-responsibility strategy. More...

#include <PredicateConverterList.h>

Inheritance diagram for rsb::converter::PredicateConverterList< WireType >:
Inheritance graph
Collaboration diagram for rsb::converter::PredicateConverterList< WireType >:
Collaboration graph

Public Types

typedef
ConverterSelectionStrategy
< WireType >::ConverterPtr 
ConverterPtr
 
typedef std::list< std::pair
< ConverterPredicatePtr,
ConverterPtr > > 
ConverterList
 
- Public Types inherited from rsb::converter::ConverterSelectionStrategy< WireType >
typedef Converter< WireType >::Ptr ConverterPtr
 
typedef boost::shared_ptr
< ConverterSelectionStrategy
< WireType > > 
Ptr
 

Public Member Functions

template<typename ForwardIterator >
 PredicateConverterList (ForwardIterator begin, ForwardIterator end)
 Construct a new PredicateConverterList object, initializing its Converter to the elements of the iterator range given by start and end. More...
 
ConverterPtr getConverter (const std::string &key) const
 Tries to look up the converter designator by key. More...
 
std::string getClassName () const
 
void printContents (std::ostream &stream) const
 

Private Attributes

ConverterList converters
 

Detailed Description

template<typename WireType>
class rsb::converter::PredicateConverterList< WireType >

Objects of this class are used to perform Converter selection via a chain-of-responsibility strategy.

A list of predicates and associated converters is maintained. Converter selection queries are processed by traversing the list and selected the first converter the associated predicate of which matches the query wire-schema or data-type.

Author
jmoringe

Definition at line 98 of file PredicateConverterList.h.

Member Typedef Documentation

template<typename WireType >
typedef std::list< std::pair<ConverterPredicatePtr, ConverterPtr> > rsb::converter::PredicateConverterList< WireType >::ConverterList

Definition at line 101 of file PredicateConverterList.h.

template<typename WireType >
typedef ConverterSelectionStrategy<WireType>::ConverterPtr rsb::converter::PredicateConverterList< WireType >::ConverterPtr

Definition at line 100 of file PredicateConverterList.h.

Constructor & Destructor Documentation

template<typename WireType >
template<typename ForwardIterator >
rsb::converter::PredicateConverterList< WireType >::PredicateConverterList ( ForwardIterator  begin,
ForwardIterator  end 
)
inline

Construct a new PredicateConverterList object, initializing its Converter to the elements of the iterator range given by start and end.

Parameters
beginA ForwardIterator the value type of which is a std::pair of a ConverterPredicatePtr and a Converter<WireType>::Ptr.
endAn associated end iterator.

Definition at line 114 of file PredicateConverterList.h.

References rsb::converter::PredicateConverterList< WireType >::converters.

Member Function Documentation

template<typename WireType >
std::string rsb::converter::PredicateConverterList< WireType >::getClassName ( ) const
inline

Definition at line 129 of file PredicateConverterList.h.

template<typename WireType >
ConverterPtr rsb::converter::PredicateConverterList< WireType >::getConverter ( const std::string &  key) const
inlinevirtual

Tries to look up the converter designator by key.

Parameters
keyA wire-schema or data-type desinated the desired converter.
Returns
A boost::shared_ptr holding the converter.
Exceptions
rsc::runtime::NoSuchObjectIf there is no converter fo key.

Implements rsb::converter::ConverterSelectionStrategy< WireType >.

Definition at line 119 of file PredicateConverterList.h.

References rsb::converter::PredicateConverterList< WireType >::converters.

template<typename WireType >
void rsb::converter::PredicateConverterList< WireType >::printContents ( std::ostream &  stream) const
inline

Member Data Documentation


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