Revert "Minor modernization of DynamicAny code"
[ACE_TAO.git] / TAO / tao / PortableServer / Operation_Table_Binary_Search.h
blob741d3f4da1cbcb12ac55a13bf4d9a1033a23f028
1 // -*- C++ -*-
3 //=============================================================================
4 /**
5 * @file Operation_Table_Binary_Search.h
7 * @author Aniruddha Gokhale
8 */
9 //=============================================================================
11 #ifndef TAO_OPERATION_TABLE_BINARY_SEARCH_H
12 #define TAO_OPERATION_TABLE_BINARY_SEARCH_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/PortableServer/Operation_Table.h"
24 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
26 /**
27 * @class TAO_Binary_Search_OpTable
29 * @brief Helper class for using binary search operatin lookup strategy
30 * in the server skeletons.
32 * This class declares pure virtual method called 'lookup ()'
33 * which will be generated by the GPERF program. This method is
34 * used by 'bind ()' and 'find ()' methods. Subclasses will
35 * define the lookup method.
37 class TAO_PortableServer_Export TAO_Binary_Search_OpTable
38 : public TAO_Operation_Table
40 public:
41 /// Do nothing destructor.
42 ~TAO_Binary_Search_OpTable () override = default;
44 /// See the documentation in the base class for details.
45 int find (const char *opname,
46 TAO_Skeleton &skelfunc,
47 const unsigned int length = 0) override;
49 int find (const char *opname,
50 TAO_Collocated_Skeleton &skelfunc,
51 TAO::Collocation_Strategy s,
52 const unsigned int length = 0) override;
54 int bind (const char *opname,
55 const TAO::Operation_Skeletons skel_ptr) override;
57 private:
58 /// Method that should defined by the subclasses. GPERF program
59 /// will generate this routine routines.
60 virtual const TAO_operation_db_entry* lookup (const char *str) = 0;
63 TAO_END_VERSIONED_NAMESPACE_DECL
65 #include /**/ "ace/post.h"
66 #endif /* TAO_OPERATION_TABLE_BINARY_SEARCH_H */