Merge pull request #2222 from jwillemsen/jwi-dllexportwarning
[ACE_TAO.git] / TAO / tests / RTScheduling / DT_Spawn / Thread_Action.h
blob97ef880d374568952c6b986c9b56652c839b49de
1 #ifndef Thread_Action_H
2 #define Thread_Action_H
4 #include "tao/RTScheduling/RTScheduler.h"
5 #include "ace/Log_Msg.h"
6 #include "ace/OS_NS_string.h"
7 #include "ace/SString.h"
9 class Data
11 public:
12 ACE_CString data;
13 RTScheduling::Current_var current;
16 class Test_Thread_Action:
17 public RTScheduling::ThreadAction
19 public:
20 Test_Thread_Action ();
22 virtual void _cxx_do (CORBA::VoidData data);
25 #endif /*Thread_Action_H*/
28 Test_Thread_Action::Test_Thread_Action ()
32 void
33 Test_Thread_Action::_cxx_do (CORBA::VoidData data)
35 Data* tmp = (Data*) data;
36 ACE_DEBUG ((LM_DEBUG,
37 "Test_Thread_Action::do %C\n",
38 tmp->data.c_str ()));
40 size_t count = 0;
41 RTScheduling::Current::IdType_var id = tmp->current->id ();
42 ACE_OS::memcpy (&count,
43 id->get_buffer (),
44 id->length ());
46 ACE_DEBUG ((LM_DEBUG,
47 "The spawned DT Guid is %d\n",
48 count));
50 RTScheduling::Current::NameList_var segment_name_list =
51 tmp->current->current_scheduling_segment_names ();
53 ACE_DEBUG ((LM_DEBUG,
54 "Segment Names for DT %d:\n",
55 count));
57 for (unsigned int i = 0; i < segment_name_list->length (); i++)
59 ACE_DEBUG ((LM_DEBUG,
60 "%C\n",
61 (*segment_name_list)[i].in ()));