There are two important C++ functions in TclBind:
- tcl(command): Executes a tcl command (also available as a ConsoleCommand)
- eval(command): Executes a tcl command and returns the returnvalue
On the other hand, TclBind defines some new Tcl procedures:
- execute command: Executes a ConsoleCommand in the CommandExecutor
- query command: Executes a ConsoleCommand in the CommandExecutor and returns the returnvalue
- crossquery id command: Sends a command to another Tcl interpreter (see TclThreadManager?)
If Tcl finds an unknown procedure, it automatically passes the command via execute to the CommandExecutor. This allows you to call Orxonox commands within Tcl wihtout defining a Tcl alias for every Orxonox command.
Additionally the native Tcl procedure puts sends it's output to the orxout() instead of directly using the standard output device.
Learn more about Tcl in the Tcl-wiki: http://wiki.tcl.tk/