summaryrefslogtreecommitdiff
path: root/ace/Service_Types.h
diff options
context:
space:
mode:
Diffstat (limited to 'ace/Service_Types.h')
-rw-r--r--ace/Service_Types.h23
1 files changed, 19 insertions, 4 deletions
diff --git a/ace/Service_Types.h b/ace/Service_Types.h
index e741561d965..de442a6b431 100644
--- a/ace/Service_Types.h
+++ b/ace/Service_Types.h
@@ -43,7 +43,8 @@ public:
ACE_Service_Type_Impl (void *object,
const ACE_TCHAR *s_name,
u_int flags = 0,
- ACE_Service_Object_Exterminator gobbler = 0);
+ ACE_Service_Object_Exterminator gobbler = 0,
+ int stype = ACE_Service_Type::INVALID_TYPE);
virtual ~ACE_Service_Type_Impl (void);
// = Pure virtual interface (must be defined by the subclass).
@@ -65,6 +66,12 @@ public:
/// Dump the state of an object.
void dump (void) const;
+ /// get the service_type of this service
+ int service_type (void) const;
+
+ /// set the service_type of this service
+ void service_type (int stype);
+
/// Declare the dynamic allocation hooks.
ACE_ALLOC_HOOK_DECLARE;
@@ -81,6 +88,11 @@ protected:
/// Flags that control serivce behavior (particularly deletion).
u_int flags_;
+
+ /// type of this service
+ /// Used to properly manage the lifecycle of ACE_Modules and ACE_Streams
+ /// during shutdown
+ int service_type_;
};
/**
@@ -96,7 +108,8 @@ public:
ACE_Service_Object_Type (void *so,
const ACE_TCHAR *name,
u_int flags = 0,
- ACE_Service_Object_Exterminator gobbler = 0);
+ ACE_Service_Object_Exterminator gobbler = 0,
+ int stype = ACE_Service_Type::SERVICE_OBJECT);
~ACE_Service_Object_Type (void);
@@ -124,7 +137,8 @@ public:
// = Initialization method.
ACE_Module_Type (void *m, // Really an ACE_Module *.
const ACE_TCHAR *identifier,
- u_int flags = 0);
+ u_int flags = 0,
+ int stype = ACE_Service_Type::MODULE);
~ACE_Module_Type (void);
@@ -164,7 +178,8 @@ public:
// = Initialization method.
ACE_Stream_Type (void *s, // Really an ACE_Stream *.
const ACE_TCHAR *identifier,
- u_int flags = 0);
+ u_int flags = 0,
+ int stype = ACE_Service_Type::STREAM);
~ACE_Stream_Type (void);