OPeNDAP Hyrax Back End Server (BES)
Updated for version 3.8.3
|
Provides for the orderly initialization and termination of global objects. More...
#include <BESGlobalInit.h>
Public Member Functions | |
BESGlobalInit (BESInitFun, BESTermFun, BESInitializer *nextInit, int lvl) | |
Construct an initializer object that will handle the initialization and termination of a global object. More... | |
virtual void | dump (ostream &strm) const |
dumps information about this object More... | |
virtual bool | initialize (int argc, char **argv) |
Method used to traverse a level of initialization functions. More... | |
virtual bool | terminate (void) |
Method used to traverse a level of termination functions. More... | |
virtual | ~BESGlobalInit (void) |
Provides for the orderly initialization and termination of global objects.
BESGlobalInit is an implementation of the abstration BESInitializer that provides the orderly initialization and termination of global objects. C++ does not provide such a mechanism, as global objects are created in random order. This gives the user more control over that ordering.
For a complete understanding of this global initialization mechanism please see the BESGlobalIQ documentation.
Definition at line 52 of file BESGlobalInit.h.
BESGlobalInit::BESGlobalInit | ( | BESInitFun | initFun, |
BESTermFun | termFun, | ||
BESInitializer * | nextInit, | ||
int | lvl | ||
) |
Construct an initializer object that will handle the initialization and termination of a global object.
To use this object please refer to the BESGlobalIQ documentation. It will provide the information necessary to order the initialization of your global objects including step-by-step instructions.
initFun | Function used to initialize your global object |
termFun | Function used to terminate, destroy, or clean up your global object |
nextInit | The Next BESInitializer object that holds on to the initialization and termination functions for another global object |
lvl | initialization level. There are different levels of initialization, which provides the ordering. Objects at the same level are initialized in random order. |
Definition at line 53 of file BESGlobalInit.cc.
References BESGlobalInitList.
|
virtual |
Definition at line 64 of file BESGlobalInit.cc.
|
virtual |
dumps information about this object
Displays the pointer value of this instance
strm | C++ i/o stream to dump the information to |
Implements BESInitializer.
Definition at line 131 of file BESGlobalInit.cc.
References BESInitializer::dump(), BESIndent::Indent(), BESIndent::LMarg(), and BESIndent::UnIndent().
|
virtual |
Method used to traverse a level of initialization functions.
There can be multiple levels of initialization. Level 0 will be the first global initialization functions run, level 1 will be the next set of initialization functions run. This method will run the level of objects for the level specified in the constructor.
Again, see the BESGlobalIQ documentation for a full description of how to use the global initialization mechanism.
argc | number of arguments passed in the argv argument list. This is the same as the command line argc. |
argv | the arguments passed to the initialization function. This is the same as the command line arguments argv. |
Implements BESInitializer.
Definition at line 87 of file BESGlobalInit.cc.
References BESInitializer::initialize().
|
virtual |
Method used to traverse a level of termination functions.
There can be multiple levels of initialization. Level 0 will be the first global termination functions run, level 1 will be the next set of termination functions run. This method will run the level of objects for the level specified in the constructor.
Again, see the BESGlobalIQ documentation for a full description of how to use the global initialization mechanism.
Implements BESInitializer.
Definition at line 114 of file BESGlobalInit.cc.
References BESInitializer::terminate().