#include <Service_Context_Handler_Registry.h>
Public Member Functions | |
~TAO_Service_Context_Registry (void) | |
Destructor. | |
int | bind (IOP::ServiceId id, TAO_Service_Context_Handler *handler) |
TAO_Service_Context_Handler * | operator[] (IOP::ServiceId id) |
int | process_service_contexts (IOP::ServiceContextList &sc, TAO_Transport &transport) |
int | generate_service_context (TAO_Stub *stub, TAO_Transport &transport, TAO_Operation_Details &opdetails, TAO_Target_Specification &spec, TAO_OutputCDR &msg) |
Private Types | |
typedef ACE_Array_Map < IOP::ServiceId, TAO_Service_Context_Handler * > | Table |
typedef Table::key_type | key_type |
typedef Table::data_type | data_type |
typedef Table::value_type | value_type |
typedef Table::size_type | size_type |
typedef value_type * | iterator |
Private Attributes | |
Table | registry_ |
Definition at line 34 of file Service_Context_Handler_Registry.h.
typedef Table::data_type TAO_Service_Context_Registry::data_type [private] |
Definition at line 64 of file Service_Context_Handler_Registry.h.
typedef value_type* TAO_Service_Context_Registry::iterator [private] |
Definition at line 67 of file Service_Context_Handler_Registry.h.
typedef Table::key_type TAO_Service_Context_Registry::key_type [private] |
Definition at line 63 of file Service_Context_Handler_Registry.h.
typedef Table::size_type TAO_Service_Context_Registry::size_type [private] |
Definition at line 66 of file Service_Context_Handler_Registry.h.
typedef ACE_Array_Map<IOP::ServiceId, TAO_Service_Context_Handler*> TAO_Service_Context_Registry::Table [private] |
Definition at line 62 of file Service_Context_Handler_Registry.h.
typedef Table::value_type TAO_Service_Context_Registry::value_type [private] |
Definition at line 65 of file Service_Context_Handler_Registry.h.
TAO_Service_Context_Registry::~TAO_Service_Context_Registry | ( | void | ) |
Destructor.
Definition at line 58 of file Service_Context_Handler_Registry.cpp.
{ for (Table::iterator x = this->registry_.begin (); x != this->registry_.end (); ++x) { delete (*x).second; } }
int TAO_Service_Context_Registry::bind | ( | IOP::ServiceId | id, | |
TAO_Service_Context_Handler * | handler | |||
) |
Bind a new entry in the registry
Definition at line 69 of file Service_Context_Handler_Registry.cpp.
{ value_type const value = std::make_pair (key_type (id), data_type (handler)); std::pair<iterator, bool> result = this->registry_.insert (value); return (result.second ? 0 : 1); }
int TAO_Service_Context_Registry::generate_service_context | ( | TAO_Stub * | stub, | |
TAO_Transport & | transport, | |||
TAO_Operation_Details & | opdetails, | |||
TAO_Target_Specification & | spec, | |||
TAO_OutputCDR & | msg | |||
) |
Definition at line 36 of file Service_Context_Handler_Registry.cpp.
{ int result = 0; for (Table::iterator x = this->registry_.begin (); x != this->registry_.end (); ++x) { if ((*x).second->generate_service_context ( stub, transport, opdetails, spec, msg) == -1) { result = -1; } } return result; }
TAO_Service_Context_Handler * TAO_Service_Context_Registry::operator[] | ( | IOP::ServiceId | id | ) |
Retrieve the entry related to id
Definition at line 82 of file Service_Context_Handler_Registry.cpp.
{ return registry_[id]; }
int TAO_Service_Context_Registry::process_service_contexts | ( | IOP::ServiceContextList & | sc, | |
TAO_Transport & | transport | |||
) |
Definition at line 15 of file Service_Context_Handler_Registry.cpp.
{ for (CORBA::ULong index = 0; index != sc.length (); ++index) { IOP::ServiceContext const & context = sc[index]; iterator handler_iter = this->registry_.find (context.context_id); if (handler_iter != registry_.end ()) { return handler_iter->second->process_service_context (transport, context); } } return 0; }
Table TAO_Service_Context_Registry::registry_ [private] |
Definition at line 69 of file Service_Context_Handler_Registry.h.