Changes to attempt to silence bcc64x
[ACE_TAO.git] / TAO / tao / PortableServer / Operation_Table_Perfect_Hash.h
blobc44a96f784b460095790e1ea4745b66be8b2583a
1 // -*- C++ -*-
3 //=============================================================================
4 /**
5 * @file Operation_Table_Perfect_Hash.h
7 * @author Aniruddha Gokhale
8 */
9 //=============================================================================
11 #ifndef TAO_OPERATION_TABLE_PERFECT_HASH_H
12 #define TAO_OPERATION_TABLE_PERFECT_HASH_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_Perfect_Hash_OpTable
29 * @brief Helper class for use of perfect hashing operation lookup
30 * strategy.
32 * This class declares pure virtual methods called 'lookup ()'
33 * and 'hash ()' which will be generated by the GPERF
34 * program. These methods are used by 'bind ()' and 'find ()'
35 * methods. Subclasses will define the lookup and hash
36 * functions.
38 class TAO_PortableServer_Export TAO_Perfect_Hash_OpTable
39 : public TAO_Operation_Table
41 public:
42 /// Do nothing destructor.
43 ~TAO_Perfect_Hash_OpTable () override = default;
45 /// See the documentation in the base class for details.
46 int find (const char *opname,
47 TAO_Skeleton &skelfunc,
48 const unsigned int length = 0) override;
50 int find (const char *opname,
51 TAO_Collocated_Skeleton &skelfunc,
52 TAO::Collocation_Strategy s,
53 const unsigned int length = 0) override;
55 int bind (const char *opname,
56 const TAO::Operation_Skeletons skel_ptr) override;
58 private:
59 // = Methods that should defined by the subclasses. GPERF program
60 // will generate these routines.
61 virtual unsigned int hash (const char *str, unsigned int len) = 0;
63 virtual const TAO_operation_db_entry* lookup (const char *str, unsigned int len) = 0;
66 TAO_END_VERSIONED_NAMESPACE_DECL
68 #include /**/ "ace/post.h"
69 #endif /* TAO_OPERATION_TABLE_PERFECT_HASH_H */