Show
Ignore:
Timestamp:
07/19/09 13:24:13 (4 years ago)
Author:
saturday06
Message:

asdf

Location:
lang/objective-cplusplus/i3/trunk
Files:
1 removed
6 modified

Legend:

Unmodified
Added
Removed
  • lang/objective-cplusplus/i3/trunk/Makefile.am

    r34443 r34477  
    1010 
    1111if ENABLE_DEBUG 
    12 bin_PROGRAMS  += i3_test mil_test 
     12bin_PROGRAMS  += i3_test i3_test2 mil_test 
    1313WARNING_OPTIONS = \ 
    1414 -Wall \ 
  • lang/objective-cplusplus/i3/trunk/am/i3_test.am

    r34377 r34477  
    22# Common 
    33 
    4 i3_test_exe :   i3_test${EXEEXT} # for IDE 
     4i3_test_exe :   i3_test${EXEEXT} 
     5i3_test2_exe :   i3_test2${EXEEXT} 
    56 
    67i3_test_SOURCES = ${i3_SOURCES_NO_MAIN} \ 
     
    1819i3_test_LDADD     = ${i3_LDADD} #${BOOST_UNIT_TEST_FRAMEWORK_LIB} 
    1920 
     21i3_test2_SOURCES  = ${i3_test_SOURCES_NO_MAIN} \ 
     22src/mil/src/TestMain.cpp \ 
     23src/Test3.cpp 
     24i3_test2_CXXFLAGS = ${i3_test_CXXFLAGS} 
     25i3_test2_LDFLAGS  = ${i3_test_LDFLAGS} 
     26i3_test2_LDADD    = ${i3_test_LDADD} 
     27 
    2028# --------------------------------------- 
    2129# Common 
  • lang/objective-cplusplus/i3/trunk/src/Main.cpp

    r34447 r34477  
    11#include <PrecompiledHeaders.h> 
    22#include "Common.h" 
     3#include "InputWindow.h" 
     4#include "OutputWindow.h" 
     5#include "CompletionWindow.h" 
     6#include "Delegate.h" 
     7#include "ShellManager.h" 
     8 
    39#include "Mediator.h" 
    410 
  • lang/objective-cplusplus/i3/trunk/src/Mediator.h

    r34447 r34477  
    44 
    55#pragma once 
    6 #include "Common.h" 
    7 #include "InputWindow.h" 
    8 #include "OutputWindow.h" 
    9 #include "CompletionWindow.h" 
    10 #include "Delegate.h" 
    11 #include "ShellManager.h" 
    126 
    137namespace i3 { 
     8    class Mediator : public boost::noncopyable { 
     9        CompletionWindow completionWindow; 
     10        InputWindow inputWindow; 
     11        OutputWindow outputWindow; 
     12        ShellManager shellManager; 
     13        Delegate delegate; 
     14    public: 
     15        Mediator(): 
     16        completionWindow(*this), 
     17            inputWindow(*this), 
     18            outputWindow(*this), 
     19            shellManager(*this), 
     20            delegate(*this) { 
     21        } 
    1422 
    15 class Mediator : public boost::noncopyable { 
    16     CompletionWindow completionWindow; 
    17     InputWindow inputWindow; 
    18     OutputWindow outputWindow; 
    19     ShellManager shellManager; 
    20     Delegate delegate; 
    21 public: 
    22     CompletionWindow& getCompletionWindow(); 
    23     OutputWindow& getOutputWindow(); 
    24     InputWindow& getInputWindow(); 
    25     ShellManager& getShellManager(); 
    26     Delegate& getDelegate(); 
    27     Mediator(); 
    28     ~Mediator(); 
    29     exit_status start(); 
    30 }; 
     23        exit_status start() { 
     24#if !defined(MIL_GUI_COCOA) || defined(__APPLE__) 
     25            // threaded 
     26            inputWindow.createGui(); 
     27            completionWindow.start(); 
     28            outputWindow.start(); 
     29            shellManager.start(); 
     30            delegate.start(); 
     31            inputWindow.run(); 
     32#else 
     33            // no threaded gui 
     34            debug << "no threaded gui"; 
     35            completionWindow.createGui(); 
     36            outputWindow.createGui(); 
     37            inputWindow.createGui(); 
     38            shellManager.start(); 
     39 
     40            debug << "before loop"; 
     41 
     42            global_loop(); 
     43#endif 
     44            delegate.destroy(); 
     45            return 0; 
     46        } 
     47        CompletionWindow& getCompletionWindow() { 
     48            return completionWindow; 
     49        } 
     50        OutputWindow& getOutputWindow() { 
     51            return outputWindow; 
     52        } 
     53        InputWindow& getInputWindow() { 
     54            return inputWindow; 
     55        } 
     56        ShellManager& getShellManager() { 
     57            return shellManager; 
     58        } 
     59        Delegate& getDelegate() { 
     60            return delegate; 
     61        } 
     62    }; 
    3163 
    3264} 
     65 
  • lang/objective-cplusplus/i3/trunk/src/mil/include/mil/ModuleCommon.h

    r34448 r34477  
    114114 
    115115        DebugInfo* d = (DebugInfo*)memory; 
    116         BOOST_ASSERT(d->os_thread_id  == GetCurrentThreadId()); 
    117         BOOST_ASSERT(d->mil_thread_id == thread_id); 
    118         BOOST_ASSERT(d->blocks        == blocks); 
     116        if (d->os_thread_id != GetCurrentThreadId()) { 
     117            halt << "d->os_thread_id != GetCurrentThreadId(), " 
     118                 << d->os_thread_id << " != " << GetCurrentThreadId(); 
     119        } 
     120        if (d->mil_thread_id != thread_id) { 
     121            halt << "d->mil_thread_id == thread_id, " 
     122                 << d->mil_thread_id << " != " << thread_id; 
     123        } 
     124        if (d->blocks != blocks) { 
     125            halt << "d->blocks != blocks, " 
     126                 << d->blocks << " != " << blocks; 
     127        } 
    119128        ::free((void*)memory); 
    120129    }