=default for generated implementation copy ctor
[ACE_TAO.git] / TAO / tao / PortableServer / Operation_Table.h
blob11d78518daadf1242663615c1cc31e09622afd84
1 // -*- C++ -*-
3 //=============================================================================
4 /**
5 * @file Operation_Table.h
7 * @author Aniruddha Gokhale
8 */
9 //=============================================================================
11 #ifndef TAO_OPTABLE_H
12 #define TAO_OPTABLE_H
14 #include /**/ "ace/pre.h"
16 #include "tao/PortableServer/portableserver_export.h"
18 #if !defined (ACE_LACKS_PRAGMA_ONCE)
19 # 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;
31 namespace TAO
33 namespace Portable_Server
35 class Servant_Upcall;
39 typedef void (*TAO_Skeleton)(
40 TAO_ServerRequest &,
41 TAO::Portable_Server::Servant_Upcall *,
42 TAO_ServantBase *);
44 typedef void (*TAO_Collocated_Skeleton)(
45 TAO_Abstract_ServantBase *,
46 TAO::Argument **);
48 /**
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
57 /// Operation name
58 char const * opname;
60 /// Remote/thru-POA skeleton pointer
61 TAO_Skeleton skel_ptr;
63 /// Collocated skeleton pointers.
64 TAO_Collocated_Skeleton direct_skel_ptr;
67 // --------------------------
69 namespace TAO
71 /**
72 * @class Operation_Skeleton_Ptr
74 * @brief A logical aggregation of all the operation skeleton pointers
75 * in use.
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;
93 /**
94 * @class TAO_Operation_Table
96 * @brief Abstract class for maintaining and lookup of CORBA IDL
97 * operation names.
99 class TAO_PortableServer_Export TAO_Operation_Table
101 public:
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
105 * on failure.
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 */