summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorschmidt <douglascraigschmidt@users.noreply.github.com>1997-09-12 03:37:51 +0000
committerschmidt <douglascraigschmidt@users.noreply.github.com>1997-09-12 03:37:51 +0000
commitf324b831958855fb9f9f8030d9ae9fadcb410b82 (patch)
treeb7abff4feff6894c93ec2ec491fcc93a0df9199c
parentb28d9da6e806044a8f8079cc902d3b295b4d484f (diff)
downloadATCD-f324b831958855fb9f9f8030d9ae9fadcb410b82.tar.gz
*** empty log message ***
-rw-r--r--ChangeLog-97b20
-rw-r--r--ace/Dynamic_Service.cpp4
-rw-r--r--ace/Parse_Node.cpp10
-rw-r--r--ace/Parse_Node.h10
-rw-r--r--ace/README2
-rw-r--r--ace/Service_Config.cpp14
-rw-r--r--ace/Service_Config.h4
-rw-r--r--ace/Service_Manager.cpp2
-rw-r--r--ace/Service_Object.cpp86
-rw-r--r--ace/Service_Object.h82
-rw-r--r--ace/Service_Object.i55
-rw-r--r--ace/Service_Record.i84
-rw-r--r--ace/Service_Repository.cpp22
-rw-r--r--ace/Service_Repository.h25
-rw-r--r--ace/Service_Types.cpp (renamed from ace/Service_Record.cpp)119
-rw-r--r--ace/Service_Types.h172
-rw-r--r--ace/Service_Types.i50
-rw-r--r--ace/Strategies_T.cpp8
-rw-r--r--ace/Svc_Conf.h6
-rw-r--r--ace/Svc_Conf.y20
-rw-r--r--ace/Svc_Conf_y.cpp20
-rw-r--r--ace/makefile-light6
22 files changed, 519 insertions, 302 deletions
diff --git a/ChangeLog-97b b/ChangeLog-97b
index fae58fd329d..756ec55f81c 100644
--- a/ChangeLog-97b
+++ b/ChangeLog-97b
@@ -1,4 +1,22 @@
-Thu Sep 11 15:22:51 1997 Douglas C. Schmidt <schmidt@tango.cs.wustl.edu>
+Thu Sep 11 21:07:25 1997 Douglas C. Schmidt <schmidt@flamenco.cs.wustl.edu>
+
+ * ace/Service_Object.h: Moved the ACE_Service_Type class into the
+ Service_Object.h file since this is "publically" visible to
+ applications.
+
+ * ace/Service_Types.h: Improved the documentation of the
+ ACE_Service_Type subclass implementations.
+
+ * ace/Service_Types: Changed the name next_ to link_ to be
+ consistent with the accessor name.
+
+ * ace: Renamed Service_Record.{h,i,cpp} to Service_Types.{h,i,cpp}
+ to reflect the recent change in names.
+
+ * ace/Service_Object.h: Renamed ACE_Service_Type to
+ ACE_Service_Type_Impl and ACE_Service_Record to ACE_Service_Type
+ in order to emphasize the use of the Bridge pattern. Thanks to
+ Eric Newton for motivating this.
* ace/Svc_Conf.y: Removed the warning about Service name being
different from Module name. I'm not sure why this was
diff --git a/ace/Dynamic_Service.cpp b/ace/Dynamic_Service.cpp
index 8cb84b90ff4..1d8300ae28d 100644
--- a/ace/Dynamic_Service.cpp
+++ b/ace/Dynamic_Service.cpp
@@ -25,12 +25,12 @@ template <class SERVICE> SERVICE *
ACE_Dynamic_Service<SERVICE>::instance (const char *name)
{
ACE_TRACE ("ACE_Dynamic_Service::instance");
- const ACE_Service_Record *svc_rec;
+ const ACE_Service_Type *svc_rec;
if (ACE_Service_Repository::instance ()->find (name, &svc_rec) == -1)
ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "svc_rep"), 0);
- const ACE_Service_Type *type = svc_rec->type ();
+ const ACE_Service_Type_Impl *type = svc_rec->type ();
if (type == 0)
ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "type"), 0);
diff --git a/ace/Parse_Node.cpp b/ace/Parse_Node.cpp
index a6a0b7478e0..6b4ff230331 100644
--- a/ace/Parse_Node.cpp
+++ b/ace/Parse_Node.cpp
@@ -195,7 +195,7 @@ ACE_Remove_Node::apply (void)
}
-ACE_Dynamic_Node::ACE_Dynamic_Node (const ACE_Service_Record *sr,
+ACE_Dynamic_Node::ACE_Dynamic_Node (const ACE_Service_Type *sr,
char *parms)
: ACE_Static_Node (sr->name (), parms),
record_ (sr)
@@ -203,7 +203,7 @@ ACE_Dynamic_Node::ACE_Dynamic_Node (const ACE_Service_Record *sr,
ACE_TRACE ("ACE_Dynamic_Node::ACE_Dynamic_Node");
}
-const ACE_Service_Record *
+const ACE_Service_Type *
ACE_Dynamic_Node::record (void) const
{
ACE_TRACE ("ACE_Dynamic_Node::record");
@@ -252,14 +252,14 @@ ACE_Static_Node::ACE_Static_Node (const char *nm,
ACE_TRACE ("ACE_Static_Node::ACE_Static_Node");
}
-const ACE_Service_Record *
+const ACE_Service_Type *
ACE_Static_Node::record (void) const
{
ACE_TRACE ("ACE_Static_Node::record");
- ACE_Service_Record *sr;
+ ACE_Service_Type *sr;
if (ACE_Service_Repository::instance()->find (this->name (),
- (const ACE_Service_Record **) &sr) == -1)
+ (const ACE_Service_Type **) &sr) == -1)
return 0;
else
return sr;
diff --git a/ace/Parse_Node.h b/ace/Parse_Node.h
index 05f95bb1323..16bc566fd69 100644
--- a/ace/Parse_Node.h
+++ b/ace/Parse_Node.h
@@ -17,7 +17,7 @@
#if !defined (ACE_PARSE_NODE_H)
#define ACE_PARSE_NODE_H
-#include "ace/Service_Record.h"
+#include "ace/Service_Types.h"
class ACE_Export ACE_Parse_Node
// = TITLE
@@ -104,7 +104,7 @@ public:
virtual ~ACE_Static_Node (void);
virtual void apply (void);
- virtual const ACE_Service_Record *record (void) const;
+ virtual const ACE_Service_Type *record (void) const;
char *parameters (void) const;
void dump (void) const;
@@ -122,10 +122,10 @@ class ACE_Export ACE_Dynamic_Node : public ACE_Static_Node
// Handle a dynamically linked node.
{
public:
- ACE_Dynamic_Node (const ACE_Service_Record *, char *params);
+ ACE_Dynamic_Node (const ACE_Service_Type *, char *params);
virtual ~ACE_Dynamic_Node (void);
- virtual const ACE_Service_Record *record (void) const;
+ virtual const ACE_Service_Type *record (void) const;
virtual void apply (void);
void dump (void) const;
@@ -135,7 +135,7 @@ public:
// Declare the dynamic allocation hooks.
private:
- const ACE_Service_Record *record_;
+ const ACE_Service_Type *record_;
};
class ACE_Export ACE_Stream_Node : public ACE_Parse_Node
diff --git a/ace/README b/ace/README
index f52e4ec40a7..52bf154c23f 100644
--- a/ace/README
+++ b/ace/README
@@ -787,7 +787,7 @@ ACE_HAS_THREADS:
include/Queue.h
include/STREAM.h
include/Stream_Modules.h
- include/Service_Record.h
+ include/Service_Types.h
include/Thread_Spawn.h
include/Synch.h
include/Thr_Manager.h
diff --git a/ace/Service_Config.cpp b/ace/Service_Config.cpp
index 693bf4a9934..fc51931484e 100644
--- a/ace/Service_Config.cpp
+++ b/ace/Service_Config.cpp
@@ -8,7 +8,7 @@
#include "ace/Malloc.h"
#include "ace/Service_Manager.h"
#include "ace/Service_Repository.h"
-#include "ace/Service_Record.h"
+#include "ace/Service_Types.h"
#include "ace/Containers.h"
#include "ace/Auto_Ptr.h"
@@ -281,12 +281,12 @@ ACE_Service_Config::initialize (const char svc_name[],
{
ACE_TRACE ("ACE_Service_Config::initialize");
ACE_ARGV args (parameters);
- ACE_Service_Record *srp = 0;
+ ACE_Service_Type *srp = 0;
ACE_DEBUG ((LM_DEBUG, "opening static service %s\n", svc_name));
if (ACE_Service_Repository::instance()->find (svc_name,
- (const ACE_Service_Record **) &srp) == -1)
+ (const ACE_Service_Type **) &srp) == -1)
ACE_ERROR_RETURN ((LM_ERROR, "%s not found\n", svc_name), -1);
else if (srp->type ()->init (args.argc (), args.argv ()) == -1)
@@ -303,7 +303,7 @@ ACE_Service_Config::initialize (const char svc_name[],
// the designated shared object in this file.
int
-ACE_Service_Config::initialize (const ACE_Service_Record *sr,
+ACE_Service_Config::initialize (const ACE_Service_Type *sr,
char parameters[])
{
ACE_TRACE ("ACE_Service_Config::initialize");
@@ -378,7 +378,7 @@ ACE_Service_Config::load_static_svcs (void)
{
ACE_Static_Svc_Descriptor *ssd = *ssdp;
- ACE_Service_Type *stp =
+ ACE_Service_Type_Impl *stp =
ace_create_service_type (ssd->name_,
ssd->type_,
(const void *) (*ssd->alloc_)(),
@@ -386,9 +386,9 @@ ACE_Service_Config::load_static_svcs (void)
if (stp == 0)
continue;
- ACE_Service_Record *sr;
+ ACE_Service_Type *sr;
- ACE_NEW_RETURN (sr, ACE_Service_Record (ssd->name_, stp,
+ ACE_NEW_RETURN (sr, ACE_Service_Type (ssd->name_, stp,
0, ssd->active_), -1);
if (ACE_Service_Repository::instance()->insert (sr) == -1)
diff --git a/ace/Service_Config.h b/ace/Service_Config.h
index 9f6a1a7acb6..f1adbcccd64 100644
--- a/ace/Service_Config.h
+++ b/ace/Service_Config.h
@@ -24,7 +24,7 @@
// Forward decl.
class ACE_Service_Repository;
-class ACE_Service_Record;
+class ACE_Service_Type;
class ACE_Allocator;
class ACE_Reactor;
class ACE_Proactor;
@@ -283,7 +283,7 @@ public:
// = Member functions used by various other parts
// of the Service Configurator class category.
- static int initialize (const ACE_Service_Record *, char parameters[]);
+ static int initialize (const ACE_Service_Type *, char parameters[]);
// Dynamically link the shared object file and retrieve
// a pointer to the designated shared object in this file.
diff --git a/ace/Service_Manager.cpp b/ace/Service_Manager.cpp
index 0590c5eac4b..6c1df9b23c5 100644
--- a/ace/Service_Manager.cpp
+++ b/ace/Service_Manager.cpp
@@ -149,7 +149,7 @@ ACE_Service_Manager::list_services (void)
ACE_TRACE ("ACE_Service_Manager::list_services");
ACE_Service_Repository_Iterator sri (*ACE_Service_Repository::instance ());
- for (const ACE_Service_Record *sr;
+ for (const ACE_Service_Type *sr;
sri.next (sr) != 0;
sri.advance ())
{
diff --git a/ace/Service_Object.cpp b/ace/Service_Object.cpp
index 881f07e002b..b11ec4c0888 100644
--- a/ace/Service_Object.cpp
+++ b/ace/Service_Object.cpp
@@ -11,73 +11,73 @@
ACE_ALLOC_HOOK_DEFINE(ACE_Service_Object)
-ACE_Service_Object::ACE_Service_Object (void)
+ACE_ALLOC_HOOK_DEFINE(ACE_Service_Type)
+
+void
+ACE_Service_Type::dump (void) const
{
- ACE_TRACE ("ACE_Service_Object::ACE_Service_Object");
+ ACE_TRACE ("ACE_Service_Type::dump");
}
-ACE_Service_Object::~ACE_Service_Object (void)
+ACE_Service_Type::ACE_Service_Type (const char *n,
+ ACE_Service_Type_Impl *t,
+ const ACE_SHLIB_HANDLE h,
+ int active)
+ : name_ (0),
+ type_ (t),
+ handle_ (h),
+ active_ (active)
{
- ACE_TRACE ("ACE_Service_Object::~ACE_Service_Object");
+ ACE_TRACE ("ACE_Service_Type::ACE_Service_Type");
+ this->name (n);
}
-int
-ACE_Service_Object::suspend (void)
+ACE_Service_Type::~ACE_Service_Type (void)
{
- ACE_TRACE ("ACE_Service_Object::suspend");
- return 0;
+ ACE_TRACE ("ACE_Service_Type::~ACE_Service_Type");
+ this->type_->fini ();
+ if (this->handle_ != 0)
+ ACE_OS::dlclose ((ACE_SHLIB_HANDLE) this->handle_);
+ delete [] (char *) this->name_;
}
-int
-ACE_Service_Object::resume (void)
+void
+ACE_Service_Type::suspend (void) const
{
- ACE_TRACE ("ACE_Service_Object::resume");
- return 0;
+ ACE_TRACE ("ACE_Service_Type::suspend");
+ ((ACE_Service_Type *) this)->active_ = 0;
+ this->type_->suspend ();
}
-ACE_ALLOC_HOOK_DEFINE(ACE_Service_Type)
-
void
-ACE_Service_Type::dump (void) const
+ACE_Service_Type::resume (void) const
{
- ACE_TRACE ("ACE_Service_Type::dump");
+ ACE_TRACE ("ACE_Service_Type::resume");
+ ((ACE_Service_Type *) this)->active_ = 1;
+ this->type_->resume ();
}
-ACE_Service_Type::ACE_Service_Type (const void *so,
- const char *s_name,
- unsigned int f)
- : name_ (0),
- obj_ (so),
- flags_ (f)
+ACE_Service_Object::ACE_Service_Object (void)
{
- ACE_TRACE ("ACE_Service_Type::ACE_Service_Type");
- this->name (s_name);
+ ACE_TRACE ("ACE_Service_Object::ACE_Service_Object");
}
-ACE_Service_Type::~ACE_Service_Type (void)
+ACE_Service_Object::~ACE_Service_Object (void)
{
- ACE_TRACE ("ACE_Service_Type::~ACE_Service_Type");
-
- // It's ok to call this, even though we may have already deleted it
- // in the fini() method since it would then be NULL.
- delete [] (char *) this->name_;
+ ACE_TRACE ("ACE_Service_Object::~ACE_Service_Object");
}
int
-ACE_Service_Type::fini (void) const
+ACE_Service_Object::suspend (void)
{
- ACE_TRACE ("ACE_Service_Type::fini");
- ACE_DEBUG ((LM_DEBUG, "destroying %s, flags = %d\n",
- this->name_, this->flags_));
-
- delete [] (char *) this->name_;
- ((ACE_Service_Type *) this)->name_ = 0;
-
- if (ACE_BIT_ENABLED (this->flags_, ACE_Service_Type::DELETE_OBJ))
- operator delete ((void *) this->object ()); // cast to remove const-ness
-
- if (ACE_BIT_ENABLED (this->flags_, ACE_Service_Type::DELETE_THIS))
- delete (ACE_Service_Type *) this;
+ ACE_TRACE ("ACE_Service_Object::suspend");
+ return 0;
+}
+int
+ACE_Service_Object::resume (void)
+{
+ ACE_TRACE ("ACE_Service_Object::resume");
return 0;
}
+
diff --git a/ace/Service_Object.h b/ace/Service_Object.h
index ac7131b8266..0c83733f1e5 100644
--- a/ace/Service_Object.h
+++ b/ace/Service_Object.h
@@ -22,7 +22,14 @@
class ACE_Export ACE_Service_Object : public ACE_Event_Handler, public ACE_Shared_Object
// = TITLE
- // Provide the abstract base class common to all services
+ // Provide the abstract base class common to all service
+ // implementations.
+ //
+ // = DESCRIPTION
+ // Classes that inherit from <ACE_Service_Objects> are capable
+ // of being registered with the <ACE_Reactor> (due to the
+ // <ACE_Event_Handler>, as well as being dynamically linked by
+ // the <ACE_Service_Config> (due to the <ACE_Shared_Object>).
{
public:
// = Initialization and termination methods.
@@ -30,44 +37,54 @@ public:
virtual ~ACE_Service_Object (void);
virtual int suspend (void);
- // Temporarily disable a service without removing it completely
+ // Temporarily disable a service without removing it completely.
+
virtual int resume (void);
- // Re-enable a previously suspended service
+ // Re-enable a previously suspended service.
};
+// Forward decl.
+class ACE_Service_Type_Impl;
+
class ACE_Export ACE_Service_Type
// = TITLE
- // Provide the class hierarchy that defines the contents of
- // the Service Repository search structure.
+ // Keeps track of information related to the various
+ // <ACE_Service_Type_Impl> subclasses.
+ //
+ // = DESCRIPTION
+ // This class acts as the interface of the "Bridge" pattern.
{
public:
enum
{
- DELETE_OBJ = 1, // Delete the payload object.
- DELETE_THIS = 2 // Delete the enclosing object.
+ DELETE_OBJ = 1,
+ // Delete the payload object.
+
+ DELETE_THIS = 2
+ // Delete the enclosing object.
};
// = Initialization and termination methods.
- ACE_Service_Type (const void *object,
- const char *s_name,
- u_int flags = 0);
- virtual ~ACE_Service_Type (void);
+ ACE_Service_Type (const char *n,
+ ACE_Service_Type_Impl *o,
+ const ACE_SHLIB_HANDLE handle,
+ int active);
+ ~ACE_Service_Type (void);
+
+ const char *name (void) const;
+ void name (const char *);
- // = Pure virtual interface (must be defined by the subclass).
- virtual int suspend (void) const = 0;
- virtual int resume (void) const = 0;
- virtual int init (int argc, char *argv[]) const = 0;
- virtual int fini (void) const;
- virtual int info (char **str, size_t len) const = 0;
+ const ACE_Service_Type_Impl *type (void) const;
+ void type (const ACE_Service_Type_Impl *,
+ int active = 1);
- const void *object (void) const;
- // The pointer to the service.
+ ACE_SHLIB_HANDLE handle (void) const;
+ void handle (const ACE_SHLIB_HANDLE);
- const char *name (void) const;
- // Get the name of the service.
-
- void name (const char *);
- // Set the name of the service.
+ void suspend (void) const;
+ void resume (void) const;
+ int active (void) const;
+ void active (int);
void dump (void) const;
// Dump the state of an object.
@@ -75,15 +92,18 @@ public:
ACE_ALLOC_HOOK_DECLARE;
// Declare the dynamic allocation hooks.
-protected:
- const char *name_;
- // Name of the service.
+private:
+ const char *name_;
+ // Humanly readible name of svc.
+
+ const ACE_Service_Type_Impl *type_;
+ // Pointer to C++ object that implements the svc.
- const void *obj_;
- // Pointer to object that implements the service.
+ ACE_SHLIB_HANDLE handle_;
+ // Handle to shared object file (non-zero if dynamically linked).
- u_int flags_;
- // Flags that control serivce behavior (particularly deletion).
+ int active_;
+ // 1 if svc is currently active, otherwise 0.
};
class ACE_Export ACE_Service_Object_Ptr
diff --git a/ace/Service_Object.i b/ace/Service_Object.i
index a51b36a1740..0f55fa6226d 100644
--- a/ace/Service_Object.i
+++ b/ace/Service_Object.i
@@ -19,13 +19,6 @@ ACE_Service_Object_Ptr::operator-> ()
return this->service_object_;
}
-ACE_INLINE const void *
-ACE_Service_Type::object (void) const
-{
- ACE_TRACE ("ACE_Service_Type::object");
- return this->obj_;
-}
-
ACE_INLINE const char *
ACE_Service_Type::name (void) const
{
@@ -33,12 +26,54 @@ ACE_Service_Type::name (void) const
return this->name_;
}
-ACE_INLINE void
+ACE_INLINE const ACE_Service_Type_Impl *
+ACE_Service_Type::type (void) const
+{
+ ACE_TRACE ("ACE_Service_Type::type");
+ return this->type_;
+}
+
+ACE_INLINE ACE_SHLIB_HANDLE
+ACE_Service_Type::handle (void) const
+{
+ ACE_TRACE ("ACE_Service_Type::handle");
+ return this->handle_;
+}
+
+ACE_INLINE void
ACE_Service_Type::name (const char *n)
{
ACE_TRACE ("ACE_Service_Type::name");
delete [] (char *) this->name_;
- ACE_NEW (this->name_, char[::strlen (n) + 1]);
- ACE_OS::strcpy ((char *) this->name_, n);
+ this->name_ = ACE_OS::strcpy (new char [::strlen (n) + 1], n);
+}
+
+ACE_INLINE void
+ACE_Service_Type::type (const ACE_Service_Type_Impl *o, int enabled)
+{
+ ACE_TRACE ("ACE_Service_Type::type");
+ this->type_ = o;
+ ((ACE_Service_Type *) this)->active_ = enabled;
+}
+
+ACE_INLINE void
+ACE_Service_Type::handle (const ACE_SHLIB_HANDLE h)
+{
+ ACE_TRACE ("ACE_Service_Type::handle");
+ this->handle_ = h;
+}
+
+ACE_INLINE int
+ACE_Service_Type::active (void) const
+{
+ ACE_TRACE ("ACE_Service_Type::active");
+ return this->active_ != 0;
+}
+
+ACE_INLINE void
+ACE_Service_Type::active (int turnon)
+{
+ ACE_TRACE ("ACE_Service_Type::active");
+ this->active_ = turnon;
}
diff --git a/ace/Service_Record.i b/ace/Service_Record.i
deleted file mode 100644
index 5246fa195e1..00000000000
--- a/ace/Service_Record.i
+++ /dev/null
@@ -1,84 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// Service_Record.i
-
-ACE_INLINE int
-ACE_Service_Object_Type::suspend (void) const
-{
- ACE_TRACE ("ACE_Service_Object_Type::suspend");
- return ((ACE_Service_Object *) this->object ())->suspend ();
-}
-
-ACE_INLINE int
-ACE_Service_Object_Type::resume (void) const
-{
- ACE_TRACE ("ACE_Service_Object_Type::resume");
- return ((ACE_Service_Object *) this->object ())->resume ();
-}
-
-ACE_INLINE int
-ACE_Service_Object_Type::info (char **str, size_t len) const
-{
- ACE_TRACE ("ACE_Service_Object_Type::info");
- return ((ACE_Service_Object *) this->object ())->info (str, len);
-}
-
-ACE_INLINE const char *
-ACE_Service_Record::name (void) const
-{
- ACE_TRACE ("ACE_Service_Record::name");
- return this->name_;
-}
-
-ACE_INLINE const ACE_Service_Type *
-ACE_Service_Record::type (void) const
-{
- ACE_TRACE ("ACE_Service_Record::type");
- return this->type_;
-}
-
-ACE_INLINE ACE_SHLIB_HANDLE
-ACE_Service_Record::handle (void) const
-{
- ACE_TRACE ("ACE_Service_Record::handle");
- return this->handle_;
-}
-
-ACE_INLINE void
-ACE_Service_Record::name (const char *n)
-{
- ACE_TRACE ("ACE_Service_Record::name");
-
- delete [] (char *) this->name_;
- this->name_ = ACE_OS::strcpy (new char [::strlen (n) + 1], n);
-}
-
-ACE_INLINE void
-ACE_Service_Record::type (const ACE_Service_Type *o, int enabled)
-{
- ACE_TRACE ("ACE_Service_Record::type");
- this->type_ = o;
- ((ACE_Service_Record *) this)->active_ = enabled;
-}
-
-ACE_INLINE void
-ACE_Service_Record::handle (const ACE_SHLIB_HANDLE h)
-{
- ACE_TRACE ("ACE_Service_Record::handle");
- this->handle_ = h;
-}
-
-ACE_INLINE int
-ACE_Service_Record::active (void) const
-{
- ACE_TRACE ("ACE_Service_Record::active");
- return this->active_ != 0;
-}
-
-ACE_INLINE void
-ACE_Service_Record::active (int turnon)
-{
- ACE_TRACE ("ACE_Service_Record::active");
- this->active_ = turnon;
-}
diff --git a/ace/Service_Repository.cpp b/ace/Service_Repository.cpp
index ae55791c66c..02fc0db4a86 100644
--- a/ace/Service_Repository.cpp
+++ b/ace/Service_Repository.cpp
@@ -91,7 +91,7 @@ ACE_Service_Repository::open (int size)
this->total_size_ = size;
this->service_vector_ =
- (const ACE_Service_Record **) new ACE_Service_Record *[size];
+ (const ACE_Service_Type **) new ACE_Service_Type *[size];
if (this->service_vector_ == 0)
{
errno = ENOMEM;
@@ -126,7 +126,7 @@ ACE_Service_Repository::close (void)
{
ACE_DEBUG ((LM_DEBUG, "shutting down %s\n",
this->service_vector_[i]->name ()));
- delete (ACE_Service_Record *) this->service_vector_[i];
+ delete (ACE_Service_Type *) this->service_vector_[i];
}
delete [] this->service_vector_;
@@ -151,7 +151,7 @@ ACE_Service_Repository::~ACE_Service_Repository (void)
int
ACE_Service_Repository::find_i (const char name[],
- const ACE_Service_Record **srp,
+ const ACE_Service_Type **srp,
int ignore_suspended)
{
ACE_TRACE ("ACE_Service_Repository::find_i");
@@ -175,7 +175,7 @@ ACE_Service_Repository::find_i (const char name[],
int
ACE_Service_Repository::find (const char name[],
- const ACE_Service_Record **srp,
+ const ACE_Service_Type **srp,
int ignore_suspended)
{
ACE_TRACE ("ACE_Service_Repository::find");
@@ -185,11 +185,11 @@ ACE_Service_Repository::find (const char name[],
}
-// Insert the ACE_Service_Record SR into the repository. Note that
+// Insert the ACE_Service_Type SR into the repository. Note that
// services may be inserted either resumed or suspended.
int
-ACE_Service_Repository::insert (const ACE_Service_Record *sr)
+ACE_Service_Repository::insert (const ACE_Service_Type *sr)
{
ACE_TRACE ("ACE_Service_Repository::insert");
ACE_MT (ACE_GUARD_RETURN (ACE_Thread_Mutex, ace_mon, this->lock_, -1));
@@ -205,7 +205,7 @@ ACE_Service_Repository::insert (const ACE_Service_Record *sr)
// Check for self-assignment...
if (sr == this->service_vector_[i])
return 0;
- delete (ACE_Service_Record *) this->service_vector_[i];
+ delete (ACE_Service_Type *) this->service_vector_[i];
this->service_vector_[i] = sr;
return 0;
}
@@ -223,7 +223,7 @@ ACE_Service_Repository::insert (const ACE_Service_Record *sr)
int
ACE_Service_Repository::resume (const char name[],
- const ACE_Service_Record **srp)
+ const ACE_Service_Type **srp)
{
ACE_TRACE ("ACE_Service_Repository::resume");
ACE_MT (ACE_GUARD_RETURN (ACE_Thread_Mutex, ace_mon, this->lock_, -1));
@@ -242,7 +242,7 @@ ACE_Service_Repository::resume (const char name[],
int
ACE_Service_Repository::suspend (const char name[],
- const ACE_Service_Record **srp)
+ const ACE_Service_Type **srp)
{
ACE_TRACE ("ACE_Service_Repository::suspend");
ACE_MT (ACE_GUARD_RETURN (ACE_Thread_Mutex, ace_mon, this->lock_, -1));
@@ -272,7 +272,7 @@ ACE_Service_Repository::remove (const char name[])
return -1;
else
{
- delete (ACE_Service_Record *) this->service_vector_[i];
+ delete (ACE_Service_Type *) this->service_vector_[i];
if (--this->current_size_ >= 1)
this->service_vector_[i]
@@ -306,7 +306,7 @@ ACE_Service_Repository_Iterator::ACE_Service_Repository_Iterator
// are no more entries, returns 0, else 1.
int
-ACE_Service_Repository_Iterator::next (const ACE_Service_Record *&sr)
+ACE_Service_Repository_Iterator::next (const ACE_Service_Type *&sr)
{
ACE_TRACE ("ACE_Service_Repository_Iterator::next");
if (this->next_ < this->svc_rep_.current_size_)
diff --git a/ace/Service_Repository.h b/ace/Service_Repository.h
index c21127b5008..168755c620f 100644
--- a/ace/Service_Repository.h
+++ b/ace/Service_Repository.h
@@ -17,12 +17,17 @@
#if !defined (ACE_SERVICE_REPOSITORY_H)
#define ACE_SERVICE_REPOSITORY_H
-#include "ace/Service_Record.h"
+#include "ace/Service_Types.h"
class ACE_Export ACE_Service_Repository
// = TITLE
- // Provide the abstract base class that supplies common server
- // repository operations.
+ // A container for all services offered by a Service
+ // Configurator-based application. This allows an
+ // administrative entity to centrally manage and control the
+ // behavior of application services.
+ //
+ // = DESCRIPTION
+ // This class contains a vector of <ACE_Service_Types> *'s.
{
friend class ACE_Service_Repository_Iterator;
public:
@@ -55,11 +60,11 @@ public:
// = Search structure operations (all acquire locks as necessary).
- int insert (const ACE_Service_Record *);
+ int insert (const ACE_Service_Type *);
// Insert a new service record.
int find (const char name[],
- const ACE_Service_Record **srp = 0,
+ const ACE_Service_Type **srp = 0,
int ignore_suspended = 1);
// Locate an entry with <name> in the table. If <ignore_suspended>
// is set then only consider services marked as resumed. If the
@@ -72,10 +77,10 @@ public:
// Remove an existing service record.
// = Liveness control
- int resume (const char[], const ACE_Service_Record ** = 0);
+ int resume (const char[], const ACE_Service_Type ** = 0);
// Resume a service record.
- int suspend (const char[], const ACE_Service_Record ** = 0);
+ int suspend (const char[], const ACE_Service_Type ** = 0);
// Suspend a service record.
int current_size (void);
@@ -92,12 +97,12 @@ public:
private:
int find_i (const char service_name[],
- const ACE_Service_Record ** = 0,
+ const ACE_Service_Type ** = 0,
int ignore_suspended = 1);
// Locates <service_name>. Must be called without locks being
// held...
- const ACE_Service_Record **service_vector_;
+ const ACE_Service_Type **service_vector_;
// Contains all the configured services.
int current_size_;
@@ -130,7 +135,7 @@ public:
// = Iteration methods.
- int next (const ACE_Service_Record *&next_item);
+ int next (const ACE_Service_Type *&next_item);
// Pass back the <next_item> that hasn't been seen in the set.
// Returns 0 when all items have been seen, else 1.
diff --git a/ace/Service_Record.cpp b/ace/Service_Types.cpp
index c5e163e1ba6..615130d0422 100644
--- a/ace/Service_Record.cpp
+++ b/ace/Service_Types.cpp
@@ -2,17 +2,64 @@
// $Id$
#define ACE_BUILD_DLL
-#include "ace/Service_Record.h"
+#include "ace/Service_Types.h"
#include "ace/Stream_Modules.h"
#if !defined (__ACE_INLINE__)
#include "ace/Service_Record.i"
#endif /* __ACE_INLINE__ */
+ACE_ALLOC_HOOK_DEFINE(ACE_Service_Type_Impl)
+
+void
+ACE_Service_Type_Impl::dump (void) const
+{
+ ACE_TRACE ("ACE_Service_Type_Impl::dump");
+}
+
+ACE_Service_Type_Impl::ACE_Service_Type_Impl (const void *so,
+ const char *s_name,
+ unsigned int f)
+ : name_ (0),
+ obj_ (so),
+ flags_ (f)
+{
+ ACE_TRACE ("ACE_Service_Type_Impl::ACE_Service_Type_Impl");
+ this->name (s_name);
+}
+
+ACE_Service_Type_Impl::~ACE_Service_Type_Impl (void)
+{
+ ACE_TRACE ("ACE_Service_Type_Impl::~ACE_Service_Type_Impl");
+
+ // It's ok to call this, even though we may have already deleted it
+ // in the fini() method since it would then be NULL.
+ delete [] (char *) this->name_;
+}
+
+int
+ACE_Service_Type_Impl::fini (void) const
+{
+ ACE_TRACE ("ACE_Service_Type_Impl::fini");
+ ACE_DEBUG ((LM_DEBUG, "destroying %s, flags = %d\n",
+ this->name_, this->flags_));
+
+ delete [] (char *) this->name_;
+ ((ACE_Service_Type_Impl *) this)->name_ = 0;
+
+ if (ACE_BIT_ENABLED (this->flags_, ACE_Service_Type_::DELETE_OBJ))
+ operator delete ((void *) this->object ()); // cast to remove const-ness
+
+ if (ACE_BIT_ENABLED (this->flags_, ACE_Service_Type_::DELETE_THIS))
+ delete (ACE_Service_Type_Impl *) this;
+
+ return 0;
+}
+
ACE_Service_Object_Type::ACE_Service_Object_Type (ACE_Service_Object *so,
const char *s_name,
unsigned int f)
- : ACE_Service_Type ((const void *) so, s_name, f)
+ : ACE_Service_Type_Impl ((const void *) so, s_name, f)
{
ACE_TRACE ("ACE_Service_Object_Type::ACE_Service_Object_Type");
}
@@ -41,7 +88,7 @@ ACE_Module_Type::dump (void) const
ACE_Module_Type::ACE_Module_Type (MT_Module *m,
const char *m_name,
u_int f)
- : ACE_Service_Type ((const void *) m, m_name, f)
+ : ACE_Service_Type_Impl ((const void *) m, m_name, f)
{
ACE_TRACE ("ACE_Module_Type::ACE_Module_Type");
}
@@ -115,7 +162,7 @@ ACE_Module_Type::fini (void) const
// Close the module and delete the memory.
mod->close (MT_Module::M_DELETE);
- return ACE_Service_Type::fini ();
+ return ACE_Service_Type_Impl::fini ();
}
int
@@ -137,14 +184,14 @@ void
ACE_Module_Type::link (ACE_Module_Type *n)
{
ACE_TRACE ("ACE_Module_Type::link");
- this->next_ = n;
+ this->link_ = n;
}
ACE_Module_Type *
ACE_Module_Type::link (void) const
{
ACE_TRACE ("ACE_Module_Type::link");
- return this->next_;
+ return this->link_;
}
ACE_ALLOC_HOOK_DEFINE(ACE_Stream_Type)
@@ -185,7 +232,7 @@ ACE_Stream_Type::resume (void) const
ACE_Stream_Type::ACE_Stream_Type (MT_Stream *s,
const char *s_name,
unsigned int f)
- : ACE_Service_Type ((const void *) s, s_name, f),
+ : ACE_Service_Type_Impl ((const void *) s, s_name, f),
head_ (0)
{
ACE_TRACE ("ACE_Stream_Type::ACE_Stream_Type");
@@ -227,7 +274,7 @@ ACE_Stream_Type::fini (void) const
}
str->close ();
- return ACE_Service_Type::fini ();
+ return ACE_Service_Type_Impl::fini ();
}
// Locate and remove <mod_name> from the ACE_Stream.
@@ -244,14 +291,14 @@ ACE_Stream_Type::remove (ACE_Module_Type *mod)
for (ACE_Module_Type *m = this->head_; m != 0; )
{
// We need to do this first so we don't bomb out if we delete m!
- ACE_Module_Type *next = m->link ();
+ ACE_Module_Type *link = m->link ();
if (m == mod)
{
if (prev == 0)
- this->head_ = next;
+ this->head_ = link;
else
- prev->link (next);
+ prev->link (link);
// Final arg is an indication to *not* delete the Module.
if (str->remove (m->name (), MT_Module::M_DELETE_NONE) == -1)
@@ -264,7 +311,7 @@ ACE_Stream_Type::remove (ACE_Module_Type *mod)
else
prev = m;
- m = next;
+ m = link;
}
return result;
@@ -297,52 +344,6 @@ ACE_Stream_Type::find (const char *mod_name) const
return 0;
}
-ACE_ALLOC_HOOK_DEFINE(ACE_Service_Record)
-
-void
-ACE_Service_Record::dump (void) const
-{
- ACE_TRACE ("ACE_Service_Record::dump");
-}
-
-ACE_Service_Record::ACE_Service_Record (const char *n,
- ACE_Service_Type *t,
- const ACE_SHLIB_HANDLE h,
- int active)
- : name_ (0),
- type_ (t),
- handle_ (h),
- active_ (active)
-{
- ACE_TRACE ("ACE_Service_Record::ACE_Service_Record");
- this->name (n);
-}
-
-ACE_Service_Record::~ACE_Service_Record (void)
-{
- ACE_TRACE ("ACE_Service_Record::~ACE_Service_Record");
- this->type_->fini ();
- if (this->handle_ != 0)
- ACE_OS::dlclose ((ACE_SHLIB_HANDLE) this->handle_);
- delete [] (char *) this->name_;
-}
-
-void
-ACE_Service_Record::suspend (void) const
-{
- ACE_TRACE ("ACE_Service_Record::suspend");
- ((ACE_Service_Record *) this)->active_ = 0;
- this->type_->suspend ();
-}
-
-void
-ACE_Service_Record::resume (void) const
-{
- ACE_TRACE ("ACE_Service_Record::resume");
- ((ACE_Service_Record *) this)->active_ = 1;
- this->type_->resume ();
-}
-
int
ACE_Service_Object_Type::fini (void) const
{
@@ -351,7 +352,7 @@ ACE_Service_Object_Type::fini (void) const
ACE_Service_Object *so = (ACE_Service_Object *) obj;
if (so)
so->fini ();
- return ACE_Service_Type::fini ();
+ return ACE_Service_Type_Impl::fini ();
}
#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION)
diff --git a/ace/Service_Types.h b/ace/Service_Types.h
new file mode 100644
index 00000000000..d8d8a73a4dc
--- /dev/null
+++ b/ace/Service_Types.h
@@ -0,0 +1,172 @@
+/* -*- C++ -*- */
+// $Id$
+
+// ============================================================================
+//
+// = LIBRARY
+// ace
+//
+// = FILENAME
+// Service_Types.h
+//
+// = AUTHOR
+// Doug Schmidt
+//
+// ============================================================================
+
+#if !defined (ACE_SERVICE_TYPE_H)
+#define ACE_SERVICE_TYPE_H
+
+#include "ace/Service_Object.h"
+#include "ace/Synch.h"
+#include "ace/Stream.h"
+
+typedef ACE_Stream<ACE_SYNCH> MT_Stream;
+typedef ACE_Module<ACE_SYNCH> MT_Module;
+typedef ACE_Task<ACE_SYNCH> MT_Task;
+
+class ACE_Export ACE_Service_Type_Impl
+ // = TITLE
+ // Provide the class hierarchy that defines the contents of
+ // the Service Repository search structure.
+ //
+ // = DESCRIPTION
+ // Provide the class hierarchy that defines the contents of
+ // the Service Repository search structure.
+{
+public:
+ // = Initialization and termination methods.
+ ACE_Service_Type_Impl (const void *object,
+ const char *s_name,
+ u_int flags = 0);
+ virtual ~ACE_Service_Type_Impl (void);
+
+ // = Pure virtual interface (must be defined by the subclass).
+ virtual int suspend (void) const = 0;
+ virtual int resume (void) const = 0;
+ virtual int init (int argc, char *argv[]) const = 0;
+ virtual int fini (void) const;
+ virtual int info (char **str, size_t len) const = 0;
+
+ const void *object (void) const;
+ // The pointer to the service.
+
+ const char *name (void) const;
+ // Get the name of the service.
+
+ void name (const char *);
+ // Set the name of the service.
+
+ void dump (void) const;
+ // Dump the state of an object.
+
+ ACE_ALLOC_HOOK_DECLARE;
+ // Declare the dynamic allocation hooks.
+
+protected:
+ const char *name_;
+ // Name of the service.
+
+ const void *obj_;
+ // Pointer to object that implements the service. This actually
+ // points to an <ACE_Service_Object>, <ACE_Module>, or <ACE_Stream>.
+
+ u_int flags_;
+ // Flags that control serivce behavior (particularly deletion).
+};
+
+class ACE_Export ACE_Service_Object_Type : public ACE_Service_Type_Impl
+ // = TITLE
+ // Define the methods for handling the configuration of
+ // <ACE_Service_Objects>.
+{
+public:
+ // = Initialization method.
+ ACE_Service_Object_Type (ACE_Service_Object *so,
+ const char *name,
+ u_int flags = 0);
+
+ // = Implement the hooks for <ACE_Service_Objects>.
+ virtual int suspend (void) const;
+ virtual int resume (void) const;
+ virtual int init (int argc, char *argv[]) const;
+ virtual int fini (void) const;
+ virtual int info (char **str, size_t len) const;
+};
+
+class ACE_Export ACE_Module_Type : public ACE_Service_Type_Impl
+ // = TITLE
+ // Define the methods for handling the configuration of
+ // <ACE_Modules>.
+{
+public:
+ // = Initialization method.
+ ACE_Module_Type (MT_Module *m,
+ const char *identifier,
+ u_int flags = 0);
+
+ // = Implement the hooks for <ACE_Modules>.
+ virtual int suspend (void) const;
+ virtual int resume (void) const;
+ virtual int init (int argc, char *argv[]) const;
+ virtual int fini (void) const;
+ virtual int info (char **str, size_t len) const;
+
+ // Get/set the link pointer.
+ ACE_Module_Type *link (void) const;
+ void link (ACE_Module_Type *);
+
+ void dump (void) const;
+ // Dump the state of an object.
+
+ ACE_ALLOC_HOOK_DECLARE;
+ // Declare the dynamic allocation hooks.
+
+private:
+ ACE_Module_Type *next_;
+ // Pointer to the next <ACE_Module_Type> in an <ACE_Stream_Type>.
+};
+
+class ACE_Export ACE_Stream_Type : public ACE_Service_Type_Impl
+ // = TITLE
+ // Define the methods for handling the configuration of
+ // <ACE_Streams>.
+{
+public:
+ // = Initialization method.
+ ACE_Stream_Type (MT_Stream *s,
+ const char *identifier,
+ u_int flags = 0);
+
+ // = Implement the hooks for <ACE_Streams>.
+ virtual int suspend (void) const;
+ virtual int resume (void) const;
+ virtual int init (int argc, char *argv[]) const;
+ virtual int fini (void) const;
+ virtual int info (char **str, size_t len) const;
+
+ int push (ACE_Module_Type *new_module);
+ // Add a new <ACE_Module> to the top of the <ACE_Stream>.
+
+ int remove (ACE_Module_Type *module);
+ // Search for <module> and remove it from the <ACE_Stream>.
+
+ ACE_Module_Type *find (const char *mod_name) const;
+ // Locate the <ACE_Module> with <mod_name>.
+
+ void dump (void) const;
+ // Dump the state of an object.
+
+ ACE_ALLOC_HOOK_DECLARE;
+ // Declare the dynamic allocation hooks.
+
+private:
+ ACE_Module_Type *head_;
+ // Pointer to the head of the <ACE_Module> list.
+};
+
+#if defined (__ACE_INLINE__)
+#include "ace/Service_Types.i"
+#endif /* __ACE_INLINE__ */
+
+#endif /* _SERVICE_TYPE_H */
diff --git a/ace/Service_Types.i b/ace/Service_Types.i
new file mode 100644
index 00000000000..27543964e17
--- /dev/null
+++ b/ace/Service_Types.i
@@ -0,0 +1,50 @@
+/* -*- C++ -*- */
+// $Id$
+
+// Service_Record.i
+
+ACE_INLINE const void *
+ACE_Service_Type_Impl::object (void) const
+{
+ ACE_TRACE ("ACE_Service_Type_Impl::object");
+ return this->obj_;
+}
+
+ACE_INLINE const char *
+ACE_Service_Type_Impl::name (void) const
+{
+ ACE_TRACE ("ACE_Service_Type_Impl::name");
+ return this->name_;
+}
+
+ACE_INLINE void
+ACE_Service_Type_Impl::name (const char *n)
+{
+ ACE_TRACE ("ACE_Service_Type_Impl::name");
+
+ delete [] (char *) this->name_;
+ ACE_NEW (this->name_, char[::strlen (n) + 1]);
+ ACE_OS::strcpy ((char *) this->name_, n);
+}
+
+ACE_INLINE int
+ACE_Service_Object_Type::suspend (void) const
+{
+ ACE_TRACE ("ACE_Service_Object_Type::suspend");
+ return ((ACE_Service_Object *) this->object ())->suspend ();
+}
+
+ACE_INLINE int
+ACE_Service_Object_Type::resume (void) const
+{
+ ACE_TRACE ("ACE_Service_Object_Type::resume");
+ return ((ACE_Service_Object *) this->object ())->resume ();
+}
+
+ACE_INLINE int
+ACE_Service_Object_Type::info (char **str, size_t len) const
+{
+ ACE_TRACE ("ACE_Service_Object_Type::info");
+ return ((ACE_Service_Object *) this->object ())->info (str, len);
+}
+
diff --git a/ace/Strategies_T.cpp b/ace/Strategies_T.cpp
index 990f58529be..613d0359be1 100644
--- a/ace/Strategies_T.cpp
+++ b/ace/Strategies_T.cpp
@@ -164,10 +164,10 @@ ACE_DLL_Strategy<SVC_HANDLER>::make_svc_handler (SVC_HANDLER *&sh)
if (svc_handler != 0)
{
- // Create an ACE_Service_Record containing the SVC_Handler and
+ // Create an ACE_Service_Type containing the SVC_Handler and
// insert into this->svc_rep_;
- ACE_Service_Type stp =
+ ACE_Service_Type_Impl stp =
new ACE_Service_Object_Type (svc_handler, this->svc_name_);
if (stp == 0)
@@ -176,8 +176,8 @@ ACE_DLL_Strategy<SVC_HANDLER>::make_svc_handler (SVC_HANDLER *&sh)
return -1;
}
- ACE_Service_Record *srp =
- new ACE_Service_Record (this->svc_name_, stp, handle, 1);
+ ACE_Service_Type *srp =
+ new ACE_Service_Type (this->svc_name_, stp, handle, 1);
if (srp == 0)
{
diff --git a/ace/Svc_Conf.h b/ace/Svc_Conf.h
index 50e12df8d44..e1c71659225 100644
--- a/ace/Svc_Conf.h
+++ b/ace/Svc_Conf.h
@@ -64,8 +64,8 @@ extern int ace_yyleng;
extern ACE_Obstack *ace_obstack;
// Efficient memory allocation technique
-ACE_Service_Type *ace_create_service_type (const char *, int, const void *, unsigned int);
-// Factory that creates a new ACE_Service_Type.
+ACE_Service_Type_Impl *ace_create_service_type (const char *, int, const void *, unsigned int);
+// Factory that creates a new ACE_Service_Type_Impl.
typedef union
{
@@ -73,7 +73,7 @@ typedef union
ACE_Location_Node *location_node_;
ACE_Parse_Node *parse_node_;
ACE_Static_Node *static_node_;
- ACE_Service_Record *svc_record_;
+ ACE_Service_Type *svc_record_;
char *ident_;
} YYSTYPE;
extern YYSTYPE ace_yylval;
diff --git a/ace/Svc_Conf.y b/ace/Svc_Conf.y
index a5da4ab7804..d29021c2274 100644
--- a/ace/Svc_Conf.y
+++ b/ace/Svc_Conf.y
@@ -184,13 +184,13 @@ svc_location
: ACE_IDENT type svc_initializer status
{
u_int flags
- = ACE_Service_Type::DELETE_THIS | ($3->dispose () == 0 ? 0 : ACE_Service_Type::DELETE_OBJ);
+ = ACE_Service_Type_Impl::DELETE_THIS | ($3->dispose () == 0 ? 0 : ACE_Service_Type_Impl::DELETE_OBJ);
const void *sym = $3->symbol ();
if (sym != 0)
{
- ACE_Service_Type *stp = ace_create_service_type ($1, $2, $3->symbol (), flags);
- $$ = new ACE_Service_Record ($1, stp, $3->handle (), $4);
+ ACE_Service_Type_Impl *stp = ace_create_service_type ($1, $2, $3->symbol (), flags);
+ $$ = new ACE_Service_Type ($1, stp, $3->handle (), $4);
}
else
{
@@ -269,8 +269,8 @@ yyerror (char *s)
static ACE_Module_Type *
get_module (ACE_Static_Node *str_rec, const char *svc_name)
{
- const ACE_Service_Record *sr = str_rec->record ();
- const ACE_Service_Type *type = sr->type ();
+ const ACE_Service_Type *sr = str_rec->record ();
+ const ACE_Service_Type_Impl *type = sr->type ();
ACE_Stream_Type *st = sr == 0 ? 0 : (ACE_Stream_Type *) type;
ACE_Module_Type *mt = st == 0 ? 0 : st->find (svc_name);
@@ -286,10 +286,10 @@ get_module (ACE_Static_Node *str_rec, const char *svc_name)
static ACE_Module_Type *
get_module (ACE_Static_Node *str_rec, ACE_Static_Node *svc_type)
{
- const ACE_Service_Record *sr = str_rec->record ();
- const ACE_Service_Type *type = sr->type ();
+ const ACE_Service_Type *sr = str_rec->record ();
+ const ACE_Service_Type_Impl *type = sr->type ();
ACE_Stream_Type *st = sr == 0 ? 0 : (ACE_Stream_Type *) type;
- const ACE_Service_Record *sv = svc_type->record ();
+ const ACE_Service_Type *sv = svc_type->record ();
type = sv->type ();
ACE_Module_Type *mt = (ACE_Module_Type *) type;
@@ -302,13 +302,13 @@ get_module (ACE_Static_Node *str_rec, ACE_Static_Node *svc_type)
return mt;
}
-ACE_Service_Type *
+ACE_Service_Type_Impl *
ace_create_service_type (const char *name,
int type,
const void *symbol,
u_int flags)
{
- ACE_Service_Type *stp = 0;
+ ACE_Service_Type_Impl *stp = 0;
// Note, the only place we need to put a case statement. This is
// also the place where we'd put the RTTI tests, if the compiler
diff --git a/ace/Svc_Conf_y.cpp b/ace/Svc_Conf_y.cpp
index 5702835b7cf..c61d9ee58a2 100644
--- a/ace/Svc_Conf_y.cpp
+++ b/ace/Svc_Conf_y.cpp
@@ -258,8 +258,8 @@ ace_yyerror (char *s)
static ACE_Module_Type *
get_module (ACE_Static_Node *str_rec, const char *svc_name)
{
- const ACE_Service_Record *sr = str_rec->record ();
- const ACE_Service_Type *type = sr->type ();
+ const ACE_Service_Type *sr = str_rec->record ();
+ const ACE_Service_Type_Impl *type = sr->type ();
ACE_Stream_Type *st = sr == 0 ? 0 : (ACE_Stream_Type *) type;
ACE_Module_Type *mt = st == 0 ? 0 : st->find (svc_name);
@@ -275,10 +275,10 @@ get_module (ACE_Static_Node *str_rec, const char *svc_name)
static ACE_Module_Type *
get_module (ACE_Static_Node *str_rec, ACE_Static_Node *svc_type)
{
- const ACE_Service_Record *sr = str_rec->record ();
- const ACE_Service_Type *type = sr->type ();
+ const ACE_Service_Type *sr = str_rec->record ();
+ const ACE_Service_Type_Impl *type = sr->type ();
ACE_Stream_Type *st = sr == 0 ? 0 : (ACE_Stream_Type *) type;
- const ACE_Service_Record *sv = svc_type->record ();
+ const ACE_Service_Type *sv = svc_type->record ();
type = sv->type ();
ACE_Module_Type *mt = (ACE_Module_Type *) type;
@@ -291,13 +291,13 @@ get_module (ACE_Static_Node *str_rec, ACE_Static_Node *svc_type)
return mt;
}
-ACE_Service_Type *
+ACE_Service_Type_Impl *
ace_create_service_type (const char *name,
int type,
const void *symbol,
u_int flags)
{
- ACE_Service_Type *stp = 0;
+ ACE_Service_Type_Impl *stp = 0;
// Note, the only place we need to put a case statement. This is
// also the place where we'd put the RTTI tests, if the compiler
@@ -815,13 +815,13 @@ case 30:
#line 193 "Svc_Conf.y"
{
u_int flags
- = ACE_Service_Type::DELETE_THIS | (ace_yyvsp[-1].location_node_->dispose () == 0 ? 0 : ACE_Service_Type::DELETE_OBJ);
+ = ACE_Service_Type_::DELETE_THIS | (ace_yyvsp[-1].location_node_->dispose () == 0 ? 0 : ACE_Service_Type_::DELETE_OBJ);
const void *sym = ace_yyvsp[-1].location_node_->symbol ();
if (sym != 0)
{
- ACE_Service_Type *stp = ace_create_service_type (ace_yyvsp[-3].ident_, ace_yyvsp[-2].type_, ace_yyvsp[-1].location_node_->symbol (), flags);
- ace_yyval.svc_record_ = new ACE_Service_Record (ace_yyvsp[-3].ident_, stp, ace_yyvsp[-1].location_node_->handle (), ace_yyvsp[0].type_);
+ ACE_Service_Type_Impl *stp = ace_create_service_type (ace_yyvsp[-3].ident_, ace_yyvsp[-2].type_, ace_yyvsp[-1].location_node_->symbol (), flags);
+ ace_yyval.svc_record_ = new ACE_Service_Type (ace_yyvsp[-3].ident_, stp, ace_yyvsp[-1].location_node_->handle (), ace_yyvsp[0].type_);
}
else
{
diff --git a/ace/makefile-light b/ace/makefile-light
index 98eec31db11..7086c0bb8a5 100644
--- a/ace/makefile-light
+++ b/ace/makefile-light
@@ -233,7 +233,7 @@ Acceptor.o: Acceptor.C \
$(ACE_ROOT)/include/ace/Log_Record.i \
$(ACE_ROOT)/include/ace/Log_Msg.i \
$(ACE_ROOT)/include/ace/Service_Repository.h \
- $(ACE_ROOT)/include/ace/Service_Record.h \
+ $(ACE_ROOT)/include/ace/Service_Types.h \
$(ACE_ROOT)/include/ace/Service_Object.h \
$(ACE_ROOT)/include/ace/Shared_Object.h \
$(ACE_ROOT)/include/ace/Stream.h \
@@ -286,7 +286,7 @@ Connector.o: Connector.C \
$(ACE_ROOT)/include/ace/Log_Record.i \
$(ACE_ROOT)/include/ace/Log_Msg.i \
$(ACE_ROOT)/include/ace/Service_Repository.h \
- $(ACE_ROOT)/include/ace/Service_Record.h \
+ $(ACE_ROOT)/include/ace/Service_Types.h \
$(ACE_ROOT)/include/ace/Service_Object.h \
$(ACE_ROOT)/include/ace/Shared_Object.h \
$(ACE_ROOT)/include/ace/Stream.h \
@@ -788,7 +788,7 @@ Svc_Handler.o: Svc_Handler.C \
$(ACE_ROOT)/include/ace/Token.h \
$(ACE_ROOT)/include/ace/Reactor.i \
$(ACE_ROOT)/include/ace/Service_Repository.h \
- $(ACE_ROOT)/include/ace/Service_Record.h \
+ $(ACE_ROOT)/include/ace/Service_Types.h \
$(ACE_ROOT)/include/ace/Stream.h \
$(ACE_ROOT)/include/ace/Module.h \
$(ACE_ROOT)/include/ace/Svc_Handler.i