TAO_Service_Context_Registry Class Reference

#include <Service_Context_Handler_Registry.h>

Collaboration diagram for TAO_Service_Context_Registry:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 ~TAO_Service_Context_Registry (void)
 Destructor.
int bind (IOP::ServiceId id, TAO_Service_Context_Handler *handler)
TAO_Service_Context_Handleroperator[] (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_typeiterator

Private Attributes

Table registry_

Detailed Description

Definition at line 34 of file Service_Context_Handler_Registry.h.


Member Typedef Documentation

Definition at line 64 of file Service_Context_Handler_Registry.h.

Definition at line 67 of file Service_Context_Handler_Registry.h.

Definition at line 63 of file Service_Context_Handler_Registry.h.

Definition at line 66 of file Service_Context_Handler_Registry.h.

Definition at line 62 of file Service_Context_Handler_Registry.h.

Definition at line 65 of file Service_Context_Handler_Registry.h.


Constructor & Destructor Documentation

TAO_Service_Context_Registry::~TAO_Service_Context_Registry ( void   ) 

Destructor.

Definition at line 58 of file Service_Context_Handler_Registry.cpp.

00059 {
00060   for (Table::iterator x = this->registry_.begin ();
00061        x != this->registry_.end ();
00062        ++x)
00063     {
00064       delete (*x).second;
00065     }
00066 }


Member Function Documentation

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.

00072 {
00073   value_type const value =
00074     std::make_pair (key_type (id), data_type (handler));
00075 
00076   std::pair<iterator, bool> result = this->registry_.insert (value);
00077 
00078   return (result.second ? 0 : 1);
00079 }

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.

00042 {
00043   int result = 0;
00044   for (Table::iterator x = this->registry_.begin ();
00045        x != this->registry_.end ();
00046        ++x)
00047     {
00048       if ((*x).second->generate_service_context (
00049         stub, transport, opdetails, spec, msg) == -1)
00050         {
00051           result = -1;
00052           }
00053     }
00054 
00055   return result;
00056 }

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.

00083 {
00084   return registry_[id];
00085 }

int TAO_Service_Context_Registry::process_service_contexts ( IOP::ServiceContextList &  sc,
TAO_Transport transport 
)

Member Data Documentation

Definition at line 69 of file Service_Context_Handler_Registry.h.


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Generated on Sun Nov 22 23:27:06 2009 for TAO by  doxygen 1.6.1