=default for generated implementation copy ctor
[ACE_TAO.git] / TAO / tao / PortableServer / Operation_Table_Binary_Search.cpp
blob0810f667852d716c352a85f77e6b1ea10abfeefd
1 // -*- C++ -*-
2 #include "tao/PortableServer/Operation_Table_Binary_Search.h"
3 #include "tao/Timeprobe.h"
4 #include "ace/Log_Msg.h"
6 #if defined (ACE_ENABLE_TIMEPROBES)
8 static const char *TAO_Operation_Table_Timeprobe_Description[] =
10 "TAO_Binary_Search_OpTable::find - start",
11 "TAO_Binary_Search_OpTable::find - end"
14 enum
16 // Timeprobe description table start key
17 TAO_BINARY_SEARCH_OPTABLE_FIND_START = 608,
18 TAO_BINARY_SEARCH_OPTABLE_FIND_END
21 // Setup Timeprobes
22 ACE_TIMEPROBE_EVENT_DESCRIPTIONS (TAO_Operation_Table_Timeprobe_Description,
23 TAO_BINARY_SEARCH_OPTABLE_FIND_START);
25 #endif /* ACE_ENABLE_TIMEPROBES */
27 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
29 int
30 TAO_Binary_Search_OpTable::find (const char *opname,
31 TAO_Skeleton &skelfunc,
32 const unsigned int /* length */)
34 ACE_FUNCTION_TIMEPROBE (TAO_BINARY_SEARCH_OPTABLE_FIND_START);
36 TAO_operation_db_entry const * const entry = lookup (opname);
38 if (entry == 0)
39 TAOLIB_ERROR_RETURN ((LM_ERROR,
40 ACE_TEXT ("TAO_Binary_Search_Table:find failed\n")),
41 -1);
42 // Valid entry. Figure out the skel_ptr.
43 skelfunc = entry->skel_ptr;
45 return 0;
48 int
49 TAO_Binary_Search_OpTable::find (const char *opname,
50 TAO_Collocated_Skeleton &skelfunc,
51 TAO::Collocation_Strategy st,
52 const unsigned int /* length */)
54 ACE_FUNCTION_TIMEPROBE (TAO_BINARY_SEARCH_OPTABLE_FIND_START);
56 TAO_operation_db_entry const * const entry = lookup (opname);
58 if (entry == 0)
59 TAOLIB_ERROR_RETURN ((LM_ERROR,
60 ACE_TEXT ("TAO_Binary_Search_Table:find failed\n")),
61 -1);
63 switch (st)
65 case TAO::TAO_CS_DIRECT_STRATEGY:
66 skelfunc = entry->direct_skel_ptr;
67 break;
68 default:
69 return -1;
72 return 0;
75 int
76 TAO_Binary_Search_OpTable::bind (const char *,
77 const TAO::Operation_Skeletons)
79 return 0;
82 TAO_END_VERSIONED_NAMESPACE_DECL