#include <IOR_Table_Impl.h>


Public Member Functions | |
| TAO_IOR_Table_Impl (void) | |
| Constructor. | |
| char * | find (const char *object_key) |
| Find the object, using the locator if it is not on the table. | |
The IORTable::Table methods | |
Please check the IORTable.pidl file for details. | |
| virtual void | bind (const char *object_key, const char *IOR) |
| virtual void | rebind (const char *object_key, const char *IOR) |
| virtual void | unbind (const char *object_key) |
| virtual void | set_locator (IORTable::Locator_ptr the_locator) |
Static Public Member Functions | |
| static TAO_IOR_Table_Impl_ptr | _nil (void) |
| Return a NIL object. | |
Private Types | |
| typedef ACE_Hash_Map_Manager_Ex < ACE_CString, ACE_CString, ACE_Hash< ACE_CString > , ACE_Equal_To< ACE_CString > , ACE_Null_Mutex > | Map |
Private Attributes | |
| Map | map_ |
| The map. | |
| IORTable::Locator_var | locator_ |
| The locator. | |
| TAO_SYNCH_MUTEX | lock_ |
| Synchronization. | |
Definition at line 43 of file IOR_Table_Impl.h.
typedef ACE_Hash_Map_Manager_Ex<ACE_CString, ACE_CString, ACE_Hash <ACE_CString>, ACE_Equal_To <ACE_CString>, ACE_Null_Mutex> TAO_IOR_Table_Impl::Map [private] |
Definition at line 79 of file IOR_Table_Impl.h.
| TAO_IOR_Table_Impl::TAO_IOR_Table_Impl | ( | void | ) |
| static TAO_IOR_Table_Impl_ptr TAO_IOR_Table_Impl::_nil | ( | void | ) | [inline, static] |
Return a NIL object.
Reimplemented from CORBA::LocalObject.
Definition at line 49 of file IOR_Table_Impl.h.
{
return static_cast<TAO_IOR_Table_Impl_ptr> (0);
}
| void TAO_IOR_Table_Impl::bind | ( | const char * | object_key, | |
| const char * | IOR | |||
| ) | [virtual] |
Definition at line 76 of file IOR_Table_Impl.cpp.
{
ACE_GUARD (TAO_SYNCH_MUTEX, ace_mon, this->lock_);
if (this->map_.bind (object_key, IOR) != 0)
throw IORTable::AlreadyBound ();
}
| char * TAO_IOR_Table_Impl::find | ( | const char * | object_key | ) |
Find the object, using the locator if it is not on the table.
Definition at line 55 of file IOR_Table_Impl.cpp.
{
// We don't want the lock held during locate, so make it go out
// of scope before then.
{
ACE_CString key (object_key);
ACE_CString ior;
ACE_GUARD_RETURN (TAO_SYNCH_MUTEX, ace_mon, this->lock_, 0);
if (this->map_.find (key, ior) == 0)
{
return CORBA::string_dup (ior.c_str ());
}
if (CORBA::is_nil (this->locator_.in ()))
throw IORTable::NotFound ();
}
return this->locator_->locate (object_key);
}
| void TAO_IOR_Table_Impl::rebind | ( | const char * | object_key, | |
| const char * | IOR | |||
| ) | [virtual] |
Definition at line 84 of file IOR_Table_Impl.cpp.
{
ACE_GUARD (TAO_SYNCH_MUTEX, ace_mon, this->lock_);
this->map_.rebind (object_key, IOR);
}
| void TAO_IOR_Table_Impl::set_locator | ( | IORTable::Locator_ptr | the_locator | ) | [virtual] |
Definition at line 99 of file IOR_Table_Impl.cpp.
{
ACE_GUARD (TAO_SYNCH_MUTEX, ace_mon, this->lock_);
this->locator_ = IORTable::Locator::_duplicate (locator);
}
| void TAO_IOR_Table_Impl::unbind | ( | const char * | object_key | ) | [virtual] |
Definition at line 91 of file IOR_Table_Impl.cpp.
{
ACE_GUARD (TAO_SYNCH_MUTEX, ace_mon, this->lock_);
if (this->map_.unbind (object_key) != 0)
throw IORTable::NotFound ();
}
IORTable::Locator_var TAO_IOR_Table_Impl::locator_ [private] |
The locator.
Definition at line 85 of file IOR_Table_Impl.h.
TAO_SYNCH_MUTEX TAO_IOR_Table_Impl::lock_ [private] |
Synchronization.
Definition at line 88 of file IOR_Table_Impl.h.
Map TAO_IOR_Table_Impl::map_ [private] |
The map.
Definition at line 82 of file IOR_Table_Impl.h.
1.7.0