Operation_Table_Binary_Search.h

Go to the documentation of this file.
00001 // -*- C++ -*-
00002 
00003 //=============================================================================
00004 /**
00005  *  @file    Operation_Table_Binary_Search.h
00006  *
00007  *  $Id: Operation_Table_Binary_Search.h 71473 2006-03-10 07:19:20Z jtc $
00008  *
00009  *  @author Aniruddha Gokhale
00010  */
00011 //=============================================================================
00012 
00013 #ifndef TAO_OPERATION_TABLE_BINARY_SEARCH_H
00014 #define TAO_OPERATION_TABLE_BINARY_SEARCH_H
00015 
00016 #include /**/ "ace/pre.h"
00017 
00018 #include "tao/PortableServer/portableserver_export.h"
00019 
00020 #if !defined (ACE_LACKS_PRAGMA_ONCE)
00021 # pragma once
00022 #endif /* ACE_LACKS_PRAGMA_ONCE */
00023 
00024 #include "tao/PortableServer/Operation_Table.h"
00025 
00026 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
00027 
00028 /**
00029  * @class TAO_Binary_Search_OpTable
00030  *
00031  * @brief Helper class for using binary search operatin lookup strategy
00032  * in the server skeletons.
00033  *
00034  * This class declares pure virtual method called 'lookup ()'
00035  * which will be generated by the GPERF program. This method is
00036  * used by 'bind ()' and 'find ()' methods. Subclasses will
00037  * define the lookup method.
00038  */
00039 class TAO_PortableServer_Export TAO_Binary_Search_OpTable
00040   : public TAO_Operation_Table
00041 {
00042 public:
00043 
00044   /// Do nothing destrctor.
00045   virtual ~TAO_Binary_Search_OpTable (void);
00046 
00047   /// See the documentation in the base class for details.
00048   virtual int find (const char *opname,
00049                     TAO_Skeleton &skelfunc,
00050                     const unsigned int length = 0);
00051 
00052   virtual int find (const char *opname,
00053                     TAO_Collocated_Skeleton &skelfunc,
00054                     TAO::Collocation_Strategy s,
00055                     const unsigned int length = 0);
00056 
00057   virtual int bind (const char *opname,
00058                     const TAO::Operation_Skeletons skel_ptr);
00059 
00060 private:
00061   /// Method that should defined by the subclasses. GPERF program
00062   /// will generate this routine routines.
00063   virtual const TAO_operation_db_entry* lookup (const char *str) = 0;
00064 };
00065 
00066 TAO_END_VERSIONED_NAMESPACE_DECL
00067 
00068 #include /**/ "ace/post.h"
00069 #endif /* TAO_OPERATION_TABLE_BINARY_SEARCH_H */

Generated on Tue Feb 2 17:40:54 2010 for TAO_PortableServer by  doxygen 1.4.7