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

This base class enables look up of suitable rsb::converter::Converter s in rsb::transport::Connector classes. More...

#include <ConverterSelectingConnector.h>

Collaboration diagram for rsb::transport::ConverterSelectingConnector< WireType >:
Collaboration graph

Public Types

typedef converter::Converter
< WireType >::Ptr 
ConverterPtr
typedef
converter::ConverterSelectionStrategy
< WireType >::Ptr 
ConverterSelectionStrategyPtr

Protected Member Functions

 ConverterSelectingConnector (ConverterSelectionStrategyPtr converters)
ConverterPtr getConverter (const std::string &key) const
 Try to find a suitable converter for key .

Private Attributes

rsc::logging::LoggerPtr logger
ConverterSelectionStrategyPtr converters

Detailed Description

template<typename WireType>
class rsb::transport::ConverterSelectingConnector< WireType >

This base class enables look up of suitable rsb::converter::Converter s in rsb::transport::Connector classes.

Author
jmoringe

Definition at line 47 of file ConverterSelectingConnector.h.

Member Typedef Documentation

template<typename WireType>
typedef converter::Converter<WireType>::Ptr rsb::transport::ConverterSelectingConnector< WireType >::ConverterPtr

Definition at line 49 of file ConverterSelectingConnector.h.

Definition at line 50 of file ConverterSelectingConnector.h.

Constructor & Destructor Documentation

template<typename WireType>
rsb::transport::ConverterSelectingConnector< WireType >::ConverterSelectingConnector ( ConverterSelectionStrategyPtr  converters)
inlineprotected

Definition at line 53 of file ConverterSelectingConnector.h.

Member Function Documentation

template<typename WireType>
ConverterPtr rsb::transport::ConverterSelectingConnector< WireType >::getConverter ( const std::string &  key) const
inlineprotected

Try to find a suitable converter for key .

It is considered a program error if no such converter can be found. The error condition can be avoided by:

  1. registering converters for all occuring wire-schemas or data-types
  2. registering a dummy converter that accepts but discard anything.
Parameters
keythe wire-schema or data-type of the converter being requested.
Returns
The requested converter.
Exceptions
rsc::runtime::NoSuchObjectIf no converter could be found for key.

Definition at line 71 of file ConverterSelectingConnector.h.

Referenced by rsb::spread::ReceiverTask::notifyHandler().

Here is the caller graph for this function:

Member Data Documentation

template<typename WireType>
rsc::logging::LoggerPtr rsb::transport::ConverterSelectingConnector< WireType >::logger
private

Definition at line 75 of file ConverterSelectingConnector.h.


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