Merge pull request #2216 from jwillemsen/jwi-cxxversionchecks
[ACE_TAO.git] / ACE / examples / ASX / CCM_App / CCM_App.cpp
blob9c5ebf23b8df768982103b76a7f76492fd66e99e
1 #define ACE_BUILD_SVC_DLL
3 #include "ace/Stream.h"
4 #include "ace/Task.h"
5 #include "ace/Module.h"
6 #include "ace/svc_export.h"
9 typedef ACE_Task<ACE_SYNCH> MT_Task;
10 typedef ACE_Stream<ACE_SYNCH> MT_Stream;
11 typedef ACE_Module<ACE_SYNCH> MT_Module;
13 class ACE_Svc_Export Test_Task : public MT_Task
15 public:
16 //FUZZ: disable check_for_lack_ACE_OS
17 virtual int open (void *);
18 virtual int close (u_long);
19 //FUZZ: enable check_for_lack_ACE_OS
21 virtual int init (int, ACE_TCHAR *[]);
22 virtual int fini ();
23 virtual int suspend ();
24 virtual int resume ();
27 int
28 Test_Task::open (void *)
30 ACE_DEBUG ((LM_DEBUG,
31 ACE_TEXT ("opening %s\n"),
32 this->name () ? this->name () : ACE_TEXT ("task")));
33 return 0;
36 int
37 Test_Task::close (u_long)
39 ACE_DEBUG ((LM_DEBUG,
40 ACE_TEXT ("closing %s\n"),
41 this->name () ? this->name () : ACE_TEXT ("task")));
42 return 0;
45 int
46 Test_Task::suspend ()
48 ACE_DEBUG ((LM_DEBUG,
49 ACE_TEXT ("suspending in %s\n"),
50 this->name () ? this->name () : ACE_TEXT ("task")));
51 return 0;
54 int
55 Test_Task::resume ()
57 ACE_DEBUG ((LM_DEBUG,
58 ACE_TEXT ("resuming in %s\n"),
59 this->name () ? this->name () : ACE_TEXT ("task")));
60 return 0;
63 int
64 Test_Task::init (int, ACE_TCHAR *[])
66 ACE_DEBUG ((LM_DEBUG,
67 ACE_TEXT ("initializing %s\n"),
68 this->name () ? this->name () : ACE_TEXT ("task")));
70 return 0;
73 int
74 Test_Task::fini ()
76 ACE_DEBUG ((LM_DEBUG,
77 ACE_TEXT ("finalizing %s (%@)\n"),
78 this->name () ? this->name () : ACE_TEXT ("task"),
79 this));
80 return 0;
83 // Factories used to control configuration.
85 ACE_SVC_FACTORY_DECLARE (Test_Task)
86 ACE_SVC_FACTORY_DEFINE (Test_Task)
88 // Dynamically linked functions used to control configuration.
90 extern "C" ACE_Svc_Export MT_Stream *make_stream ();
91 extern "C" ACE_Svc_Export MT_Module *make_da ();
92 extern "C" ACE_Svc_Export MT_Module *make_ea ();
93 extern "C" ACE_Svc_Export MT_Module *make_mr ();
95 MT_Stream *
96 make_stream ()
98 return new MT_Stream;
101 MT_Module *
102 make_da ()
104 return new MT_Module (ACE_TEXT ("Device_Adapter"),
105 new Test_Task, new Test_Task);
108 MT_Module *
109 make_ea ()
111 return new MT_Module (ACE_TEXT ("Event_Analyzer"),
112 new Test_Task, new Test_Task);
115 MT_Module *
116 make_mr ()
118 return new MT_Module (ACE_TEXT ("Multicast_Router"),
119 new Test_Task, new Test_Task);