Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members   Related Pages  

ACE_Object_Manager_Base Class Reference

Base class for ACE_Object_Manager(s). More...

#include <OS.h>

Inheritance diagram for ACE_Object_Manager_Base:

Inheritance graph
[legend]
Collaboration diagram for ACE_Object_Manager_Base:

Collaboration graph
[legend]
List of all members.

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 Methods

virtual int init (void)=0
virtual int fini (void)=0

Protected Methods

 ACE_Object_Manager_Base (void)
 Default constructor. More...

virtual ~ACE_Object_Manager_Base (void)
 Destructor. More...

int starting_up_i (void)
int shutting_down_i (void)

Protected Attributes

Object_Manager_State object_manager_state_
 State of the Object_Manager;. More...

u_int dynamically_allocated_
ACE_Object_Manager_Base * next_
 Link to next Object_Manager, for chaining. More...


Private Methods

 ACE_Object_Manager_Base (const ACE_Object_Manager_Base &)
ACE_Object_Manager_Base & operator= (const ACE_Object_Manager_Base &)

Detailed Description

Base class for ACE_Object_Manager(s).

Encapsulates the most useful ACE_Object_Manager data structures.

Definition at line 6146 of file OS.h.


Member Enumeration Documentation

enum ACE_Object_Manager_Base::Object_Manager_State
 

Enumeration values:
OBJ_MAN_UNINITIALIZED 
OBJ_MAN_INITIALIZING 
OBJ_MAN_INITIALIZED 
OBJ_MAN_SHUTTING_DOWN 
OBJ_MAN_SHUT_DOWN 

Definition at line 6178 of file OS.h.


Constructor & Destructor Documentation

ACE_Object_Manager_Base::ACE_Object_Manager_Base void    [protected]
 

Default constructor.

Definition at line 6516 of file OS.cpp.

06517   : object_manager_state_ (OBJ_MAN_UNINITIALIZED)
06518   , dynamically_allocated_ (0)
06519   , next_ (0)
06520 {
06521 }

ACE_Object_Manager_Base::~ACE_Object_Manager_Base void    [protected, virtual]
 

Destructor.

Definition at line 6523 of file OS.cpp.

References dynamically_allocated_.

06524 {
06525 #if defined (ACE_HAS_NONSTATIC_OBJECT_MANAGER)
06526   // Clear the flag so that fini () doesn't delete again.
06527   dynamically_allocated_ = 0;
06528 #endif /* ACE_HAS_NONSTATIC_OBJECT_MANAGER */
06529 }

ACE_Object_Manager_Base::ACE_Object_Manager_Base const ACE_Object_Manager_Base &    [private]
 


Member Function Documentation

virtual int ACE_Object_Manager_Base::fini void    [pure virtual]
 

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.

Referenced by ACE_OS_Object_Manager::fini.

virtual int ACE_Object_Manager_Base::init void    [pure virtual]
 

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.

ACE_Object_Manager_Base& ACE_Object_Manager_Base::operator= const ACE_Object_Manager_Base &    [private]
 

int ACE_Object_Manager_Base::shutting_down_i void    [protected]
 

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 6538 of file OS.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.

06539 {
06540   return object_manager_state_ > OBJ_MAN_INITIALIZED;
06541 }

int ACE_Object_Manager_Base::starting_up_i void    [protected]
 

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 6532 of file OS.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.

06533 {
06534   return object_manager_state_ < OBJ_MAN_INITIALIZED;
06535 }


Member Data Documentation

u_int ACE_Object_Manager_Base::dynamically_allocated_ [protected]
 

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 6217 of file OS.h.

Referenced by ACE_OS_Object_Manager::instance, ACE_Object_Manager::instance, ACE_Object_Manager::~ACE_Object_Manager, ~ACE_Object_Manager_Base, and ACE_OS_Object_Manager::~ACE_OS_Object_Manager.

ACE_Object_Manager_Base* ACE_Object_Manager_Base::next_ [protected]
 

Link to next Object_Manager, for chaining.

Definition at line 6220 of file OS.h.

Referenced by ACE_OS_Object_Manager::fini, and ACE_Object_Manager::init.

Object_Manager_State ACE_Object_Manager_Base::object_manager_state_ [protected]
 

State of the Object_Manager;.

Definition at line 6209 of file OS.h.

Referenced by ACE_OS_Object_Manager::fini, ACE_Object_Manager::fini, ACE_OS_Object_Manager::init, ACE_Object_Manager::init, shutting_down_i, and starting_up_i.


The documentation for this class was generated from the following files:
Generated on Mon Jun 16 12:51:18 2003 for ACE by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002