Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 3353 for code/branches


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

fixed some possible namespace issues

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

Legend:

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

    r3318 r3353  
    5757        try
    5858        {
    59             this->interpreter_->def("orxonox::irc::say", IRC::tcl_say, Tcl::variadic());
    60             this->interpreter_->def("orxonox::irc::privmsg", IRC::tcl_privmsg, Tcl::variadic());
    61             this->interpreter_->def("orxonox::irc::action", IRC::tcl_action, Tcl::variadic());
    62             this->interpreter_->def("orxonox::irc::info", IRC::tcl_info, Tcl::variadic());
     59            this->interpreter_->def("::orxonox::irc::say", IRC::tcl_say, Tcl::variadic());
     60            this->interpreter_->def("::orxonox::irc::privmsg", IRC::tcl_privmsg, Tcl::variadic());
     61            this->interpreter_->def("::orxonox::irc::action", IRC::tcl_action, Tcl::variadic());
     62            this->interpreter_->def("::orxonox::irc::info", IRC::tcl_info, Tcl::variadic());
    6363        }
    6464        catch (Tcl::tcl_error const &e)
  • code/branches/resource/src/core/TclBind.cc

    r3350 r3353  
    7979            this->interpreter_ = this->createTclInterpreter();
    8080
    81             this->interpreter_->def("orxonox::query", TclBind::tcl_query, Tcl::variadic());
    82             this->interpreter_->def("orxonox::crossquery", TclThreadManager::tcl_crossquery, Tcl::variadic());
     81            this->interpreter_->def("::orxonox::query", TclBind::tcl_query, Tcl::variadic());
     82            this->interpreter_->def("::orxonox::crossquery", TclThreadManager::tcl_crossquery, Tcl::variadic());
    8383            this->interpreter_->def("execute", TclBind::tcl_execute, Tcl::variadic());
    84             this->interpreter_->def("orxonox::crossexecute", TclThreadManager::tcl_crossexecute, Tcl::variadic());
     84            this->interpreter_->def("::orxonox::crossexecute", TclThreadManager::tcl_crossexecute, Tcl::variadic());
    8585
    8686            try
    8787            {
    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 }");
     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 }");
    9191                this->interpreter_->eval("proc running      {}        { return 1 }");
    9292                this->interpreter_->eval("set id 0");
    93                 this->interpreter_->eval("rename exit tcl::exit; proc exit {} { execute exit }");
     93                this->interpreter_->eval("rename exit ::tcl::exit; proc exit {} { execute exit }");
    9494            }
    9595            catch (Tcl::tcl_error const &e)
  • 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.