Changes to attempt to silence bcc64x
[ACE_TAO.git] / ACE / ace / Dynamic_Service_Base.h
blob308290e5fdda6544fa8e0e332138a83d191c8eb8
1 /* -*- C++ -*- */
3 //=============================================================================
4 /**
5 * @file Dynamic_Service_Base.h
7 * @author Prashant Jain <pjain@cs.wustl.edu>
8 * @author Douglas C. Schmidt <d.schmidt@vanderbilt.edu>
9 */
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)
20 # pragma once
21 #endif /* ACE_LACKS_PRAGMA_ONCE */
23 ACE_BEGIN_VERSIONED_NAMESPACE_DECL
25 class ACE_Service_Gestalt;
26 class ACE_Service_Type;
28 /**
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
38 public:
39 /// Dump the current static of the object
40 void dump () const;
42 protected:
43 /// Perform the default repo search, but optionally skip searching the global
44 /// repo.
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&);
56 private:
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,
61 bool no_global);
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 */