ACE+TAO-7_0_8
[ACE_TAO.git] / ACE / tests / Framework_Component_DLL.h
blob91deea999cb240ed574436b369c8ad7357898137
2 //=============================================================================
3 /**
4 * @file Framework_Component_DLL.h
6 * Define class needed for generating templates. IBM C++ requires this to
7 * be in its own file for auto template instantiation.
9 * @author Don Hinton <dhinton@ieee.org>
11 //=============================================================================
14 #ifndef ACE_TESTS_FRAMEWORK_COMPONENT_DLL_H
15 #define ACE_TESTS_FRAMEWORK_COMPONENT_DLL_H
17 #include "Framework_Component_DLL_Export.h"
18 #include "ace/Log_Msg.h"
19 #include "ace/Singleton.h"
20 #include "ace/Synch_Traits.h"
22 /// This we will use to test the ACE_Framework_Repository
23 class Simple_Service
25 public:
26 Simple_Service ();
28 virtual ~Simple_Service ();
30 virtual const ACE_TCHAR *name ();
33 // Adapter that contains the required dll_name() method and
34 // has the "right" name for our DLL.
35 template <class TYPE>
36 class FWCT_DLL_Singleton_Adapter_T : public TYPE
38 public:
39 const ACE_TCHAR *dll_name ()
41 FRAMEWORK_COMPONENT_DLL_TRACE ("FWCT_DLL_Singleton_Adapter_T::dll_name");
42 return ACE_TEXT("Framework_Component_DLL");
46 typedef ACE_DLL_Singleton_T < FWCT_DLL_Singleton_Adapter_T <Simple_Service>,
47 ACE_SYNCH_MUTEX > SS_SINGLETON;
49 #endif /* ACE_TESTS_FRAMEWORK_COMPONENT_TEST_H */