Interpreter_Utils.h

Go to the documentation of this file.
00001 // -*- C++ -*-
00002 
00003 //=============================================================================
00004 /**
00005  * @file   Interpreter_Utils.h
00006  *
00007  * Interpreter_Utils.h,v 1.23 2006/05/16 22:44:35 mesnier_p Exp
00008  */
00009 //=============================================================================
00010 
00011 #ifndef TAO_INTERPRETER_UTILS_H
00012 #define TAO_INTERPRETER_UTILS_H
00013 
00014 #include /**/ "ace/pre.h"
00015 
00016 #include "ace/Hash_Map_Manager.h"
00017 #include "ace/Null_Mutex.h"
00018 #include "ace/Functor.h"
00019 #include "ace/ACE.h"
00020 #include "ace/OS_NS_string.h"
00021 
00022 #include "tao/AnyTypeCode/TypeCode.h"
00023 #include "tao/CORBA_String.h"
00024 #include "tao/SystemException.h"
00025 
00026 #include "orbsvcs/Trader/trading_serv_export.h"
00027 
00028 ACE_BEGIN_VERSIONED_NAMESPACE_DECL
00029 
00030 template<>
00031 class TAO_Trading_Serv_Export ACE_Hash<CORBA::String_var>
00032 {
00033 public:
00034   unsigned long operator () (const CORBA::String_var& string) const
00035   {
00036     unsigned long ret = ACE::hash_pjw (string.in ());
00037     return ret;
00038   }
00039 };
00040 
00041 template<>
00042 class TAO_Trading_Serv_Export ACE_Less_Than<CORBA::String_var>
00043 {
00044 public:
00045   int operator () (const CORBA::String_var &lhs,
00046                    const CORBA::String_var &rhs) const
00047   {
00048     return ACE_OS::strcmp (lhs.in (), rhs.in ()) < 0;
00049   }
00050 };
00051 
00052 template<>
00053 class TAO_Trading_Serv_Export ACE_Equal_To<CORBA::String_var>
00054 {
00055 public:
00056   int operator () (const CORBA::String_var &lhs,
00057                    const CORBA::String_var &rhs) const
00058   {
00059     return ACE_OS::strcmp (lhs.in (), rhs.in ()) == 0;
00060   }
00061 };
00062 
00063 typedef ACE_Hash_Map_Manager_Ex<CORBA::String_var,
00064                                 int,
00065                                 ACE_Hash<CORBA::String_var>,
00066                                 ACE_Equal_To<CORBA::String_var>,
00067                                 ACE_Null_Mutex>
00068   TAO_Lookup_Table;
00069 typedef ACE_Hash_Map_Manager_Ex<CORBA::String_var,
00070                                 CORBA::TypeCode_ptr,
00071                                 ACE_Hash<CORBA::String_var>,
00072                                 ACE_Equal_To<CORBA::String_var>,
00073                                 ACE_Null_Mutex>
00074   TAO_Typecode_Table;
00075 
00076 ACE_END_VERSIONED_NAMESPACE_DECL
00077 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
00078 
00079 // *************************************************************
00080 // TAO_Sequence_Extracter_Base
00081 // *************************************************************
00082 
00083 class TAO_Sequence_Extracter_Base
00084 // = TITLE
00085 //   Static methods used by the TAO_Sequence_Extracter class.
00086 {
00087 public:
00088 
00089   static CORBA::TCKind sequence_type (CORBA::TypeCode* code
00090                                       ACE_ENV_ARG_DECL)
00091     ACE_THROW_SPEC ((CORBA::SystemException));
00092   // Return the sequence element type for the sequence whose typecode
00093   // is <code>.
00094 };
00095 
00096 TAO_END_VERSIONED_NAMESPACE_DECL
00097 
00098 #include /**/ "ace/post.h"
00099 
00100 #endif /* TAO_INTERPRETER_UTILS_H */

Generated on Thu Nov 9 13:59:57 2006 for TAO_CosTrader by doxygen 1.3.6