3 //=============================================================================
5 * @file Dynamic_Service_Base.h
7 * @author Prashant Jain <pjain@cs.wustl.edu>
8 * @author Douglas C. Schmidt <d.schmidt@vanderbilt.edu>
10 //=============================================================================
12 #ifndef ACE_DYNAMIC_SERVICE_BASE_H
13 #define ACE_DYNAMIC_SERVICE_BASE_H
15 #include /**/ "ace/pre.h"
17 #include /**/ "ace/ACE_export.h"
19 #if !defined (ACE_LACKS_PRAGMA_ONCE)
21 #endif /* ACE_LACKS_PRAGMA_ONCE */
23 ACE_BEGIN_VERSIONED_NAMESPACE_DECL
25 class ACE_Service_Gestalt
;
26 class ACE_Service_Type
;
29 * @class ACE_Dynamic_Service_Base
31 * @brief Base class for all ACE_Dynamic_Service instantiations.
33 * Factors out common code shared by all ACE_Dynamic_Service
34 * instantiations, this avoid code bloat.
36 class ACE_Export ACE_Dynamic_Service_Base
39 /// Dump the current static of the object
43 /// Perform the default repo search, but optionally skip searching the global
45 static void* instance (const ACE_TCHAR
*name
, bool no_global
= false);
47 static void* instance (const ACE_Service_Gestalt
* repo
,
48 const ACE_TCHAR
*name
,
49 bool no_global
= false);
51 /// No need to create, or assign instances of this class
52 ACE_Dynamic_Service_Base ();
53 ~ACE_Dynamic_Service_Base ();
54 const ACE_Dynamic_Service_Base
& operator= (const ACE_Dynamic_Service_Base
&);
57 /// Implement the service search policy, i.e. "look for the service first
58 /// locally and then globally"
59 static const ACE_Service_Type
*find_i (const ACE_Service_Gestalt
* &repo
,
60 const ACE_TCHAR
*name
,
63 /// The dependency declaration class needs access to the service search
64 /// policy, implemented by find_i()
65 friend class ACE_Dynamic_Service_Dependency
;
68 ACE_END_VERSIONED_NAMESPACE_DECL
70 #include /**/ "ace/post.h"
71 #endif /* ACE_DYNAMIC_SERVICE_BASE_H */