Changeset 38674 for lang

Show
Ignore:
Timestamp:
11/15/10 10:52:45 (3 years ago)
Author:
saturday06
Message:

asdf

Location:
lang/objective-cplusplus/i3/trunk
Files:
7 modified

Legend:

Unmodified
Added
Removed
  • lang/objective-cplusplus/i3/trunk/src/i3/Mediator.cc

    r37884 r38674  
    5757    return 0; 
    5858} 
    59 CompletionWindow& Mediator::getCompletionWindow() { 
    60     return completionWindow; 
    61 } 
    62 OutputWindow& Mediator::getOutputWindow() { 
    63     return outputWindow; 
    64 } 
    65 InputWindow& Mediator::getInputWindow() { 
    66     return inputWindow; 
    67 } 
    68 ShellManager& Mediator::getShellManager() { 
    69     return shellManager; 
    70 } 
    71 Delegate& Mediator::getDelegate() { 
    72     return delegate; 
    73 } 
    7459} 
    7560 
  • lang/objective-cplusplus/i3/trunk/src/i3/Mediator.h

    r36210 r38674  
    2020    Delegate delegate; 
    2121public: 
    22     CompletionWindow& getCompletionWindow(); 
    23     OutputWindow& getOutputWindow(); 
    24     InputWindow& getInputWindow(); 
    25     ShellManager& getShellManager(); 
    26     Delegate& getDelegate(); 
     22    template <class Event, class Sender> 
     23    void postToCompletionWindow(Event& e, Sender& s) { 
     24        completionWindow.post(e, s); 
     25    } 
     26    template <class Event, class Sender> 
     27    void postToOutputWindow(Event& e, Sender& s) { 
     28        outputWindow.post(e, s); 
     29    } 
     30    template <class Event, class Sender> 
     31    void postToInputWindow(Event& e, Sender& s) { 
     32        inputWindow.post(e, s); 
     33    } 
     34    template <class Event, class Sender> 
     35    void postToShellManager(Event& e, Sender& s) { 
     36        shellManager.post(e, s); 
     37    } 
     38    template <class Event, class Sender> 
     39    void postToDelegate(Event& e, Sender& s) { 
     40        delegate.post(e, s); 
     41    } 
    2742    Mediator(); 
    2843    ~Mediator(); 
  • lang/objective-cplusplus/i3/trunk/src/i3/ui-cocoa/tests/TestUI.cc

    r38667 r38674  
    2121    return 9012; 
    2222} 
     23 
     24int filter4(int, char**) { 
     25    throw std::runtime_error("filter4"); 
     26    return 3456; 
     27} 
     28 
    2329} 
    2430 
     
    4046    QT_CHECK(strcmp("hoge", [[exception name] UTF8String]) == 0); 
    4147    QT_CHECK(strcmp("hige", [[exception reason] UTF8String]) == 0); 
     48 
     49    std::runtime_error e(""); 
     50    try { 
     51        exception = nil; 
     52        exception = filter_exception_and_start_objc(&result, filter4, 0, NULL); 
     53    } catch (std::runtime_error e_) { 
     54        e = e_; 
     55    } 
     56    QT_CHECK(result == EXIT_FAILURE); 
     57    QT_CHECK(exception == nil); 
     58    QT_CHECK(strcmp(e.what(), "filter4") == 0); 
    4259} 
    4360 
  • lang/objective-cplusplus/i3/trunk/src/i3/ui-windows/InputWindowPlatform.cc

    r38658 r38674  
    6666        return; 
    6767    } else if (_tcscmp(e.command, _T("exit")) == 0) { 
    68         ShowWindow(mediator.getInputWindow().window.load(), SW_HIDE); 
     68        //ShowWindow(mediator.getInputWindow().window.load(), SW_HIDE); 
    6969        ExitEvent ex; 
    70         mediator.getInputWindow().post(ex, *this); 
     70        mediator.postToInputWindow(ex, *this); 
    7171        tfree(e.command); 
    7272        return; 
    7373    } 
    7474 
    75     mediator.getShellManager().post(e, *this); 
     75    mediator.postToShellManager(e, *this); 
    7676    //HINSTANCE ins = ShellExecute( 
    7777    //    NULL,       // �e�E�B���h�E�̃n���h�� 
     
    105105    ///int result = GetWindowText(e.edit, data, _countof(data)); 
    106106    std::vector<TCHAR> data; 
    107     getChild().mediator.getInputWindow().read(data); 
     107    data.push_back(0); 
     108    //getChild().mediator.getInputWindow().read(data); 
    108109 
    109110    if (!data[0]) { 
     
    124125    BOOST_STATIC_ASSERT(sizeof(HICON) == sizeof(DWORD_PTR)); 
    125126 
    126     HICON old = getChild().mediator.getInputWindow().icon.exchange(new_icon); 
    127     if (old) { 
    128         DestroyIcon(old); 
    129     } 
    130     HWND hWnd = getChild().mediator.getInputWindow().getWindow(); 
    131     RECT r = { 
    132         0, 
    133         0, 
    134         32, 
    135         32 
    136     }; 
    137  
     127    //HICON old = getChild().mediator.sendToInputWindow().icon.exchange(new_icon); 
     128    //if (old) { 
     129    //    DestroyIcon(old); 
     130    //} 
     131    //HWND hWnd = getChild().mediator.getInputWindow().getWindow(); 
     132    //RECT r = { 
     133    //    0, 
     134    //    0, 
     135    //    32, 
     136    //    32 
     137    //}; 
    138138    //  
    139139    // TODO: InvalidateRect(,,TRUE) and UpdateWindow() redraw I/O policy 
    140140    //RedrawWindow(hWnd, &r, NULL, RDW_INTERNALPAINT); // should rewrite using postmessage 
    141141    //InvalidateRect(hWnd, &r, TRUE); 
    142     InvalidateRect(hWnd, NULL, FALSE); 
     142    //InvalidateRect(hWnd, NULL, FALSE); 
    143143    //UpdateWindow(hWnd); 
    144144} 
     
    431431 
    432432    EditChangedEvent e = {}; 
    433     getChild().mediator.getDelegate().post(e, *this); 
     433    getChild().mediator.postToDelegate(e, *this); 
    434434    SetMsgHandled(false); 
    435435} 
     
    466466                } 
    467467                memcpy(e.command, ptr, bytes); 
    468                 getChild().mediator.getDelegate().post(e, *this); 
     468                getChild().mediator.postToDelegate(e, *this); 
    469469                SetWindowText(edit, _T("")); 
    470470            } 
  • lang/objective-cplusplus/i3/trunk/src/mil/tests/New.cc

    r38662 r38674  
    77#include "Test.h" 
    88 
     9namespace NewTest { 
     10 
     11struct Simple { 
     12    void execute(AppendString& e) { 
     13    } 
     14}; 
    915 
    1016QT_TEST(test_New) { 
     17    mil::Module<Simple> simple1; 
     18    mil::Module<Simple> simple2; 
     19     
     20} 
    1121 
    1222} 
    13  
    14  
  • lang/objective-cplusplus/i3/trunk/unix/am/i3_test.am

    r38667 r38674  
    55src/i3/tests/Tester.cc \ 
    66src/i3/tests/TestNLS.cc \ 
    7 src/i3/tests/TestConfigFile.cc \ 
    8 src/i3/tests/TestEvent.cc \ 
    97src/i3/$(OS_DIR)/tests/TestOS.cc \ 
    108src/i3/$(UI_DIR)/tests/TestUI.cc 
    119 
     10 
     11#src/i3/tests/TestConfigFile.cc \ 
     12#src/i3/tests/TestEvent.cc \ 
     13# 
     14 
    1215i3_test_CPPFLAGS  = -I$(srcdir)/src/i3/tests 
     16i3_test_LDFLAGS   = -l./libmilobjcexceptionfilter.a 
    1317 
    1418if USE_GCC_PRECOMPILED_HEADER 
  • lang/objective-cplusplus/i3/trunk/unix/am/mil_test.am

    r38667 r38674  
    33mil_test_SOURCES = \ 
    44src/mil/tests/New.cc \ 
    5 src/mil/tests/Pool2.cc \ 
    6 src/mil/tests/Memory.cc \ 
    7 src/mil/tests/Thread.cc \ 
    8 src/mil/tests/DoubleBuffer.cc \ 
    9 src/mil/tests/MscCrt.cc \ 
    10 src/mil/tests/Synchronize.cc \ 
    11 src/mil/tests/Atomic.cc \ 
    12 src/mil/tests/Module.cc \ 
    135src/mil/tests/Main.cc \ 
    146src/mil/StaticData.cc 
     
    179# 
    1810 
     11# src/mil/tests/Pool.cc \ 
     12# src/mil/tests/Pool2.cc \ 
     13# src/mil/tests/Memory.cc \ 
     14# src/mil/tests/Thread.cc \ 
     15# src/mil/tests/DoubleBuffer.cc \ 
     16# src/mil/tests/MscCrt.cc \ 
     17# src/mil/tests/Synchronize.cc \ 
     18# src/mil/tests/Atomic.cc \ 
     19# src/mil/tests/Module.cc \ 
     20# 
     21# 
     22 
     23mil_test_CPPFLAGS = $(AM_CPPFLAGS) 
     24mil_test_LDFLAGS  = $(AM_LDFLAGS) 
     25mil_test_LDADD    = $(AM_LDADD) 
     26 
    1927if WITH_UI_WINDOWS 
    2028mil_test_SOURCES  += src/mil/windows/WindowProcedureTest.cc