A guard class, designed to be instantiated on the stack. More...
#include <Service_Config.h>

Public Member Functions | |
| ACE_Service_Config_Guard (ACE_Service_Gestalt *psg) | |
| ctor | |
| ~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_Intrusive_Auto_Ptr < ACE_Service_Gestalt > | saved_ |
A guard class, designed to be instantiated on the stack.
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 668 of file Service_Config.h.
| ACE_Service_Config_Guard::ACE_Service_Config_Guard | ( | ACE_Service_Gestalt * | psg | ) |
ctor
Definition at line 108 of file Service_Config.cpp.
: saved_ (ACE_Service_Config::current ()) { if (ACE::debug ()) ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("ACE (%P|%t) - SCG:<ctor=%@>") ACE_TEXT (" - config=%@ repo=%@ superceded by repo=%@\n"), this, this->saved_.get (), this->saved_->repo_, psg->repo_)); // Modify the TSS if the repo has changed ACE_Service_Config::current (psg); }
| ACE_Service_Config_Guard::~ACE_Service_Config_Guard | ( | void | ) |
Definition at line 124 of file Service_Config.cpp.
{
ACE_Service_Gestalt* s = this->saved_.get ();
ACE_ASSERT (s != 0);
ACE_Service_Config::current (s);
if (ACE::debug ())
ACE_DEBUG ((LM_DEBUG,
ACE_TEXT ("ACE (%P|%t) SCG:<dtor=%@>")
ACE_TEXT (" - new repo=%@\n"),
this,
this->saved_->repo_));
}
| ACE_Service_Config_Guard::ACE_Service_Config_Guard | ( | const ACE_Service_Config_Guard & | ) | [private] |
| ACE_Service_Config_Guard& ACE_Service_Config_Guard::operator= | ( | const ACE_Service_Config_Guard & | ) | [private] |
Definition at line 680 of file Service_Config.h.
1.7.0