diff options
author | alex <alex@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1998-06-30 21:30:31 +0000 |
---|---|---|
committer | alex <alex@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1998-06-30 21:30:31 +0000 |
commit | 2bcce11fd22dfa6312285986f7656da3c2284175 (patch) | |
tree | 7b65fac60bb577b0d2aa95241de24a198142e90f /TAO/tao/Operation_Table.h | |
parent | a5e655d1d60d72d6c260bc44b15b5db61d3b88d5 (diff) | |
download | ATCD-2bcce11fd22dfa6312285986f7656da3c2284175.tar.gz |
*** empty log message ***
Diffstat (limited to 'TAO/tao/Operation_Table.h')
-rw-r--r-- | TAO/tao/Operation_Table.h | 44 |
1 files changed, 39 insertions, 5 deletions
diff --git a/TAO/tao/Operation_Table.h b/TAO/tao/Operation_Table.h index 2c18993d990..7ddbcb6b6a4 100644 --- a/TAO/tao/Operation_Table.h +++ b/TAO/tao/Operation_Table.h @@ -7,7 +7,7 @@ // TAO // // = FILENAME -// optable.h +// Operation_Table.h // // = AUTHOR // Aniruddha Gokhale @@ -62,7 +62,7 @@ typedef ACE_Hash_Map_Manager<const char *, class TAO_Export TAO_Dynamic_Hash_OpTable : public TAO_Operation_Table { // = TITLE - // Dynamic Hashing scheme for CORBA IDL operation name lookup. + // Dynamic Hashing scheme for CORBA IDL operation name lookup. public: // = Initialization and termination methods. TAO_Dynamic_Hash_OpTable (const TAO_operation_db_entry *db, @@ -204,7 +204,41 @@ private: class TAO_Export TAO_Perfect_Hash_OpTable : public TAO_Operation_Table { - // TDB... + // = TITLE + // Helper class for use of perfect hashing operation lookup + // strategy. + // + // = DESCRIPTION + // This class declares pure virtual methods called 'lookup ()' + // and 'hash ()' which will be generated by the GPERF + // program. These methods are used by 'bind ()' and 'find ()' + // methods. Subclasses will define the lookup and hash + // functions. +public: + TAO_Perfect_Hash_OpTable (void); + // Do nothing constructor. + + virtual ~TAO_Perfect_Hash_OpTable (void); + // Do nothing destrctor. + + virtual int find (const char *opname, + TAO_Skeleton &skelfunc); + // Uses <{opname}> to look up the skeleton function and pass it back + // in <{skelfunc}>. Returns non-negative integer on success, or -1 + // on failure. + + virtual int bind (const char *opname, + const TAO_Skeleton skel_ptr); + // Associate the skeleton <{skel_ptr}> with an operation named + // <{opname}>. Returns -1 on failure, 0 on success, 1 on duplicate. + +private: + // = Methods that should defined by the subclasses. GPERF program + // will generate these routines. + + virtual unsigned int hash (const char *str, int len) = 0; + + virtual const struct TAO_operation_db_entry* lookup (const char *str, int len) = 0; }; class TAO_Export TAO_Operation_Table_Parameters @@ -234,10 +268,10 @@ public: // for user-defined lookup strategies. TAO_Operation_Table *concrete_strategy (void); - // return the + // Return the operation table that is being used to do the lookup. TAO_Operation_Table_Parameters (void); - // constructor + // constructor. ~TAO_Operation_Table_Parameters (void); // destructor |