1 #ifndef ACE_DYNAMIC_SERVICE_CPP
2 #define ACE_DYNAMIC_SERVICE_CPP
4 #include "ace/Dynamic_Service.h"
6 #if !defined (ACE_LACKS_PRAGMA_ONCE)
8 #endif /* ACE_LACKS_PRAGMA_ONCE */
10 #include "ace/Service_Object.h"
12 #if !defined (__ACE_INLINE__)
13 #include "ace/Dynamic_Service.inl"
14 #endif /* __ACE_INLINE__ */
16 ACE_BEGIN_VERSIONED_NAMESPACE_DECL
18 template <class TYPE
> TYPE
*
19 ACE_Dynamic_Service
<TYPE
>::instance (const ACE_TCHAR
*name
)
21 ACE_Service_Object
* svc_obj
=
22 static_cast<ACE_Service_Object
*>
23 (ACE_Dynamic_Service_Base::instance (name
,false));
24 return dynamic_cast<TYPE
*> (svc_obj
);
27 template <class TYPE
> TYPE
*
28 ACE_Dynamic_Service
<TYPE
>::instance (const ACE_TCHAR
*name
,
31 ACE_Service_Object
* svc_obj
=
32 static_cast<ACE_Service_Object
*>
33 (ACE_Dynamic_Service_Base::instance (name
, no_global
));
34 return dynamic_cast<TYPE
*> (svc_obj
);
37 template <class TYPE
> TYPE
*
38 ACE_Dynamic_Service
<TYPE
>::instance (const ACE_Service_Gestalt
* conf
,
39 const ACE_TCHAR
*name
)
41 ACE_Service_Object
* svc_obj
=
42 static_cast<ACE_Service_Object
*>
43 (ACE_Dynamic_Service_Base::instance (conf
, name
, false));
44 return dynamic_cast<TYPE
*> (svc_obj
);
47 template <class TYPE
> TYPE
*
48 ACE_Dynamic_Service
<TYPE
>::instance (const ACE_Service_Gestalt
* conf
,
49 const ACE_TCHAR
*name
,
52 ACE_Service_Object
* svc_obj
=
53 static_cast<ACE_Service_Object
*>
54 (ACE_Dynamic_Service_Base::instance (conf
, name
, no_global
));
55 return dynamic_cast<TYPE
*> (svc_obj
);
58 ACE_END_VERSIONED_NAMESPACE_DECL
60 #endif /* ACE_DYNAMIC_SERVICE_CPP */