#include <tcl/command.h>
Public Member Functions | |
virtual | ~arg_dispatcher () throw () |
Virtual destructor. | |
virtual void | dispatch (tcl::interpreter &interp, unsigned int objc, Tcl_Obj *const objv[], tcl::function &callback)=0 |
tcl::arg_dispatcher
. This may be subclassed in order to provide a different interface to the raw Tcl arguments (such as for vectorizing a function over a set of arguments). The default dispatcher used by tcl::command's implementation just sets up a tcl::call_context
and calls invoke(). Errors should be signaled by throwing appropriate exceptions, which will be caught and returned back to the Tcl interpreter as normal Tcl error messages.
Definition at line 160 of file command.h.
virtual void tcl::arg_dispatcher::dispatch | ( | tcl::interpreter & | interp, | |
unsigned int | objc, | |||
Tcl_Obj *const | objv[], | |||
tcl::function & | callback | |||
) | [pure virtual] |
Interprets the Tcl_Obj* arguments, sets up an appropriate tcl::call_context, and calls invoke() on the cmd with that context.
Implemented in tcl::vec_dispatcher.