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

ACE_Dynamic_Service_Base Class Reference

Base class for all ACE_Dynamic_Service instantiations. More...

#include <Dynamic_Service_Base.h>

Inheritance diagram for ACE_Dynamic_Service_Base:

Inheritance graph
[legend]
List of all members.

Public Methods

void dump (void) const
 Dump the current static of the object. More...


Static Protected Methods

void * instance (const ACE_TCHAR *name)
 Return instance using <name> to search the Service_Repository. More...


Detailed Description

Base class for all ACE_Dynamic_Service instantiations.

Factors out common code shared by all ACE_Dynamic_Service instantiations, this avoid code bloat.

Definition at line 34 of file Dynamic_Service_Base.h.


Member Function Documentation

void ACE_Dynamic_Service_Base::dump void    const
 

Dump the current static of the object.

Definition at line 12 of file Dynamic_Service_Base.cpp.

References ACE_BEGIN_DUMP, ACE_DEBUG, ACE_END_DUMP, ACE_LIB_TEXT, ACE_TRACE, and LM_DEBUG.

00013 {
00014   ACE_TRACE ("ACE_Dynamic_Service_Base::dump");
00015 
00016   ACE_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this));
00017   ACE_DEBUG ((LM_DEBUG, ACE_LIB_TEXT ("\n")));
00018   ACE_DEBUG ((LM_DEBUG, ACE_END_DUMP));
00019 }

void * ACE_Dynamic_Service_Base::instance const ACE_TCHAR   name [static, protected]
 

Return instance using <name> to search the Service_Repository.

Reimplemented in ACE_Dynamic_Service.

Definition at line 24 of file Dynamic_Service_Base.cpp.

References ACE_TCHAR, ACE_TRACE, ACE_Service_Repository::find, ACE_Service_Repository::instance, ACE_Service_Type_Impl::object, and ACE_Service_Type::type.

Referenced by ACE_Dynamic_Service::instance.

00025 {
00026   ACE_TRACE ("ACE_Dynamic_Service_Base::instance");
00027   const ACE_Service_Type *svc_rec;
00028 
00029   if (ACE_Service_Repository::instance ()->find (name,
00030                                                  &svc_rec) == -1)
00031     return 0;
00032 
00033   const ACE_Service_Type_Impl *type = svc_rec->type ();
00034 
00035   if (type == 0)
00036     return 0;
00037 
00038   void *obj = type->object ();
00039   return obj;
00040 }


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