RSB  0.9.6
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
rsb::transport::ConnectorFactory< Interface > Class Template Reference

Objects of this class are specialized factories that construct Connector objects and provide introspection for connector implementations without instantiating them. More...

#include <Factory.h>

Inheritance diagram for rsb::transport::ConnectorFactory< Interface >:
Inheritance graph
Collaboration diagram for rsb::transport::ConnectorFactory< Interface >:
Collaboration graph

Classes

class  ConnectorInfo
 Instances of this class describe capabilities and properties of connector implementations. More...
 

Public Member Functions

 DEPRECATED (static ConnectorFactory< Interface > &getInstance())
 
 ConnectorFactory ()
 
ConnectorInfo getConnectorInfo (const std::string &name) const
 Return information regarding the connector implementation named name. More...
 
std::set< ConnectorInfogetConnectorInfos () const
 
void registerConnector (const std::string &name, const CreateFunction &constructor, const std::set< std::string > &schemas=std::set< std::string >(), bool remote=true, const std::set< std::string > &options=std::set< std::string >())
 For the connector implementation named name, register the construct function constructor, supported schemas schemas and recognized configuration options options. More...
 
void registerConnector (const std::string &name, const CreateFunction &constructor, const std::string &schema, bool remote=true, const std::set< std::string > &options=std::set< std::string >())
 

Private Types

typedef rsc::patterns::Factory
< std::string, Interface > 
Factory
 
typedef Factory::CreateFunction CreateFunction
 
typedef Factory::ImplMapProxy ImplMapProxy
 
typedef std::map< std::string,
ConnectorInfo
InfoMap
 

Private Member Functions

void printContents (std::ostream &stream) const
 

Static Private Member Functions

static ConnectorFactory
< Interface > & 
getInstanceBase ()
 

Private Attributes

rsc::logging::LoggerPtr logger
 
InfoMap infos
 

Friends

InPullFactorygetInPullFactory ()
 
InPushFactorygetInPushFactory ()
 
OutFactorygetOutFactory ()
 

Detailed Description

template<typename Interface>
class rsb::transport::ConnectorFactory< Interface >

Objects of this class are specialized factories that construct Connector objects and provide introspection for connector implementations without instantiating them.

Author
jmoringe

Definition at line 52 of file Factory.h.

Member Typedef Documentation

template<typename Interface >
typedef Factory::CreateFunction rsb::transport::ConnectorFactory< Interface >::CreateFunction
private

Definition at line 184 of file Factory.h.

template<typename Interface >
typedef rsc::patterns::Factory<std::string, Interface> rsb::transport::ConnectorFactory< Interface >::Factory
private

Definition at line 183 of file Factory.h.

template<typename Interface >
typedef Factory::ImplMapProxy rsb::transport::ConnectorFactory< Interface >::ImplMapProxy
private

Definition at line 185 of file Factory.h.

template<typename Interface >
typedef std::map<std::string, ConnectorInfo> rsb::transport::ConnectorFactory< Interface >::InfoMap
private

Definition at line 186 of file Factory.h.

Constructor & Destructor Documentation

template<typename Interface >
rsb::transport::ConnectorFactory< Interface >::ConnectorFactory ( )
inline

Definition at line 188 of file Factory.h.

Member Function Documentation

template<typename Interface >
rsb::transport::ConnectorFactory< Interface >::DEPRECATED ( static ConnectorFactory< Interface > &  getInstance())
Deprecated:
Singletons will be removed from RSB (see bug 1245). Please use one of the get*Factory functions in the rsb::transport namespace instead.
Todo:
Remove this after the 0.8 release.
template<typename Interface >
ConnectorInfo rsb::transport::ConnectorFactory< Interface >::getConnectorInfo ( const std::string &  name) const
inline

Return information regarding the connector implementation named name.

Parameters
nameName of the implementation for which information should be returned.
Returns
A ConnectorInfo object.
Exceptions
rsc::runtime::NoSuchObjectIf a record for name cannot be found.

Definition at line 201 of file Factory.h.

References rsb::transport::ConnectorFactory< Interface >::infos.

Referenced by rsb::transport::isRemote(), and rsb::transport::ConnectorFactory< Interface >::printContents().

Here is the caller graph for this function:

template<typename Interface >
std::set<ConnectorInfo> rsb::transport::ConnectorFactory< Interface >::getConnectorInfos ( ) const
inline

Definition at line 209 of file Factory.h.

References rsb::transport::ConnectorFactory< Interface >::infos.

Referenced by rsb::Factory::Factory().

Here is the caller graph for this function:

template<typename Interface >
static ConnectorFactory<Interface>& rsb::transport::ConnectorFactory< Interface >::getInstanceBase ( )
inlinestaticprivate

Definition at line 176 of file Factory.h.

Referenced by rsb::transport::getInPullFactory(), rsb::transport::getInPushFactory(), and rsb::transport::getOutFactory().

Here is the caller graph for this function:

template<typename Interface >
void rsb::transport::ConnectorFactory< Interface >::printContents ( std::ostream &  stream) const
inlineprivate

Definition at line 257 of file Factory.h.

References rsb::transport::ConnectorFactory< Interface >::getConnectorInfo().

Here is the call graph for this function:

template<typename Interface >
void rsb::transport::ConnectorFactory< Interface >::registerConnector ( const std::string &  name,
const CreateFunction constructor,
const std::set< std::string > &  schemas = std::set<std::string>(),
bool  remote = true,
const std::set< std::string > &  options = std::set<std::string>() 
)
inline

For the connector implementation named name, register the construct function constructor, supported schemas schemas and recognized configuration options options.

Parameters
nameName of the connector implementation.
constructorConstruct function.
schemasA list of strings designating schemas supported by the implementation.
optionsA list of strings describing configuration options recognized by the implementation.

Definition at line 231 of file Factory.h.

References rsb::transport::ConnectorFactory< Interface >::infos, and rsb::transport::ConnectorFactory< Interface >::logger.

Referenced by rsb::transport::ConnectorFactory< Interface >::registerConnector(), and rsb::transport::registerDefaultTransports().

Here is the caller graph for this function:

template<typename Interface >
void rsb::transport::ConnectorFactory< Interface >::registerConnector ( const std::string &  name,
const CreateFunction constructor,
const std::string &  schema,
bool  remote = true,
const std::set< std::string > &  options = std::set<std::string>() 
)
inline

Definition at line 246 of file Factory.h.

References rsb::transport::ConnectorFactory< Interface >::registerConnector().

Here is the call graph for this function:

Friends And Related Function Documentation

template<typename Interface >
InPullFactory& getInPullFactory ( )
friend

Definition at line 32 of file Factory.cpp.

template<typename Interface >
InPushFactory& getInPushFactory ( )
friend

Definition at line 36 of file Factory.cpp.

template<typename Interface >
OutFactory& getOutFactory ( )
friend

Definition at line 40 of file Factory.cpp.

Member Data Documentation

template<typename Interface >
rsc::logging::LoggerPtr rsb::transport::ConnectorFactory< Interface >::logger
private

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