33 #include <boost/format.hpp>
35 #include <rsc/runtime/NoSuchObject.h>
36 #include <rsc/runtime/Printable.h>
51 template<
typename WireType>
65 typename ConverterMap::const_iterator it = this->
converters.find(key);
67 throw rsc::runtime::NoSuchObject(
70 "No converter for wire-schema or data-type `%1%'.\nAvailable converters: %2%")
90 throw std::invalid_argument(
93 "A converter is already stored for the key `%1%'")
96 this->
converters.insert(std::make_pair(key, converter));
104 return "UnambiguousConverterMap";
108 stream <<
"converters = " << this->
converters;
Converter< WireType >::Ptr ConverterPtr
ConverterPtr getConverter(const std::string &key) const
Tries to look up the converter designator by key.
Implementation of this interface perform mappings of one of the followings forms: ...
Objects this class store mappings of one of the followings forms.
ConverterSelectionStrategy< WireType >::ConverterPtr ConverterPtr
void printContents(std::ostream &stream) const
void addConverter(const std::string &key, ConverterPtr converter)
Stores converter in the map under the name key.
std::map< std::string, ConverterPtr > ConverterMap
std::string getClassName() const