3 //=============================================================================
5 * @file Operation_Table.h
7 * @author Aniruddha Gokhale
9 //=============================================================================
14 #include /**/ "ace/pre.h"
16 #include "tao/PortableServer/portableserver_export.h"
18 #if !defined (ACE_LACKS_PRAGMA_ONCE)
20 #endif /* ACE_LACKS_PRAGMA_ONCE */
22 #include "tao/Object.h"
23 #include "tao/Collocation_Strategy.h"
25 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
27 class TAO_ServerRequest
;
28 class TAO_Abstract_ServantBase
;
29 class TAO_ServantBase
;
33 namespace Portable_Server
39 typedef void (*TAO_Skeleton
)(
41 TAO::Portable_Server::Servant_Upcall
*,
44 typedef void (*TAO_Collocated_Skeleton
)(
45 TAO_Abstract_ServantBase
*,
49 * @struct TAO_operation_db_entry
51 * @brief Define a table entry that holds an operation name and its
52 * corresponding skeleton. A table of such entries is used to
53 * initialize the different lookup strategies.
55 struct TAO_operation_db_entry
60 /// Remote/thru-POA skeleton pointer
61 TAO_Skeleton skel_ptr
;
63 /// Collocated skeleton pointers.
64 TAO_Collocated_Skeleton direct_skel_ptr
;
67 // --------------------------
72 * @class Operation_Skeleton_Ptr
74 * @brief A logical aggregation of all the operation skeleton pointers
77 * This is not used by the IDL compiler. This is used internally
78 * within different strategies.
80 struct TAO_PortableServer_Export Operation_Skeletons
82 Operation_Skeletons ();
84 /// Remote skeleton pointer
85 TAO_Skeleton skel_ptr
;
87 /// Collocated skeleton pointers.
88 TAO_Skeleton thruPOA_skel_ptr
;
89 TAO_Collocated_Skeleton direct_skel_ptr
;
94 * @class TAO_Operation_Table
96 * @brief Abstract class for maintaining and lookup of CORBA IDL
99 class TAO_PortableServer_Export TAO_Operation_Table
103 * Uses @a opname to look up the skeleton function and pass it back
104 * in @a skelfunc. Returns non-negative integer on success, or -1
107 virtual int find (const char *opname
,
108 TAO_Skeleton
&skelfunc
,
109 const unsigned int length
= 0) = 0;
112 * Uses @a opname to look up the collocated skeleton function and
113 * pass it back in @a skelfunc. Returns non-negative integer on
114 * success, or -1 on failure.
116 virtual int find (const char *opname
,
117 TAO_Collocated_Skeleton
&skelfunc
,
118 TAO::Collocation_Strategy s
,
119 const unsigned int length
= 0) = 0;
121 /// Associate the skeleton @a skel_ptr with an operation named
122 /// @a opname. Returns -1 on failure, 0 on success, 1 on duplicate.
123 virtual int bind (const char *opname
,
124 const TAO::Operation_Skeletons skel_ptr
) = 0;
126 virtual ~TAO_Operation_Table ();
129 TAO_END_VERSIONED_NAMESPACE_DECL
131 #include /**/ "ace/post.h"
132 #endif /* TAO_OPTABLE_H */