Public Member Functions | Private Member Functions

TAO_Linear_Search_OpTable Class Reference

Operation table lookup strategy based on linear search. Not efficient, but it works. More...

#include <Operation_Table_Linear_Search.h>

Inheritance diagram for TAO_Linear_Search_OpTable:
Inheritance graph
[legend]
Collaboration diagram for TAO_Linear_Search_OpTable:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 ~TAO_Linear_Search_OpTable (void)
 Destructor.
virtual int find (const char *opname, TAO_Skeleton &skel_ptr, 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 skelptr)

Private Member Functions

virtual const
TAO_operation_db_entry
lookup (const char *str)=0

Detailed Description

Operation table lookup strategy based on linear search. Not efficient, but it works.

Definition at line 34 of file Operation_Table_Linear_Search.h.


Constructor & Destructor Documentation

TAO_Linear_Search_OpTable::~TAO_Linear_Search_OpTable ( void   ) 

Destructor.

Definition at line 36 of file Operation_Table_Linear_Search.cpp.

{
}


Member Function Documentation

int TAO_Linear_Search_OpTable::bind ( const char *  opname,
const TAO::Operation_Skeletons  skel_ptr 
) [virtual]

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 41 of file Operation_Table_Linear_Search.cpp.

{
  return 0;
}

int TAO_Linear_Search_OpTable::find ( const char *  opname,
TAO_Collocated_Skeleton skelfunc,
TAO::Collocation_Strategy  s,
const unsigned int  length = 0 
) [virtual]

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 68 of file Operation_Table_Linear_Search.cpp.

{
  ACE_FUNCTION_TIMEPROBE (TAO_LINEAR_SEARCH_OPTABLE_FIND_START);

  TAO_operation_db_entry const * const entry = lookup (opname);
  if (entry == 0)
    ACE_ERROR_RETURN ((LM_ERROR,
                       ACE_TEXT ("TAO_Linear_Search_Table:find failed\n")),
                      -1);

  switch (st)
    {
    case TAO::TAO_CS_DIRECT_STRATEGY:
      skelfunc = entry->direct_skel_ptr;
      break;
    default:
      return -1;
    }

  return 0;
}

int TAO_Linear_Search_OpTable::find ( const char *  opname,
TAO_Skeleton skel_ptr,
const unsigned int  length = 0 
) [virtual]

See the documentation in the base class for details.

Implements TAO_Operation_Table.

Definition at line 48 of file Operation_Table_Linear_Search.cpp.

{
  ACE_FUNCTION_TIMEPROBE (TAO_LINEAR_SEARCH_OPTABLE_FIND_START);

  TAO_operation_db_entry const * const entry = lookup (opname);
  if (entry == 0)
    ACE_ERROR_RETURN ((LM_ERROR,
                       ACE_TEXT ("TAO_Linear_Search_Table:find failed\n")),
                      -1);

  // Valid entry. Figure out the skel_ptr.
  skelfunc = entry->skel_ptr;

  return 0;
}

virtual const TAO_operation_db_entry* TAO_Linear_Search_OpTable::lookup ( const char *  str  )  [private, pure virtual]

The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines