Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jul 26, 2009, 1:02:22 AM (15 years ago)
Author:
landauf
Message:

fixed some possible namespace issues

File:
1 edited

Legend:

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

    r3350 r3353  
    248248
    249249            // Define the functions which are implemented in C++
    250             newbundle->interpreter_->def("orxonox::execute",      TclThreadManager::tcl_execute,      Tcl::variadic());
    251             newbundle->interpreter_->def("orxonox::crossexecute", TclThreadManager::tcl_crossexecute, Tcl::variadic());
    252             newbundle->interpreter_->def("orxonox::query",        TclThreadManager::tcl_query,        Tcl::variadic());
    253             newbundle->interpreter_->def("orxonox::crossquery",   TclThreadManager::tcl_crossquery,   Tcl::variadic());
    254             newbundle->interpreter_->def("orxonox::running",      TclThreadManager::tcl_running);
     250            newbundle->interpreter_->def("::orxonox::execute",      TclThreadManager::tcl_execute,      Tcl::variadic());
     251            newbundle->interpreter_->def("::orxonox::crossexecute", TclThreadManager::tcl_crossexecute, Tcl::variadic());
     252            newbundle->interpreter_->def("::orxonox::query",        TclThreadManager::tcl_query,        Tcl::variadic());
     253            newbundle->interpreter_->def("::orxonox::crossquery",   TclThreadManager::tcl_crossquery,   Tcl::variadic());
     254            newbundle->interpreter_->def("::orxonox::running",      TclThreadManager::tcl_running);
    255255
    256256            // Create threadspecific shortcuts for the functions above
    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 }");
    260             newbundle->interpreter_->eval("proc crossquery {id args} { orxonox::crossquery " + id_string + " $id $args }");
    261             newbundle->interpreter_->eval("proc running    {}        { return [orxonox::running " + id_string + "] }");
     259            newbundle->interpreter_->eval("proc query      {args}    { ::orxonox::query " + id_string + " $args }");
     260            newbundle->interpreter_->eval("proc crossquery {id args} { ::orxonox::crossquery " + id_string + " $id $args }");
     261            newbundle->interpreter_->eval("proc running    {}        { return [::orxonox::running " + id_string + "] }");
    262262
    263263            // Define a variable containing the thread id
     
    265265
    266266            // Use our own exit function to avoid shutting down the whole program instead of just the interpreter
    267             newbundle->interpreter_->eval("rename exit tcl::exit");
     267            newbundle->interpreter_->eval("rename exit ::tcl::exit");
    268268            newbundle->interpreter_->eval("proc exit {} { execute TclThreadManager destroy " + id_string + " }");
    269269
    270270            // Redefine some native functions
    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");
     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");
    275275        }
    276276        catch (const Tcl::tcl_error& e)
Note: See TracChangeset for help on using the changeset viewer.