Merge pull request #2309 from mitza-oci/warnings
[ACE_TAO.git] / TAO / tao / PortableServer / Operation_Table_Linear_Search.cpp
blobd6ff3994156a1f407c7c30d003f97c4fd39e3333
1 #include "tao/PortableServer/Operation_Table_Linear_Search.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_Linear_Search_OpTable::find - start",
10 "TAO_Linear_Search_OpTable::find - end",
13 enum
15 // Timeprobe description table start key
16 TAO_LINEAR_SEARCH_OPTABLE_FIND_START = 602,
17 TAO_LINEAR_SEARCH_OPTABLE_FIND_END,
20 // Setup Timeprobes
21 ACE_TIMEPROBE_EVENT_DESCRIPTIONS (TAO_Operation_Table_Timeprobe_Description,
22 TAO_LINEAR_SEARCH_OPTABLE_FIND_START);
24 #endif /* ACE_ENABLE_TIMEPROBES */
26 /***************************************************************/
28 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
30 int
31 TAO_Linear_Search_OpTable::bind (const char *,
32 const TAO::Operation_Skeletons )
34 return 0;
37 int
38 TAO_Linear_Search_OpTable::find (const char *opname,
39 TAO_Skeleton& skelfunc,
40 const unsigned int )
42 ACE_FUNCTION_TIMEPROBE (TAO_LINEAR_SEARCH_OPTABLE_FIND_START);
44 TAO_operation_db_entry const * const entry = lookup (opname);
45 if (entry == 0)
46 TAOLIB_ERROR_RETURN ((LM_ERROR,
47 ACE_TEXT ("TAO_Linear_Search_Table:find failed\n")),
48 -1);
50 // Valid entry. Figure out the skel_ptr.
51 skelfunc = entry->skel_ptr;
53 return 0;
57 int
58 TAO_Linear_Search_OpTable::find (const char *opname,
59 TAO_Collocated_Skeleton &skelfunc,
60 TAO::Collocation_Strategy st,
61 const unsigned int )
63 ACE_FUNCTION_TIMEPROBE (TAO_LINEAR_SEARCH_OPTABLE_FIND_START);
65 TAO_operation_db_entry const * const entry = lookup (opname);
66 if (entry == 0)
67 TAOLIB_ERROR_RETURN ((LM_ERROR,
68 ACE_TEXT ("TAO_Linear_Search_Table:find failed\n")),
69 -1);
71 switch (st)
73 case TAO::TAO_CS_DIRECT_STRATEGY:
74 skelfunc = entry->direct_skel_ptr;
75 break;
76 default:
77 return -1;
80 return 0;
83 TAO_END_VERSIONED_NAMESPACE_DECL