IOR_Table_Impl.h

Go to the documentation of this file.
00001 // -*- C++ -*-
00002 
00003 //=============================================================================
00004 /**
00005  *  @file IOR_Table_Impl.h
00006  *
00007  *  IOR_Table_Impl.h,v 1.13 2006/03/10 07:19:11 jtc Exp
00008  *
00009  *  @author Carlos O'Ryan (coryan@uci.edu)
00010  */
00011 //=============================================================================
00012 
00013 
00014 #ifndef TAO_IOR_TABLE_IMPL_H
00015 #define TAO_IOR_TABLE_IMPL_H
00016 
00017 #include /**/ "ace/pre.h"
00018 
00019 #include "tao/IORTable/IORTable.h"
00020 
00021 #if !defined (ACE_LACKS_PRAGMA_ONCE)
00022 # pragma once
00023 #endif /* ACE_LACKS_PRAGMA_ONCE */
00024 
00025 #include "ace/Hash_Map_Manager_T.h"
00026 #include "ace/Null_Mutex.h"
00027 #include "tao/LocalObject.h"
00028 #include "ace/SString.h"
00029 
00030 #if defined(_MSC_VER)
00031 #pragma warning(push)
00032 #pragma warning(disable:4250)
00033 #endif /* _MSC_VER */
00034 
00035 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
00036 
00037 class TAO_IOR_Table_Impl
00038   : public virtual IORTable::Table,
00039     public virtual TAO_Local_RefCounted_Object
00040 {
00041 public:
00042   /// Constructor
00043   TAO_IOR_Table_Impl (void);
00044 
00045   /// Find the object, using the locator if it is not on the table.
00046   char *find (
00047       const char *object_key
00048       ACE_ENV_ARG_DECL
00049     )
00050     ACE_THROW_SPEC ((
00051       CORBA::SystemException,
00052       IORTable::NotFound
00053     ));
00054 
00055     /**
00056      * @name The IORTable::Table methods
00057      *
00058      * Please check the IORTable.pidl file for details.
00059      */
00060     //@{
00061     virtual void bind (
00062         const char * object_key,
00063         const char * IOR
00064         ACE_ENV_ARG_DECL_WITH_DEFAULTS)
00065 
00066       ACE_THROW_SPEC ((
00067         CORBA::SystemException,
00068         IORTable::AlreadyBound
00069       ));
00070 
00071     virtual void rebind (
00072         const char * object_key,
00073         const char * IOR
00074         ACE_ENV_ARG_DECL_WITH_DEFAULTS)
00075 
00076       ACE_THROW_SPEC ((
00077         CORBA::SystemException
00078       ));
00079 
00080     virtual void unbind (
00081         const char * object_key
00082         ACE_ENV_ARG_DECL_WITH_DEFAULTS)
00083 
00084       ACE_THROW_SPEC ((
00085         CORBA::SystemException,
00086         IORTable::NotFound
00087       ));
00088 
00089     virtual void set_locator (
00090         IORTable::Locator_ptr the_locator
00091         ACE_ENV_ARG_DECL_WITH_DEFAULTS)
00092 
00093       ACE_THROW_SPEC ((
00094         CORBA::SystemException
00095       ));
00096     //@}
00097 
00098 private:
00099   typedef ACE_Hash_Map_Manager_Ex<ACE_CString, ACE_CString, ACE_Hash<ACE_CString>, ACE_Equal_To<ACE_CString>, ACE_Null_Mutex> Map;
00100 
00101   /// The map
00102   Map map_;
00103 
00104   /// The locator
00105   IORTable::Locator_var locator_;
00106 
00107   /// Synchronization
00108   TAO_SYNCH_MUTEX lock_;
00109 };
00110 
00111 TAO_END_VERSIONED_NAMESPACE_DECL
00112 
00113 #if defined(_MSC_VER)
00114 #pragma warning(pop)
00115 #endif /* _MSC_VER */
00116 
00117 #include /**/ "ace/post.h"
00118 
00119 #endif /* TAO_IOR_TABLE_IMPL */

Generated on Thu Nov 9 13:07:06 2006 for TAO_IORTable by doxygen 1.3.6