Map of Servant_State objects - one per servant. More...
#include <CSD_TP_Servant_State_Map.h>
Public Member Functions | |
TP_Servant_State_Map () | |
Default Constructor. | |
~TP_Servant_State_Map () | |
Destructor. | |
TP_Servant_State * | find (PortableServer::Servant servant) |
Accessor for the servant busy flag. | |
void | insert (PortableServer::Servant servant) |
Insert the servant to map. | |
void | remove (PortableServer::Servant servant) |
Remove the servant from map. | |
Private Types | |
typedef ACE_Hash_Map_Manager_Ex< void *, TP_Servant_State::HandleType, ACE_Hash< void * > , ACE_Equal_To< void * > , TAO_SYNCH_MUTEX > | MapType |
Private Attributes | |
MapType | map_ |
The underlying map of servant state objects. |
Map of Servant_State objects - one per servant.
A TP_Stategy object holds an instance of a TP_Servant_State_Map object as a (held-by-value) data member. The strategy uses this map to find or create the TP_Servant_State object for a particular servant object.
Definition at line 47 of file CSD_TP_Servant_State_Map.h.
typedef ACE_Hash_Map_Manager_Ex<void*, TP_Servant_State::HandleType, ACE_Hash<void*>, ACE_Equal_To<void*>, TAO_SYNCH_MUTEX> TAO::CSD::TP_Servant_State_Map::MapType [private] |
Underlying Map Type - Hash-Based - Key Type: void*, Value Type: TP_Servant_State::HandleType
Definition at line 78 of file CSD_TP_Servant_State_Map.h.
TAO::CSD::TP_Servant_State_Map::TP_Servant_State_Map | ( | ) |
TAO::CSD::TP_Servant_State_Map::~TP_Servant_State_Map | ( | ) |
TAO::CSD::TP_Servant_State * TAO::CSD::TP_Servant_State_Map::find | ( | PortableServer::Servant | servant | ) |
Accessor for the servant busy flag.
Definition at line 21 of file CSD_TP_Servant_State_Map.inl.
{ void* key = servant; TP_Servant_State::HandleType value; if (this->map_.find(key, value) != 0) { throw PortableServer::POA::ServantNotActive (); } return value._retn(); }
void TAO::CSD::TP_Servant_State_Map::insert | ( | PortableServer::Servant | servant | ) |
Insert the servant to map.
Definition at line 38 of file CSD_TP_Servant_State_Map.inl.
{ void* key = servant; TP_Servant_State::HandleType value = new TP_Servant_State (); int const result = this->map_.bind(key, value); if (result == 1) { throw PortableServer::POA::ServantAlreadyActive (); } ACE_ASSERT (result == 0); }
void TAO::CSD::TP_Servant_State_Map::remove | ( | PortableServer::Servant | servant | ) |
Remove the servant from map.
Definition at line 57 of file CSD_TP_Servant_State_Map.inl.
{ void* key = servant; if (this->map_.unbind(key) == -1) { throw PortableServer::POA::ServantNotActive (); } }
MapType TAO::CSD::TP_Servant_State_Map::map_ [private] |
The underlying map of servant state objects.
Definition at line 81 of file CSD_TP_Servant_State_Map.h.