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

Dynamic_Service.h

Go to the documentation of this file.
00001 // -*- C++ -*-
00002 
00003 //=============================================================================
00004 /**
00005  *  @file    Dynamic_Service.h
00006  *
00007  *  $Id: Dynamic_Service.h,v 1.1.1.4 2003/02/21 18:36:32 chad Exp $
00008  *
00009  *  @author Prashant Jain <pjain@cs.wustl.edu>
00010  *  @author Douglas C. Schmidt <schmidt@cs.wustl.edu>
00011  */
00012 //=============================================================================
00013 
00014 #ifndef ACE_DYNAMIC_SERVICE_H
00015 #define ACE_DYNAMIC_SERVICE_H
00016 
00017 #include "ace/pre.h"
00018 
00019 #include "ace/config-all.h"
00020 
00021 #if !defined (ACE_LACKS_PRAGMA_ONCE)
00022 # pragma once
00023 #endif /* ACE_LACKS_PRAGMA_ONCE */
00024 
00025 #include "ace/Dynamic_Service_Base.h"
00026 
00027 class ACE_Service_Object;
00028 
00029 /**
00030  * @class ACE_Dynamic_Service
00031  *
00032  * @brief Provides a general interface to retrieve arbitrary objects
00033  * from the ACE service repository.
00034  *
00035  * Uses "name" for lookup in the ACE service repository. Obtains
00036  * the object and returns it as the appropriate type.
00037  */
00038 template <class TYPE>
00039 class ACE_Dynamic_Service : public ACE_Dynamic_Service_Base
00040 {
00041 public:
00042   /// Return instance using <name> to search the Service_Repository.
00043   static TYPE*instance (const ACE_TCHAR *name);
00044 
00045 #if defined (ACE_USES_WCHAR)
00046   static TYPE* instance (const ACE_ANTI_TCHAR *name);
00047 #endif  // ACE_USES_WCHAR
00048 };
00049 
00050 #if defined (__ACE_INLINE__)
00051 #include "ace/Dynamic_Service.i"
00052 #endif /* __ACE_INLINE__ */
00053 
00054 #if defined (ACE_TEMPLATES_REQUIRE_SOURCE)
00055 # include "ace/Dynamic_Service.cpp"
00056 #endif /* ACE_TEMPLATES_REQUIRE_SOURCE */
00057 
00058 #if defined (ACE_TEMPLATES_REQUIRE_PRAGMA)
00059 # pragma implementation ("Dynamic_Service.cpp")
00060 #endif /* ACE_TEMPLATES_REQUIRE_PRAGMA */
00061 
00062 #include "ace/post.h"
00063 
00064 #endif /* ACE_DYNAMIC_SERVICE_H */

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