Show
Ignore:
Timestamp:
12/24/09 21:05:08 (4 years ago)
Author:
saturday06
Message:

asasasas

Location:
lang/objective-cplusplus/i3/trunk/src/mil
Files:
5 modified

Legend:

Unmodified
Added
Removed
  • lang/objective-cplusplus/i3/trunk/src/mil/include/mil/FilterException.h

    r34447 r36267  
    55#endif 
    66 
    7     int filter_exception_and_start(int argc, char** argv, int (*start)(int, char**)); 
     7int filter_exception_and_start(int argc, char** argv, int (*start)(int, char**)); 
     8 
    89#ifdef __OBJC__ 
    9     int filter_exception_and_start_objc(int argc, char** argv, int (*start)(int, char**)); 
     10int filter_exception_and_start_objc(int argc, char** argv, int (*start)(int, char**)); 
    1011#define filter_exception_and_start filter_exception_and_start_objc 
    1112#endif 
     13 
    1214#ifdef __cplusplus 
    1315} 
  • lang/objective-cplusplus/i3/trunk/src/mil/include/mil/StaticData.cpp

    r36264 r36267  
    55#include "ModuleCommon.h" 
    66#include "Intl.h" 
     7#include "FilterException.h" 
     8#include "Intl.h" 
     9 
     10#undef filter_exception_and_start 
    711 
    812//#include <fecti/Utility/FBlockMemoryAllocator/FAllocatorImpl_Block.cpp> 
     
    99103} 
    100104 
    101 #undef filter_exception_and_start 
    102105extern "C" int filter_exception_and_start(int argc, char** argv, int (*start)(int, char**)) { 
    103106    return start(argc, argv); 
     
    120123 
    121124#ifdef __OBJC__ 
     125 
     126int filter_exception_and_start_objc(int argc, char** argv, int (*start)(int, char**)) { 
     127    int result = EXIT_FAILURE; 
     128 
     129    NS_DURING  
     130    { 
     131        NSAutoreleasePool* pool = [NSAutoreleasePool alloc]; 
     132        [pool init]; 
     133        result = filter_exception_and_start(argc, argv, start); 
     134    } 
     135    NS_HANDLER  
     136    { 
     137        fprintf(stderr, gettext("Objective-C Exception, name=[%s] reason=[%s]\n"), [[localException name] cString], [[localException reason] cString]); 
     138    } 
     139    NS_ENDHANDLER 
     140 
     141    return result; 
     142} 
     143 
     144@implementation WorkerThread 
     145- (void)setData: 
     146(void* (*)(void*))routine_ arg: 
     147(void*)arg_ { 
     148    routine = routine_; 
     149    arg = arg_; 
     150} 
     151- (void)start { 
     152    routine(arg); 
     153} 
     154@end 
     155 
    122156namespace mil { 
    123157class CocoaThreadManager : boost::noncopyable { 
  • lang/objective-cplusplus/i3/trunk/src/mil/include/mil/StaticDataObjC.cpp

    r36264 r36267  
    1 #include "PrecompiledHeaders.h" 
    2 #include "Thread.h" 
    3 #include "FilterException.h" 
    4 #include "Intl.h" 
    5  
    6 #undef filter_exception_and_start 
    7  
    8 int filter_exception_and_start_objc(int argc, char** argv, int (*start)(int, char**)) { 
    9     int result = EXIT_FAILURE; 
    10  
    11     NS_DURING  
    12     { 
    13         NSAutoreleasePool* pool = [NSAutoreleasePool alloc]; 
    14         [pool init]; 
    15         result = filter_exception_and_start(argc, argv, start); 
    16     } 
    17     NS_HANDLER  
    18     { 
    19         fprintf(stderr, gettext("Objective-C Exception, name=[%s] reason=[%s]\n"), [[localException name] cString], [[localException reason] cString]); 
    20     } 
    21     NS_ENDHANDLER 
    22  
    23     return result; 
    24 } 
    25  
    26 @implementation WorkerThread 
    27 - (void)setData: 
    28 (void* (*)(void*))routine_ arg: 
    29 (void*)arg_ { 
    30     routine = routine_; 
    31     arg = arg_; 
    32 } 
    33 - (void)start { 
    34     routine(arg); 
    35 } 
    36 @end 
    37  
  • lang/objective-cplusplus/i3/trunk/src/mil/src/test/DoubleBuffer.cpp

    r36203 r36267  
    11#include <mil/PrecompiledHeaders.h> 
     2 
     3 
     4 
  • lang/objective-cplusplus/i3/trunk/src/mil/src/test/Module.cpp

    r35836 r36267  
    785785 
    786786struct FooModule : mil::Module<FooModule> { 
    787     void run() { 
    788         loop(); 
    789     } 
    790  
    791787    void execute(Plus6& e) { 
    792788        global += 6; 
     
    795791 
    796792struct BarModule : mil::Module<FooModule> { 
    797     void run() { 
    798         loop(); 
    799     } 
    800793}; 
    801794 
     
    904897 
    905898struct FooModule : mil::Module<FooModule> { 
    906     void run() { 
    907         loop(); 
    908     } 
    909  
    910899    void execute(Plus5& e) { 
    911900        global += 5;