RSB
0.7.0
|
Maintains a collection of converters for a specific wire format. More...
#include <Repository.h>
Public Types | |
typedef Converter< WireType >::Ptr | ConverterPtr |
typedef std::pair< std::string, std::string > | ConverterSignature |
WireSchema and DataType. | |
typedef std::map< std::string, std::string > | ConverterSelectionMap |
typedef boost::shared_ptr < Repository< WireType > > | Ptr |
Public Member Functions | |
Repository () | |
ConverterSelectionStrategy < WireType >::Ptr | getConvertersForSerialization (const ConverterSelectionMap &selection=ConverterSelectionMap()) const |
ConverterSelectionStrategy < WireType >::Ptr | getConvertersForDeserialization (const ConverterSelectionMap &selection=ConverterSelectionMap()) const |
void | registerConverter (ConverterPtr converter) |
Registers the given converter in the collection. | |
ConverterPtr | getConverter (const std::string &wireSchema, const std::string &dataType) const |
ConverterPtr | getConverter (const ConverterSignature &signature) const |
void | clear () |
Private Types | |
typedef std::map < ConverterSignature, ConverterPtr > | ConverterMap |
Private Member Functions | |
std::string | getClassName () const |
void | printContents (std::ostream &stream) const |
Private Attributes | |
rsc::logging::LoggerPtr | logger |
ConverterMap | converters |
Maintains a collection of converters for a specific wire format.
Each converter has a wire type describing the actual message that is written on the wire and a data type that indicates which data it can serialize on the wire.
WireType | the wire-type of the collected converters. |
Definition at line 59 of file Repository.h.
|
private |
Definition at line 203 of file Repository.h.
typedef Converter<WireType>::Ptr rsb::converter::Repository< WireType >::ConverterPtr |
Definition at line 61 of file Repository.h.
typedef std::map<std::string, std::string> rsb::converter::Repository< WireType >::ConverterSelectionMap |
Definition at line 66 of file Repository.h.
typedef std::pair<std::string, std::string> rsb::converter::Repository< WireType >::ConverterSignature |
WireSchema and DataType.
Definition at line 64 of file Repository.h.
typedef boost::shared_ptr<Repository<WireType> > rsb::converter::Repository< WireType >::Ptr |
Definition at line 200 of file Repository.h.
|
inline |
Definition at line 68 of file Repository.h.
|
inline |
Definition at line 196 of file Repository.h.
References rsb::converter::Repository< WireType >::converters.
|
inlineprivate |
Definition at line 208 of file Repository.h.
|
inline |
Definition at line 178 of file Repository.h.
References rsb::converter::Repository< WireType >::converters.
Referenced by rsb::converter::Repository< WireType >::getConverter().
|
inline |
Definition at line 192 of file Repository.h.
References rsb::converter::Repository< WireType >::getConverter().
|
inline |
Definition at line 114 of file Repository.h.
References rsb::converter::UnambiguousConverterMap< WireType >::addConverter(), rsb::converter::Repository< WireType >::converters, and rsb::converter::Repository< WireType >::logger.
|
inline |
Definition at line 72 of file Repository.h.
References rsb::converter::UnambiguousConverterMap< WireType >::addConverter(), rsb::converter::Repository< WireType >::converters, and rsb::converter::Repository< WireType >::logger.
|
inlineprivate |
Definition at line 212 of file Repository.h.
References rsb::converter::Repository< WireType >::converters.
|
inline |
Registers the given converter in the collection.
converter | the converter to register |
std::invalid_argument | if there is already a converter registered with the same wire type or data type |
Definition at line 163 of file Repository.h.
References rsb::converter::Repository< WireType >::converters.
|
private |
Definition at line 206 of file Repository.h.
Referenced by rsb::converter::Repository< WireType >::clear(), rsb::converter::Repository< WireType >::getConverter(), rsb::converter::Repository< WireType >::getConvertersForDeserialization(), rsb::converter::Repository< WireType >::getConvertersForSerialization(), rsb::converter::Repository< WireType >::printContents(), and rsb::converter::Repository< WireType >::registerConverter().
|
private |
Definition at line 205 of file Repository.h.
Referenced by rsb::converter::Repository< WireType >::getConvertersForDeserialization(), and rsb::converter::Repository< WireType >::getConvertersForSerialization().