#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 619 of file Service_Config.h.
|
Definition at line 45 of file Service_Config.cpp. References ACE_DEBUG, ACE_TEXT, ACE_Service_Config::current(), ACE::debug(), LM_DEBUG, ACE_Service_Gestalt::repo_, and saved_.
00046 : saved_ (ACE_Service_Config::instance ()) 00047 { 00048 if (ACE::debug ()) 00049 ACE_DEBUG ((LM_DEBUG, 00050 ACE_TEXT ("ACE (%P|%t) Service_Config_Guard:<ctor=%@>") 00051 ACE_TEXT (" - config=%@ repo=%@ superceded by repo=%@\n"), 00052 this, 00053 this->saved_, 00054 this->saved_->repo_, 00055 psg->repo_)); 00056 00057 // Modify the TSS if the repo has changed 00058 if (saved_ != psg) 00059 (void)ACE_Service_Config::current (psg); 00060 } |
|
Definition at line 62 of file Service_Config.cpp. References ACE_DEBUG, ACE_TEXT, ACE_Service_Config::current(), ACE::debug(), and LM_DEBUG.
00063 { 00064 ACE_Service_Config::current (this->saved_); 00065 00066 if (ACE::debug ()) 00067 ACE_DEBUG ((LM_DEBUG, 00068 ACE_TEXT ("ACE (%P|%t) Service_Config_Guard:<dtor=%@>") 00069 ACE_TEXT (" - new repo=%@\n"), 00070 this, 00071 this->saved_->repo_)); 00072 } |
|
|
|
|
|
Definition at line 631 of file Service_Config.h. Referenced by ACE_Service_Config_Guard(). |