1 #include "tao/PortableServer/Operation_Table_Perfect_Hash.h"
2 #include "tao/Timeprobe.h"
3 #include "ace/Log_Msg.h"
5 #if defined (ACE_ENABLE_TIMEPROBES)
7 static const char *TAO_Operation_Table_Timeprobe_Description
[] =
9 "TAO_Perfect_Hash_OpTable::find - start",
10 "TAO_Perfect_Hash_OpTable::find - end",
15 // Timeprobe description table start key
16 TAO_PERFECT_HASH_OPTABLE_FIND_START
= 606,
17 TAO_PERFECT_HASH_OPTABLE_FIND_END
,
21 ACE_TIMEPROBE_EVENT_DESCRIPTIONS (TAO_Operation_Table_Timeprobe_Description
,
22 TAO_PERFECT_HASH_OPTABLE_FIND_START
);
24 #endif /* ACE_ENABLE_TIMEPROBES */
26 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
29 TAO_Perfect_Hash_OpTable::find (const char *opname
,
30 TAO_Skeleton
&skelfunc
,
31 const unsigned int length
)
33 ACE_FUNCTION_TIMEPROBE (TAO_PERFECT_HASH_OPTABLE_FIND_START
);
35 TAO_operation_db_entry
const * const entry
= lookup (opname
,
39 skelfunc
= 0; // insure that somebody can't call a wrong function!
40 TAOLIB_ERROR_RETURN ((LM_ERROR
,
41 ACE_TEXT ("TAO_Perfect_Hash_OpTable:find for ")
42 ACE_TEXT ("operation '%C' (length=%d) failed\n"),
43 opname
? opname
: "<null string>", length
),
47 // Valid entry. Figure out the skel_ptr.
48 skelfunc
= entry
->skel_ptr
;
54 TAO_Perfect_Hash_OpTable::find (const char *opname
,
55 TAO_Collocated_Skeleton
&skelfunc
,
56 TAO::Collocation_Strategy st
,
57 const unsigned int length
)
59 ACE_FUNCTION_TIMEPROBE (TAO_PERFECT_HASH_OPTABLE_FIND_START
);
61 TAO_operation_db_entry
const * const entry
= lookup (opname
, length
);
64 skelfunc
= 0; // insure that somebody can't call a wrong function!
65 TAOLIB_ERROR_RETURN ((LM_ERROR
,
66 ACE_TEXT ("TAO_Perfect_Hash_OpTable:find for ")
67 ACE_TEXT ("operation '%C' (length=%d) failed\n"),
68 opname
? opname
: "<null string>", length
),
74 case TAO::TAO_CS_DIRECT_STRATEGY
:
75 skelfunc
= entry
->direct_skel_ptr
;
85 TAO_Perfect_Hash_OpTable::bind (const char *, const TAO::Operation_Skeletons
)
90 TAO_END_VERSIONED_NAMESPACE_DECL