conexus logo

Conexus::Registry Class Reference

This class serves as a registy for named endpoints and endpoint servers. More...

#include <registry.h>

List of all members.

Public Types

typedef ConexusPointer< Registrypointer
typedef std::map< std::string,
Endpoint::pointer
NameEndpointMap
typedef std::map< std::string,
EndpointServer::pointer
NameEndpointServerMap

Public Member Functions

 Registry ()
 ~Registry ()
bool add (const std::string &name, Endpoint::pointer obj)
 Adds the endpoint obj to the registry.
bool add (const std::string &name, EndpointServer::pointer obj)
 Adds the endpoint server obj to the registry.
bool remove (const std::string &name)
 Removed the named obj from the registry.
bool remove (Endpoint::pointer obj)
bool remove (EndpointServer::pointer obj)
Object::pointer lookup (const std::string &name)
Endpoint::pointer lookup_endpoint (const std::string &name)
EndpointServer::pointer lookup_server (const std::string &name)
const NameEndpointMapendpoints ()
const NameEndpointServerMapservers ()
sigc::signal< void, const
std::string & > 
signal_added ()
sigc::signal< void, const
std::string & > 
signal_removed ()

Static Public Member Functions

static pointer create ()

Protected Attributes

NameEndpointMap m_name_endpoint
NameEndpointServerMap m_name_endpointserver
sigc::signal< void, const
std::string & > 
m_signal_added
sigc::signal< void, const
std::string & > 
m_signal_removed


Detailed Description

This class serves as a registy for named endpoints and endpoint servers.

Author:
Rick L Vinyard Jr <rvinyard@cs.nmsu.edu>

Member Typedef Documentation

typedef std::map<std::string, Endpoint::pointer> Conexus::Registry::NameEndpointMap

typedef ConexusPointer<Registry> Conexus::Registry::pointer


Constructor & Destructor Documentation

Conexus::Registry::Registry (  ) 

Referenced by create().

Conexus::Registry::~Registry (  ) 


Member Function Documentation

bool Conexus::Registry::add ( const std::string &  name,
EndpointServer::pointer  obj 
)

Adds the endpoint server obj to the registry.

The name must be unique for this registry.

Returns:
true if obj is successfully added, false otherwise

References m_name_endpoint, m_name_endpointserver, and m_signal_added.

bool Conexus::Registry::add ( const std::string &  name,
Endpoint::pointer  obj 
)

Adds the endpoint obj to the registry.

The name must be unique for this registry.

Returns:
true if obj is successfully added, false otherwise

References m_name_endpoint, m_name_endpointserver, and m_signal_added.

Referenced by Conexus::Factory::create_endpoint(), and Conexus::Factory::create_server().

Registry::pointer Conexus::Registry::create (  )  [static]

References Registry().

const Registry::NameEndpointMap & Conexus::Registry::endpoints (  ) 

References m_name_endpoint.

Object::pointer Conexus::Registry::lookup ( const std::string &  name  ) 

Endpoint::pointer Conexus::Registry::lookup_endpoint ( const std::string &  name  ) 

References m_name_endpoint.

EndpointServer::pointer Conexus::Registry::lookup_server ( const std::string &  name  ) 

References m_name_endpointserver.

bool Conexus::Registry::remove ( EndpointServer::pointer  obj  ) 

bool Conexus::Registry::remove ( Endpoint::pointer  obj  ) 

bool Conexus::Registry::remove ( const std::string &  name  ) 

Removed the named obj from the registry.

References m_name_endpoint, m_name_endpointserver, and m_signal_removed.

const Registry::NameEndpointServerMap & Conexus::Registry::servers (  ) 

References m_name_endpointserver.

sigc::signal< void, const std::string & > Conexus::Registry::signal_added (  ) 

References m_signal_added.

sigc::signal< void, const std::string & > Conexus::Registry::signal_removed (  ) 

References m_signal_removed.


Member Data Documentation

sigc::signal<void,const std::string&> Conexus::Registry::m_signal_added [protected]

Referenced by add(), and signal_added().

sigc::signal<void,const std::string&> Conexus::Registry::m_signal_removed [protected]

Referenced by remove(), and signal_removed().


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

Generated on Wed Jul 8 15:51:20 2009 for conexus by doxygen 1.5.8