RSB
0.7.0
|
Objects of this class are used to perform Converter selection via a chain-of-responsibility strategy. More...
#include <PredicateConverterList.h>
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. | |
ConverterPtr | getConverter (const std::string &key) const |
Tries to look up the converter designator by key. | |
std::string | getClassName () const |
void | printContents (std::ostream &stream) const |
Private Attributes | |
ConverterList | converters |
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.
Definition at line 98 of file PredicateConverterList.h.
typedef std::list< std::pair<ConverterPredicatePtr, ConverterPtr> > rsb::converter::PredicateConverterList< WireType >::ConverterList |
Definition at line 101 of file PredicateConverterList.h.
typedef ConverterSelectionStrategy<WireType>::ConverterPtr rsb::converter::PredicateConverterList< WireType >::ConverterPtr |
Definition at line 100 of file PredicateConverterList.h.
|
inline |
Construct a new PredicateConverterList object, initializing its Converter to the elements of the iterator range given by start and end.
begin | A ForwardIterator the value type of which is a std::pair of a ConverterPredicatePtr and a Converter<WireType>::Ptr. |
end | An associated end iterator. |
Definition at line 114 of file PredicateConverterList.h.
References rsb::converter::PredicateConverterList< WireType >::converters.
|
inline |
Definition at line 129 of file PredicateConverterList.h.
|
inlinevirtual |
Tries to look up the converter designator by key.
key | A wire-schema or data-type desinated the desired converter. |
rsc::runtime::NoSuchObject | If 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.
|
inline |
Definition at line 133 of file PredicateConverterList.h.
References rsb::converter::PredicateConverterList< WireType >::converters.
|
private |