Updated logging to include the class/method so that it is more obvious where these...
[ACE_TAO.git] / TAO / tao / PortableServer / Operation_Table_Dynamic_Hash.h
blobc2c421691f2b526e9b2a247745b4b89021546138
1 // -*- C++ -*-
3 //=============================================================================
4 /**
5 * @file Operation_Table_Dynamic_Hash.h
7 * @author Aniruddha Gokhale
8 */
9 //=============================================================================
11 #ifndef TAO_OPERATION_TABLE_DYNAMIC_HASH_H
12 #define TAO_OPERATION_TABLE_DYNAMIC_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"
23 #include "ace/Hash_Map_Manager.h"
24 #include "ace/Synch_Traits.h"
25 #include "ace/Null_Mutex.h"
27 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
29 /**
30 * @class TAO_Dynamic_Hash_OpTable
32 * @brief Dynamic Hashing scheme for CORBA IDL operation name lookup.
34 class TAO_PortableServer_Export TAO_Dynamic_Hash_OpTable
35 : public TAO_Operation_Table
37 public:
38 /**
39 * Initialize the dynamic hash operation table with a database of
40 * operation names. The hash table size may be different from the
41 * size of the database. Hence we use the third argument to specify
42 * the size of the internal hash table. The @a alloc argument is
43 * used to determine where the memory comes from (usually from
44 * ACE_Static_Allocator_Base).
46 TAO_Dynamic_Hash_OpTable (const TAO_operation_db_entry *db,
47 CORBA::ULong dbsize,
48 CORBA::ULong hashtblsize,
49 ACE_Allocator *alloc);
51 /// Destructor
52 ~TAO_Dynamic_Hash_OpTable ();
54 /// See the documentation in the base class for details.
55 virtual int bind (const char *opname,
56 const TAO::Operation_Skeletons skel_ptr);
58 virtual int find (const char *opname,
59 TAO_Skeleton &skelfunc,
60 const unsigned int length = 0);
62 virtual int find (const char *opname,
63 TAO_Collocated_Skeleton &skelfunc,
64 TAO::Collocation_Strategy s,
65 const unsigned int length = 0);
66 private:
67 typedef ACE_Hash_Map_Manager_Ex<const char *,
68 TAO::Operation_Skeletons,
69 ACE_Hash<const char *>,
70 ACE_Equal_To<const char *>,
71 ACE_Null_Mutex>
72 OP_MAP_MANAGER;
74 /// The hash table data structure.
75 OP_MAP_MANAGER hash_;
78 TAO_END_VERSIONED_NAMESPACE_DECL
80 #include /**/ "ace/post.h"
81 #endif /* TAO_OPERATION_TABLE_DYNAMIC_HASH_H */