Changeset 34497
- Timestamp:
- 07/20/09 13:58:32 (4 years ago)
- Location:
- lang/objective-cplusplus/i3/trunk
- Files:
-
- 6 modified
-
am/i3_test.am (modified) (1 diff)
-
src/Mediator.cpp (modified) (1 diff)
-
src/Mediator.h (modified) (2 diffs)
-
src/mil/include/mil/Mil.h (modified) (1 diff)
-
src/mil/include/mil/ModuleCommon.h (modified) (2 diffs)
-
src/mil/include/mil/Thread.h (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
lang/objective-cplusplus/i3/trunk/am/i3_test.am
r34477 r34497 13 13 src/${GUI_DIR}/GuiTest1.cpp \ 14 14 src/${GUI_DIR}/GuiTest2.cpp 15 #src/mil/src/BoostTestDummyLib.cpp16 15 17 16 i3_test_CXXFLAGS = ${i3_CXXFLAGS} 18 17 i3_test_LDFLAGS = ${i3_LDFLAGS} 19 i3_test_LDADD = ${i3_LDADD} #${BOOST_UNIT_TEST_FRAMEWORK_LIB}18 i3_test_LDADD = ${i3_LDADD} 20 19 21 i3_test2_SOURCES = ${i3_ test_SOURCES_NO_MAIN} \20 i3_test2_SOURCES = ${i3_SOURCES_NO_MAIN} \ 22 21 src/mil/src/TestMain.cpp \ 23 22 src/Test3.cpp 24 i3_test2_CXXFLAGS = ${i3_test_CXXFLAGS} 23 i3_test2_CXXFLAGS = ${i3_test_CXXFLAGS} -DTEST_HEADER="TestInputWindow1.h" 25 24 i3_test2_LDFLAGS = ${i3_test_LDFLAGS} 26 25 i3_test2_LDADD = ${i3_test_LDADD} -
lang/objective-cplusplus/i3/trunk/src/Mediator.cpp
r34484 r34497 1 1 #include <PrecompiledHeaders.h> 2 2 #include "Mediator.h" 3 4 #ifdef TEST_HEADER 5 #include BOOST_PP_STRINGIZE(TEST_HEADER) 6 #endif 3 7 4 8 using namespace mil; -
lang/objective-cplusplus/i3/trunk/src/Mediator.h
r34483 r34497 10 10 #include "Delegate.h" 11 11 #include "ShellManager.h" 12 13 #ifdef TEST_HEADER 14 #include BOOST_PP_STRINGIZE(TEST_HEADER) 15 #endif 12 16 13 17 namespace i3 { … … 31 35 32 36 } 37 38 #ifdef TEST_HEADER 39 #undef CompletionWindow 40 #undef InputWindow 41 #undef OutputWindow 42 #undef ShellManager 43 #undef Delegate 44 #endif 45 -
lang/objective-cplusplus/i3/trunk/src/mil/include/mil/Mil.h
r34447 r34497 101 101 } 102 102 103 #define MIL_MODULE_GET_SUPER_CHILD(o) ((o).getChild().getChild().getChild().getChild().getChild().getChild().getChild().getChild().getChild().getChild().getChild())104 #define MIL_MODULE_ GET_SUPER_CHILD_TYPE(t)t::ChildType::ChildType::ChildType::ChildType::ChildType::ChildType::ChildType::ChildType::ChildType::ChildType::ChildType103 #define MIL_MODULE_GET_SUPER_CHILD(o) ((o).getChild().getChild().getChild().getChild().getChild().getChild().getChild().getChild().getChild().getChild().getChild()) 104 #define MIL_MODULE_SUPER_CHILD_TYPE(t) typename t::ChildType::ChildType::ChildType::ChildType::ChildType::ChildType::ChildType::ChildType::ChildType::ChildType::ChildType 105 105 #define MIL_CRTP_CLASS_MEMBERS Child& getChild(){return *static_cast<Child*>(this);} typedef Child ChildType; 106 106 -
lang/objective-cplusplus/i3/trunk/src/mil/include/mil/ModuleCommon.h
r34477 r34497 274 274 template <class EventData, class Target> 275 275 static void execute(EventData& data, Target& target, ...) { 276 MIL_MODULE_GET_SUPER_CHILD(target).execute(data); 276 //MIL_MODULE_GET_SUPER_CHILD(target).execute(data); 277 278 MIL_MODULE_SUPER_CHILD_TYPE(Target)& o = 279 MIL_MODULE_GET_SUPER_CHILD(target); 280 281 o.execute(data); 282 277 283 } 278 284 279 285 template <class, class Target> 280 286 static void execute(ExitEvent data, Target& target, ...) { 281 MIL_MODULE_GET_SUPER_CHILD(target).destroy(); 287 MIL_MODULE_SUPER_CHILD_TYPE(Target)& o = 288 MIL_MODULE_GET_SUPER_CHILD(target); 289 290 o.destroy(); 282 291 } 283 292 }; … … 295 304 template <class T> 296 305 void post_exit_template(void* obj, void* event_memory) { 297 MIL_MODULE_GET_SUPER_CHILD(*reinterpret_cast<T*>(obj)).requestExit(event_memory); 306 MIL_MODULE_SUPER_CHILD_TYPE(T)& o = 307 MIL_MODULE_GET_SUPER_CHILD(*reinterpret_cast<T*>(obj)); 308 309 o.requestExit(event_memory); 298 310 } 299 311 300 312 template <class T> 301 313 void join_template(void* obj) { 302 MIL_MODULE_GET_SUPER_CHILD(*reinterpret_cast<T*>(obj)).join(); 314 MIL_MODULE_SUPER_CHILD_TYPE(T)& o = 315 MIL_MODULE_GET_SUPER_CHILD(*reinterpret_cast<T*>(obj)); 316 317 o.join(); 303 318 } 304 319 -
lang/objective-cplusplus/i3/trunk/src/mil/include/mil/Thread.h
r34448 r34497 174 174 static int thread_routine_filtered(int argc, char** argv) { 175 175 Thread<Child, ThreadType>* obj = (Thread<Child, ThreadType>*)argv; 176 MIL_MODULE_GET_SUPER_CHILD(*obj).run(); 176 //MIL_MODULE_GET_SUPER_CHILD(*obj).run(); 177 178 MIL_MODULE_SUPER_CHILD_TYPE(Thread<Child, ThreadType>)& o = 179 MIL_MODULE_GET_SUPER_CHILD(*obj); 180 181 o.run(); 182 183 177 184 obj->is_exited.store(true); 178 185 return 0;
![(please configure the [header_logo] section in trac.ini)](/share/chrome/site/your_project_logo.png)