#include <Operation_Table_Perfect_Hash.h>
Inheritance diagram for TAO_Perfect_Hash_OpTable:


Public Member Functions | |
| virtual | ~TAO_Perfect_Hash_OpTable (void) | 
| Do nothing destrctor.   | |
| virtual int | find (const char *opname, TAO_Skeleton &skelfunc, const unsigned int length=0) | 
| See the documentation in the base class for details.   | |
| virtual int | find (const char *opname, TAO_Collocated_Skeleton &skelfunc, TAO::Collocation_Strategy s, const unsigned int length=0) | 
| virtual int | bind (const char *opname, const TAO::Operation_Skeletons skel_ptr) | 
Private Member Functions | |
| virtual unsigned int | hash (const char *str, unsigned int len)=0 | 
| virtual const TAO_operation_db_entry * | lookup (const char *str, unsigned int len)=0 | 
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.
Definition at line 40 of file Operation_Table_Perfect_Hash.h.
      
  | 
  
| 
 Do nothing destrctor. 
 Definition at line 35 of file Operation_Table_Perfect_Hash.cpp. 
 00036 {
00037 }
 | 
  
      
  | 
  ||||||||||||
| 
 Associate the skeleton skel_ptr with an operation named opname. Returns -1 on failure, 0 on success, 1 on duplicate. Implements TAO_Operation_Table. Definition at line 97 of file Operation_Table_Perfect_Hash.cpp. 
 00099 {
00100   return 0;
00101 }
 | 
  
      
  | 
  ||||||||||||||||||||
| 
 Uses opname to look up the collocated skeleton function and pass it back in skelfunc. Returns non-negative integer on success, or -1 on failure. Implements TAO_Operation_Table. Definition at line 65 of file Operation_Table_Perfect_Hash.cpp. References ACE_ERROR_RETURN, ACE_FUNCTION_TIMEPROBE, ACE_TEXT(), ACE_TEXT_CHAR_TO_TCHAR, TAO_operation_db_entry::direct_skel_ptr, LM_ERROR, lookup(), and TAO_Collocated_Skeleton. 
 00069 {
00070   ACE_FUNCTION_TIMEPROBE (TAO_PERFECT_HASH_OPTABLE_FIND_START);
00071 
00072   TAO_operation_db_entry const * const entry = lookup (opname,
00073                                                        length);
00074   if (entry == 0)
00075     {
00076       skelfunc = 0; // insure that somebody can't call a wrong function!
00077       ACE_ERROR_RETURN ((LM_ERROR,
00078                          ACE_TEXT ("TAO_Perfect_Hash_OpTable:find for ")
00079                          ACE_TEXT ("operation '%s' (length=%d) failed\n"),
00080                          ACE_TEXT_CHAR_TO_TCHAR (opname ? opname : "<null string>"), length),
00081                         -1);
00082     }
00083 
00084   switch (st)
00085     {
00086     case TAO::TAO_CS_DIRECT_STRATEGY:
00087       skelfunc = entry->direct_skel_ptr;
00088       break;
00089     default:
00090       return -1;
00091     }
00092 
00093   return 0;
00094 }
 | 
  
      
  | 
  ||||||||||||||||
| 
 See the documentation in the base class for details. 
 Implements TAO_Operation_Table. Definition at line 40 of file Operation_Table_Perfect_Hash.cpp. References ACE_ERROR_RETURN, ACE_FUNCTION_TIMEPROBE, ACE_TEXT(), ACE_TEXT_CHAR_TO_TCHAR, LM_ERROR, lookup(), TAO_operation_db_entry::skel_ptr, and TAO_Skeleton. 
 00043 {
00044   ACE_FUNCTION_TIMEPROBE (TAO_PERFECT_HASH_OPTABLE_FIND_START);
00045 
00046   TAO_operation_db_entry const * const entry = lookup (opname,
00047                                                        length);
00048   if (entry == 0)
00049     {
00050       skelfunc = 0; // insure that somebody can't call a wrong function!
00051       ACE_ERROR_RETURN ((LM_ERROR,
00052                          ACE_TEXT ("TAO_Perfect_Hash_OpTable:find for ")
00053                          ACE_TEXT ("operation '%s' (length=%d) failed\n"),
00054                          ACE_TEXT_CHAR_TO_TCHAR (opname ? opname : "<null string>"), length),
00055                         -1);
00056     }
00057 
00058   // Valid entry. Figure out the skel_ptr.
00059   skelfunc = entry->skel_ptr;
00060 
00061   return 0;
00062 }
 | 
  
      
  | 
  ||||||||||||
| 
 
 Implemented in TAO_CORBA_Policy_Perfect_Hash_OpTable.  | 
  
      
  | 
  ||||||||||||
| 
 
 Implemented in TAO_CORBA_Policy_Perfect_Hash_OpTable. Referenced by find().  | 
  
 
1.3.6