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

Dynamic_Service_Base.cpp

Go to the documentation of this file.
00001 #include "ace_pch.h"
00002 // $Id: Dynamic_Service_Base.cpp,v 1.1.1.1.40.1 2003/03/13 19:44:21 chad Exp $
00003 
00004 #include "ace/Dynamic_Service_Base.h"
00005 #include "ace/Service_Config.h"
00006 #include "ace/Service_Repository.h"
00007 #include "ace/Log_Msg.h"
00008 
00009 ACE_RCSID(ace, Dynamic_Service_Base, "$Id: Dynamic_Service_Base.cpp,v 1.1.1.1.40.1 2003/03/13 19:44:21 chad Exp $")
00010 
00011 void
00012 ACE_Dynamic_Service_Base::dump (void) const
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 }
00020 
00021 // Get the instance using <name>.
00022 
00023 void *
00024 ACE_Dynamic_Service_Base::instance (const ACE_TCHAR *name)
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 }

Generated on Mon Jun 16 11:19:38 2003 for ACE by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002