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

Objects this class store mappings of one of the followings forms. More...

#include <UnambiguousConverterMap.h>

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

Public Types

typedef
ConverterSelectionStrategy
< WireType >::ConverterPtr 
ConverterPtr
- Public Types inherited from rsb::converter::ConverterSelectionStrategy< WireType >
typedef Converter< WireType >::Ptr ConverterPtr
typedef boost::shared_ptr
< ConverterSelectionStrategy
< WireType > > 
Ptr

Public Member Functions

ConverterPtr getConverter (const std::string &key) const
 Tries to look up the converter designator by key.
void addConverter (const std::string &key, ConverterPtr converter)
 Stores converter in the map under the name key.

Private Types

typedef std::map< std::string,
ConverterPtr
ConverterMap

Private Member Functions

std::string getClassName () const
void printContents (std::ostream &stream) const

Private Attributes

ConverterMap converters

Detailed Description

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

Objects this class store mappings of one of the followings forms.

Author
jmoringe

Definition at line 52 of file UnambiguousConverterMap.h.

Member Typedef Documentation

template<typename WireType>
typedef std::map<std::string, ConverterPtr> rsb::converter::UnambiguousConverterMap< WireType >::ConverterMap
private

Definition at line 99 of file UnambiguousConverterMap.h.

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

Definition at line 54 of file UnambiguousConverterMap.h.

Member Function Documentation

template<typename WireType>
void rsb::converter::UnambiguousConverterMap< WireType >::addConverter ( const std::string &  key,
ConverterPtr  converter 
)
inline

Stores converter in the map under the name key.

Parameters
keyEither a wire-schema or a data-type depending on the context in which the map is used.
converterThe converter that should be added.
Exceptions
std::invalid_argumentIf there already is a converter for the name key.
Note
Converter::getDataType and Converter::getWireSchema are not considered in any way.

Definition at line 87 of file UnambiguousConverterMap.h.

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

Referenced by rsb::converter::Repository< WireType >::getConvertersForDeserialization(), and rsb::converter::Repository< WireType >::getConvertersForSerialization().

Here is the caller graph for this function:

template<typename WireType>
std::string rsb::converter::UnambiguousConverterMap< WireType >::getClassName ( ) const
inlineprivate

Definition at line 103 of file UnambiguousConverterMap.h.

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

Tries to look up the converter designator by key.

Parameters
keyA wire-schema or data-type designated 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 64 of file UnambiguousConverterMap.h.

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

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

Member Data Documentation


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