#include <PG_Group_Guard.h>
Collaboration diagram for TAO_PG_Group_Guard:
Public Member Functions | |
TAO_PG_Group_Guard (TAO_PG_GenericFactory &generic_factory, TAO_PG_Factory_Set &factory_set, TAO_PG_ObjectGroupManager &group_manager, const PortableServer::ObjectId &oid) | |
Constructor. | |
~TAO_PG_Group_Guard (void) | |
Destructor. | |
void | release (void) |
Relinquish cleanup responsibility. | |
Private Attributes | |
TAO_PG_GenericFactory & | generic_factory_ |
TAO_PG_Factory_Set & | factory_set_ |
TAO_PG_ObjectGroupManager & | group_manager_ |
const PortableServer::ObjectId & | oid_ |
int | released_ |
This guard's destructor performs cleanup of object group resources. Thus, cleanup is performed when this guard goes out of scope unless explicitly released from that responsibility.
This guard is meant to be used internally by the TAO_PG_GenericFactory class.
Definition at line 48 of file PG_Group_Guard.h.
|
Constructor.
Definition at line 14 of file PG_Group_Guard.cpp. References TAO_PG_Factory_Set.
00019 : generic_factory_ (generic_factory), 00020 factory_set_ (factory_set), 00021 group_manager_ (group_manager), 00022 oid_ (oid), 00023 released_ (0) 00024 { 00025 } |
|
Destructor.
Definition at line 27 of file PG_Group_Guard.cpp. References ACE_CATCHANY, ACE_DECLARE_NEW_CORBA_ENV, ACE_ENDTRY, ACE_ENV_ARG_PARAMETER, ACE_TRY, ACE_TRY_CHECK, TAO_PG_GenericFactory::delete_object_i(), TAO_PG_ObjectGroupManager::destroy_object_group(), generic_factory_, group_manager_, and released_.
00028 { 00029 if (!this->released_) 00030 { 00031 ACE_DECLARE_NEW_CORBA_ENV; 00032 ACE_TRY 00033 { 00034 this->generic_factory_.delete_object_i (this->factory_set_, 00035 1 // Ignore exceptions 00036 ACE_ENV_ARG_PARAMETER); 00037 ACE_TRY_CHECK; 00038 00039 // This should never throw an exception if this Guard is 00040 // used properly. 00041 this->group_manager_.destroy_object_group (this->oid_ 00042 ACE_ENV_ARG_PARAMETER); 00043 ACE_TRY_CHECK; 00044 } 00045 ACE_CATCHANY 00046 { 00047 // Ignore all exceptions. 00048 } 00049 ACE_ENDTRY; 00050 } 00051 } |
|
Relinquish cleanup responsibility.
Definition at line 54 of file PG_Group_Guard.cpp. References released_.
00055 { 00056 this->released_ = 1; 00057 } |
|
Reference to the TAO_PG_Factory_Set that contains all application-specific GenericFactory object references. Definition at line 72 of file PG_Group_Guard.h. |
|
Reference to the infrastructure TAO_PG_GenericFactory that created the below TAO_PG_Factory_Set. Definition at line 68 of file PG_Group_Guard.h. Referenced by ~TAO_PG_Group_Guard(). |
|
Reference to the TAO_PG_ObjectGroupManager that maintains the object group map. Definition at line 76 of file PG_Group_Guard.h. Referenced by ~TAO_PG_Group_Guard(). |
|
Reference to the ObjectId that is the map key necessary to unbind the corresponding object group map entry from the map upon destruction. Definition at line 81 of file PG_Group_Guard.h. |
|
Flag that dictates whether or not the destructor will perform cleanup. Definition at line 85 of file PG_Group_Guard.h. Referenced by release(), and ~TAO_PG_Group_Guard(). |