Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 3350


Ignore:
Timestamp:
Jul 25, 2009, 9:46:24 PM (15 years ago)
Author:
landauf
Message:

small changes relating to tcl

Location:
code/branches/resource/src/core
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • code/branches/resource/src/core/ConsoleCommandCompilation.cc

    r3198 r3350  
    9494        if (newline)
    9595        {
    96             COUT(0) << text << std::endl;
     96            COUT(0) << stripEnclosingBraces(text) << std::endl;
    9797        }
    9898        else
    9999        {
    100             COUT(0) << text;
     100            COUT(0) << stripEnclosingBraces(text);
    101101        }
    102102    }
  • code/branches/resource/src/core/TclBind.cc

    r3345 r3350  
    8686            try
    8787            {
    88                 this->interpreter_->eval("proc query args { orxonox::query [join $args] }");
    89                 this->interpreter_->eval("proc crossquery {id args} { orxonox::crossquery 0 $id [join $args] }");
    90                 this->interpreter_->eval("proc crossexecute {id args} { orxonox::crossquery 0 $id [join $args] }");
     88                this->interpreter_->eval("proc query        {args}    { orxonox::query $args }");
     89                this->interpreter_->eval("proc crossquery   {id args} { orxonox::crossquery 0 $id $args }");
     90                this->interpreter_->eval("proc crossexecute {id args} { orxonox::crossquery 0 $id $args }");
     91                this->interpreter_->eval("proc running      {}        { return 1 }");
    9192                this->interpreter_->eval("set id 0");
    9293                this->interpreter_->eval("rename exit tcl::exit; proc exit {} { execute exit }");
     
    105106        Tcl::interpreter* interpreter;
    106107#ifdef DEPENDENCY_PACKAGE_ENABLE
    107         if (true)//Core::isDevelopmentRun())
     108        if (Core::isDevelopmentRun())
    108109            interpreter = new Tcl::interpreter(std::string(ORXONOX_DEP_LIB_PATH) + "/tcl");
    109110        else
  • code/branches/resource/src/core/TclThreadManager.cc

    r3344 r3350  
    257257            newbundle->interpreter_->def("execute",      TclThreadManager::tcl_execute,      Tcl::variadic());
    258258            newbundle->interpreter_->def("crossexecute", TclThreadManager::tcl_crossexecute, Tcl::variadic());
    259             newbundle->interpreter_->eval("proc query       args     { orxonox::query " + id_string + " $args }");
     259            newbundle->interpreter_->eval("proc query      {args}    { orxonox::query " + id_string + " $args }");
    260260            newbundle->interpreter_->eval("proc crossquery {id args} { orxonox::crossquery " + id_string + " $id $args }");
     261            newbundle->interpreter_->eval("proc running    {}        { return [orxonox::running " + id_string + "] }");
    261262
    262263            // Define a variable containing the thread id
     
    268269
    269270            // Redefine some native functions
    270 //            newbundle->interpreter_->eval("rename while tcl::while");
    271 //            newbundle->interpreter_->eval("proc while {test command} { tcl::while {[uplevel 1 expr $test]} {uplevel 1 $command} }"); // (\"$test\" && [orxonox::running " + id + "]])
    272 //            newbundle->interpreter_->eval("rename for tcl::for");
    273 //            newbundle->interpreter_->eval("proc for {start test next command} { uplevel tcl::for \"$start\" \"$test\" \"$next\" \"$command\" }");
     271            newbundle->interpreter_->eval("rename while tcl::while");
     272            newbundle->interpreter_->eval("rename orxonox::while while");
     273            newbundle->interpreter_->eval("rename for tcl::for");
     274            newbundle->interpreter_->eval("rename orxonox::for for");
    274275        }
    275276        catch (const Tcl::tcl_error& e)
     
    296297        // TODO
    297298        // Not yet implemented
     299        TclInterpreterBundle* bundle = TclThreadManager::getInstance().getInterpreterBundle(id);
     300        if (bundle)
     301        {
     302            bundle->bRunning_ = false;
     303        }
    298304    }
    299305
Note: See TracChangeset for help on using the changeset viewer.