3 //=============================================================================
5 * @file Dynamic_Service.h
7 * @author Prashant Jain <pjain@cs.wustl.edu>
8 * @author Douglas C. Schmidt <d.schmidt@vanderbilt.edu>
10 //=============================================================================
12 #ifndef ACE_DYNAMIC_SERVICE_H
13 #define ACE_DYNAMIC_SERVICE_H
15 #include /**/ "ace/pre.h"
17 #include /**/ "ace/config-all.h"
18 #include "ace/Global_Macros.h"
20 #if !defined (ACE_LACKS_PRAGMA_ONCE)
22 #endif /* ACE_LACKS_PRAGMA_ONCE */
24 #include "ace/Dynamic_Service_Base.h"
26 ACE_BEGIN_VERSIONED_NAMESPACE_DECL
28 class ACE_Service_Object
;
31 * @class ACE_Dynamic_Service
33 * @brief Provides a general interface to retrieve arbitrary objects
34 * from the ACE service repository.
36 * Uses "name" for lookup in the ACE service repository. Obtains
37 * the object and returns it as the appropriate type.
40 class ACE_Dynamic_Service
: public ACE_Dynamic_Service_Base
43 /// Return instance using @a name to search the Service_Repository.
44 static TYPE
* instance (const ACE_TCHAR
*name
);
45 static TYPE
* instance (const ACE_TCHAR
*name
, bool no_global
);
47 static TYPE
* instance (const ACE_Service_Gestalt
* repo
,
48 const ACE_TCHAR
*name
);
49 static TYPE
* instance (const ACE_Service_Gestalt
* repo
,
50 const ACE_TCHAR
*name
, bool no_global
);
52 #if defined (ACE_USES_WCHAR)
54 /// Return instance using @a name to search the Service_Repository.
55 static TYPE
* instance (const ACE_ANTI_TCHAR
*name
);
57 static TYPE
* instance (const ACE_ANTI_TCHAR
*name
, bool no_global
);
59 static TYPE
* instance (const ACE_Service_Gestalt
* repo
,
60 const ACE_ANTI_TCHAR
*name
);
61 static TYPE
* instance (const ACE_Service_Gestalt
* repo
,
62 const ACE_ANTI_TCHAR
*name
, bool no_global
);
63 #endif // ACE_USES_WCHAR
66 ACE_UNIMPLEMENTED_FUNC (ACE_Dynamic_Service ())
67 ACE_UNIMPLEMENTED_FUNC (ACE_Dynamic_Service (const ACE_Dynamic_Service
&))
68 ACE_UNIMPLEMENTED_FUNC (ACE_Dynamic_Service
& operator= (const ACE_Dynamic_Service
&))
71 ACE_END_VERSIONED_NAMESPACE_DECL
73 #if defined (__ACE_INLINE__)
74 #include "ace/Dynamic_Service.inl"
75 #endif /* __ACE_INLINE__ */
77 #if defined (ACE_TEMPLATES_REQUIRE_SOURCE)
78 # include "ace/Dynamic_Service.cpp"
79 #endif /* ACE_TEMPLATES_REQUIRE_SOURCE */
81 #if defined (ACE_TEMPLATES_REQUIRE_PRAGMA)
82 # pragma implementation ("Dynamic_Service.cpp")
83 #endif /* ACE_TEMPLATES_REQUIRE_PRAGMA */
85 #include /**/ "ace/post.h"
87 #endif /* ACE_DYNAMIC_SERVICE_H */