00001
00002
00003 #include "tao/PortableServer/Operation_Table_Linear_Search.h"
00004 #include "tao/Timeprobe.h"
00005 #include "ace/Log_Msg.h"
00006
00007 ACE_RCSID(PortableServer,
00008 Operation_Table_Linear_Searc,
00009 "$Id: Operation_Table_Linear_Search.cpp 71473 2006-03-10 07:19:20Z jtc $")
00010
00011 #if defined (ACE_ENABLE_TIMEPROBES)
00012
00013 static const char *TAO_Operation_Table_Timeprobe_Description[] =
00014 {
00015 "TAO_Linear_Search_OpTable::find - start",
00016 "TAO_Linear_Search_OpTable::find - end",
00017 };
00018
00019 enum
00020 {
00021
00022 TAO_LINEAR_SEARCH_OPTABLE_FIND_START = 602,
00023 TAO_LINEAR_SEARCH_OPTABLE_FIND_END,
00024 };
00025
00026
00027 ACE_TIMEPROBE_EVENT_DESCRIPTIONS (TAO_Operation_Table_Timeprobe_Description,
00028 TAO_LINEAR_SEARCH_OPTABLE_FIND_START);
00029
00030 #endif
00031
00032
00033
00034 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
00035
00036 TAO_Linear_Search_OpTable::~TAO_Linear_Search_OpTable (void)
00037 {
00038 }
00039
00040 int
00041 TAO_Linear_Search_OpTable::bind (const char *,
00042 const TAO::Operation_Skeletons )
00043 {
00044 return 0;
00045 }
00046
00047 int
00048 TAO_Linear_Search_OpTable::find (const char *opname,
00049 TAO_Skeleton& skelfunc,
00050 const unsigned int )
00051 {
00052 ACE_FUNCTION_TIMEPROBE (TAO_LINEAR_SEARCH_OPTABLE_FIND_START);
00053
00054 TAO_operation_db_entry const * const entry = lookup (opname);
00055 if (entry == 0)
00056 ACE_ERROR_RETURN ((LM_ERROR,
00057 ACE_TEXT ("TAO_Linear_Search_Table:find failed\n")),
00058 -1);
00059
00060
00061 skelfunc = entry->skel_ptr;
00062
00063 return 0;
00064 }
00065
00066
00067 int
00068 TAO_Linear_Search_OpTable::find (const char *opname,
00069 TAO_Collocated_Skeleton &skelfunc,
00070 TAO::Collocation_Strategy st,
00071 const unsigned int )
00072 {
00073 ACE_FUNCTION_TIMEPROBE (TAO_LINEAR_SEARCH_OPTABLE_FIND_START);
00074
00075 TAO_operation_db_entry const * const entry = lookup (opname);
00076 if (entry == 0)
00077 ACE_ERROR_RETURN ((LM_ERROR,
00078 ACE_TEXT ("TAO_Linear_Search_Table:find failed\n")),
00079 -1);
00080
00081 switch (st)
00082 {
00083 case TAO::TAO_CS_DIRECT_STRATEGY:
00084 skelfunc = entry->direct_skel_ptr;
00085 break;
00086 default:
00087 return -1;
00088 }
00089
00090 return 0;
00091 }
00092
00093 TAO_END_VERSIONED_NAMESPACE_DECL