NAME
ACE_Object_Manager_Base -
Base class for ACE_Object_Manager(s).
SYNOPSIS
#include <ace/OS.h>
class ACE_Object_Manager_Base
{
public:
inline (defined (__DECCXX_VER) && __DECCXX_VER < 60000000);
virtual int init (void) = 0;
virtual int fini (void) = 0;
enum Object_Manager_State{ OBJ_MAN_UNINITIALIZED = 0,
OBJ_MAN_INITIALIZING,
OBJ_MAN_INITIALIZED,
OBJ_MAN_SHUTTING_DOWN,
OBJ_MAN_SHUT_DOWN };
protected:
ACE_Object_Manager_Base (void);
virtual ~ACE_Object_Manager_Base (void);
int starting_up_i (void);
int shutting_down_i (void);
Object_Manager_State object_manager_state_;
u_int dynamically_allocated_;
ACE_Object_Manager_Base *next_;
private:
ACE_Object_Manager_Base (const ACE_Object_Manager_Base &);
ACE_Object_Manager_Base &operator= (
const ACE_Object_Manager_Base &
);
};
DESCRIPTION
Encapsulates the most useful ACE_Object_Manager data structures.
PUBLIC MEMBERS
inline (defined (__DECCXX_VER) && __DECCXX_VER < 60000000);
The Diab compiler got confused and complained about access rights
if this section was protected (changing this to public makes it happy).
Similarly, DEC CXX 5.6 needs the methods to be public.
virtual int init (void) = 0;
Explicitly initialize. Returns 0 on success, -1 on failure
due to either already having been initialized, or dynamic
allocation failure (in which case errno is set to ENOMEM).
virtual int fini (void) = 0;
Explicitly destroy. Returns 0 on success, -1 on failure due to
already having been destroyed, or 1 because the number of fini ()
calls hasn't reached the number of init () calls.
PROTECTED MEMBERS
ACE_Object_Manager_Base (void);
virtual ~ACE_Object_Manager_Base (void);
int starting_up_i (void);
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.)
int shutting_down_i (void);
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.)
Object_Manager_State object_manager_state_;
State of the Object_Manager;
u_int dynamically_allocated_;
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.)
ACE_Object_Manager_Base *next_;
Link to next Object_Manager, for chaining.
PRIVATE MEMBERS
ACE_Object_Manager_Base (const ACE_Object_Manager_Base &);
ACE_Object_Manager_Base &operator= (const ACE_Object_Manager_Base &);
AUTHOR
Doug Schmidt schmidt@cs.wustl.edu
, Jesper S. M|ller
stophph@diku.dk
, and a cast of thousands...
The ACE_Sched_Priority type should be used for platform-
independent thread and process priorities, by convention.
int should be used for OS-specific priorities.
typedef for the _stat data structure
Giving unique ACE scoped names for some important
RTSignal-Related constants. Becuase sometimes, different
platforms use different names for these constants.
LIBRARY
ace