Revert "Minor modernization of DynamicAny code"
[ACE_TAO.git] / TAO / tao / Service_Context_Handler_Registry.h
blob86277a13fd62a1a18f0dae6d0e18b4dd68681684
1 // -*- C++ -*-
3 // ===================================================================
4 /**
5 * @file Service_Context_Handler_Registry.h
7 * @author Johnny Willemsen <jwillemsen@remedy.nl>
8 */
9 // ===================================================================
11 #ifndef TAO_SERVICE_CONTEXT_HANDLER_REGISTRY_H
12 #define TAO_SERVICE_CONTEXT_HANDLER_REGISTRY_H
14 #include /**/ "ace/pre.h"
16 #include "tao/IOPC.h"
18 #if !defined (ACE_LACKS_PRAGMA_ONCE)
19 # pragma once
20 #endif /* ACE_LACKS_PRAGMA_ONCE */
22 #include "ace/Array_Map.h"
24 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
26 class TAO_Transport;
27 class TAO_Service_Context_Handler;
28 class TAO_Operation_Details;
29 class TAO_Target_Specification;
30 class TAO_Stub;
31 class TAO_ServerRequest;
33 class TAO_Export TAO_Service_Context_Registry
35 public:
36 /// Destructor
38 ~TAO_Service_Context_Registry ();
40 /**
41 * Bind a new entry in the registry
43 int bind (IOP::ServiceId id, TAO_Service_Context_Handler* handler);
45 /**
46 * Retrieve the entry related to @a id
48 TAO_Service_Context_Handler* operator[] (IOP::ServiceId id);
50 int process_service_contexts (
51 IOP::ServiceContextList &sc,
52 TAO_Transport &transport,
53 TAO_ServerRequest *request);
55 int generate_service_context (
56 TAO_Stub *stub,
57 TAO_Transport& transport,
58 TAO_Operation_Details &opdetails,
59 TAO_Target_Specification &spec,
60 TAO_OutputCDR &msg);
62 private:
63 typedef ACE_Array_Map<IOP::ServiceId,
64 TAO_Service_Context_Handler*> Table;
65 typedef Table::key_type key_type;
66 typedef Table::data_type data_type;
67 typedef Table::value_type value_type;
68 typedef Table::size_type size_type;
69 typedef value_type * iterator;
71 Table registry_;
74 TAO_END_VERSIONED_NAMESPACE_DECL
76 #include /**/ "ace/post.h"
78 #endif /* TAO_SERVICE_CONTEXT_HANDLER_REGISTRY_H */