#include <Service_Config.h>
Collaboration diagram for ACE_Service_Config_Guard:
Public Member Functions | |
ACE_Service_Config_Guard (ACE_Service_Gestalt *psg) | |
~ACE_Service_Config_Guard (void) | |
Private Member Functions | |
ACE_Service_Config_Guard (const ACE_Service_Config_Guard &) | |
ACE_Service_Config_Guard & | operator= (const ACE_Service_Config_Guard &) |
Private Attributes | |
ACE_Service_Gestalt * | saved_ |
Instantiating it with a specific configuration ensures any references to ACE_Service_Config::instance(), even when occuring in static constructors, will allways access the designated configuration instance. This comes very handy when a dynamic service also registers any static services of its own and their static factories.
Definition at line 603 of file Service_Config.h.
|
Definition at line 41 of file Service_Config.cpp. References ACE_DEBUG, ACE_LIB_TEXT, ACE_Service_Config::current(), ACE::debug(), LM_DEBUG, ACE_Service_Gestalt::repo_, and saved_.
00042 : saved_ (ACE_Service_Config::current ()) 00043 { 00044 if (ACE::debug ()) 00045 ACE_DEBUG ((LM_DEBUG, 00046 ACE_LIB_TEXT ("(%P|%t) SCG::ctor, repo=%@ - guard with %@\n"), 00047 this->saved_->repo_, 00048 psg->repo_)); 00049 00050 // Modify the TSS - no locking needed 00051 if (saved_ != psg) 00052 (void)ACE_Service_Config::current (psg); 00053 } |
|
Definition at line 56 of file Service_Config.cpp. References ACE_DEBUG, ACE_LIB_TEXT, ACE_Service_Config::current(), ACE::debug(), and LM_DEBUG.
00057 { 00058 ACE_Service_Config::current (this->saved_); 00059 00060 if (ACE::debug ()) 00061 ACE_DEBUG ((LM_DEBUG, 00062 ACE_LIB_TEXT ("(%P|%t) SCG::dtor, repo=%@ - un-guard\n"), 00063 this->saved_->repo_)); 00064 } |
|
|
|
|
|
Definition at line 615 of file Service_Config.h. Referenced by ACE_Service_Config_Guard(). |