diff options
author | Johnny Willemsen <jwillemsen@remedy.nl> | 2005-03-04 10:02:50 +0000 |
---|---|---|
committer | Johnny Willemsen <jwillemsen@remedy.nl> | 2005-03-04 10:02:50 +0000 |
commit | 11289e30dea626af6399cfec6bb0befcc8196d40 (patch) | |
tree | 71f01fb68e27a92018312081c66c00dba7039c20 /TAO/tao/PortableServer/Operation_Table_Binary_Search.h | |
parent | 71f797e825d7e67bd21421cb95e380447df6ee3c (diff) | |
download | ATCD-11289e30dea626af6399cfec6bb0befcc8196d40.tar.gz |
ChangeLogTag: Fri Mar 4 10:01:12 UTC 2005 Johnny Willemsen <jwillemsen@remedy.nl>
Diffstat (limited to 'TAO/tao/PortableServer/Operation_Table_Binary_Search.h')
-rw-r--r-- | TAO/tao/PortableServer/Operation_Table_Binary_Search.h | 67 |
1 files changed, 67 insertions, 0 deletions
diff --git a/TAO/tao/PortableServer/Operation_Table_Binary_Search.h b/TAO/tao/PortableServer/Operation_Table_Binary_Search.h new file mode 100644 index 00000000000..107be238432 --- /dev/null +++ b/TAO/tao/PortableServer/Operation_Table_Binary_Search.h @@ -0,0 +1,67 @@ +// This may look like C, but it's really -*- C++ -*- + +//============================================================================= +/** + * @file Operation_Table_Binary_Search.h + * + * $Id$ + * + * @author Aniruddha Gokhale + */ +//============================================================================= + +#ifndef TAO_OPERATION_TABLE_BINARY_SEARCH_H +#define TAO_OPERATION_TABLE_BINARY_SEARCH_H + +#include /**/ "ace/pre.h" + +#include "portableserver_export.h" + +#if !defined (ACE_LACKS_PRAGMA_ONCE) +# pragma once +#endif /* ACE_LACKS_PRAGMA_ONCE */ + +#include "Operation_Table.h" + +/** + * @class TAO_Binary_Search_OpTable + * + * @brief Helper class for using binary search operatin lookup strategy + * in the server skeletons. + * + * This class declares pure virtual method called 'lookup ()' + * which will be generated by the GPERF program. This method is + * used by 'bind ()' and 'find ()' methods. Subclasses will + * define the lookup method. + */ +class TAO_PortableServer_Export TAO_Binary_Search_OpTable + : public TAO_Operation_Table +{ +public: + /// Do nothing constructor. + TAO_Binary_Search_OpTable (void); + + /// Do nothing destrctor. + virtual ~TAO_Binary_Search_OpTable (void); + + /// See the documentation in the base class for details. + virtual int find (const char *opname, + TAO_Skeleton &skelfunc, + const unsigned int length = 0); + + 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 skel_ptr); + +private: + /// Method that should defined by the subclasses. GPERF program + /// will generate this routine routines. + virtual const TAO_operation_db_entry* lookup (const char *str) = 0; +}; + +#include /**/ "ace/post.h" +#endif /* TAO_OPERATION_TABLE_BINARY_SEARCH_H */ |