#include <Object_Manager_Base.h>
Inheritance diagram for ACE_Object_Manager_Base:
Public Types | |
enum | Object_Manager_State { OBJ_MAN_UNINITIALIZED = 0, OBJ_MAN_INITIALIZING, OBJ_MAN_INITIALIZED, OBJ_MAN_SHUTTING_DOWN, OBJ_MAN_SHUT_DOWN } |
Public Member Functions | |
virtual int | init (void)=0 |
virtual int | fini (void)=0 |
Protected Member Functions | |
ACE_Object_Manager_Base (void) | |
Default constructor. | |
virtual | ~ACE_Object_Manager_Base (void) |
Destructor. | |
int | starting_up_i (void) |
int | shutting_down_i (void) |
Protected Attributes | |
Object_Manager_State | object_manager_state_ |
State of the Object_Manager;. | |
unsigned int | dynamically_allocated_ |
ACE_Object_Manager_Base * | next_ |
Link to next Object_Manager, for chaining. | |
Private Member Functions | |
ACE_Object_Manager_Base (const ACE_Object_Manager_Base &) | |
ACE_Object_Manager_Base & | operator= (const ACE_Object_Manager_Base &) |
Encapsulates the most useful ACE_Object_Manager data structures.
Definition at line 48 of file Object_Manager_Base.h.
|
Definition at line 72 of file Object_Manager_Base.h.
00073 { 00074 OBJ_MAN_UNINITIALIZED = 0, 00075 OBJ_MAN_INITIALIZING, 00076 OBJ_MAN_INITIALIZED, 00077 OBJ_MAN_SHUTTING_DOWN, 00078 OBJ_MAN_SHUT_DOWN 00079 }; |
|
Default constructor.
Definition at line 43 of file Object_Manager_Base.cpp.
00044 : object_manager_state_ (OBJ_MAN_UNINITIALIZED) 00045 , dynamically_allocated_ (0) 00046 , next_ (0) 00047 { 00048 } |
|
Destructor.
Definition at line 50 of file Object_Manager_Base.cpp. References dynamically_allocated_.
00051 { 00052 #if defined (ACE_HAS_NONSTATIC_OBJECT_MANAGER) 00053 // Clear the flag so that fini () doesn't delete again. 00054 dynamically_allocated_ = 0; 00055 #endif /* ACE_HAS_NONSTATIC_OBJECT_MANAGER */ 00056 } |
|
|
|
Explicitly destroy. Returns 0 on success, -1 on failure because the number of fini () calls hasn't reached the number of init () calls, or 1 if it had already been called. Implemented in ACE_Object_Manager, and ACE_OS_Object_Manager. Referenced by ACE_OS_Object_Manager::fini(). |
|
Explicitly initialize. Returns 0 on success, -1 on failure due to dynamic allocation failure (in which case errno is set to ENOMEM), or 1 if it had already been called. Implemented in ACE_Object_Manager, and ACE_OS_Object_Manager. |
|
|
|
Returns 1 after ACE_Object_Manager_Base has been destroyed. This flag can be used to determine if the program is in the midst of destroying static objects. (Note that the program might destroy some static objects before this flag can return 1, if ACE_HAS_NONSTATIC_OBJECT_MANAGER is not defined.) Definition at line 65 of file Object_Manager_Base.cpp. References OBJ_MAN_INITIALIZED, and object_manager_state_. Referenced by ACE_Object_Manager::at_exit_i(), ACE_OS_Object_Manager::fini(), ACE_Object_Manager::fini(), ACE_OS_Object_Manager::shutting_down(), and ACE_Object_Manager::shutting_down().
00066 { 00067 return object_manager_state_ > OBJ_MAN_INITIALIZED; 00068 } |
|
Returns 1 before ACE_Object_Manager_Base has been constructed. This flag can be used to determine if the program is constructing static objects. If no static object spawns any threads, the program will be single-threaded when this flag returns 1. (Note that the program still might construct some static objects when this flag returns 0, if ACE_HAS_NONSTATIC_OBJECT_MANAGER is not defined.) Definition at line 59 of file Object_Manager_Base.cpp. References OBJ_MAN_INITIALIZED, and object_manager_state_. Referenced by ACE_OS_Object_Manager::init(), ACE_Object_Manager::init(), ACE_OS_Object_Manager::starting_up(), and ACE_Object_Manager::starting_up().
00060 { 00061 return object_manager_state_ < OBJ_MAN_INITIALIZED; 00062 } |
|
Flag indicating whether the ACE_Object_Manager was dynamically allocated by ACE. (If is was dynamically allocated by the application, then the application is responsible for destroying it.) Definition at line 111 of file Object_Manager_Base.h. Referenced by ACE_OS_Object_Manager::instance(), ACE_Object_Manager::instance(), and ~ACE_Object_Manager_Base(). |
|
Link to next Object_Manager, for chaining.
Definition at line 114 of file Object_Manager_Base.h. Referenced by ACE_Object_Manager::init(). |
|
State of the Object_Manager;.
Definition at line 103 of file Object_Manager_Base.h. Referenced by shutting_down_i(), and starting_up_i(). |