
#include <tcl/command.h>


Public Member Functions | |
| call_context (tcl::interpreter &interp, unsigned int objc, Tcl_Obj *const *objv) | |
| Construct with a Tcl interpreter and an argument list. | |
| virtual | ~call_context () throw () |
| Virtual destructor. | |
| tcl::interpreter & | interp () const throw () |
| Get the Tcl interpreter of the current invocation. | |
| unsigned int | objc () const throw () |
| Return the number of arguments in the current invocation. | |
| template<class T > | |
| returnable< T >::type | get_arg (unsigned int argn) |
| template<class T > | |
| void | set_result (T t) |
Return satisfactorily with the result t of type T. | |
| Tcl_Obj *const * | get_raw_args () const throw () |
| Get the raw objv array. | |
Protected Member Functions | |
| virtual Tcl_Obj * | get_objv (unsigned int n) throw () |
| Get the n'th argument. | |
| virtual void | set_obj_result (const tcl::obj &obj) |
| Return a Tcl_Obj*. | |
Friends | |
| class | tcl::command |
tcl::call_context, which is passed to tcl::command::invoke(), provides a get_arg() for getting values from command arguments, and provides set_result() for returning values to the Tcl interpreter.
Definition at line 184 of file command.h.
| tcl::call_context::call_context | ( | tcl::interpreter & | interp, | |
| unsigned int | objc, | |||
| Tcl_Obj *const * | objv | |||
| ) |
Construct with a Tcl interpreter and an argument list.
Definition at line 193 of file command.cc.
| tcl::call_context::~call_context | ( | ) | throw () [virtual] |
Virtual destructor.
Definition at line 200 of file command.cc.
| returnable<T>::type tcl::call_context::get_arg | ( | unsigned int | argn | ) | [inline] |
Attempt to convert argument number argn to type T, and return the result of the conversion.
Definition at line 206 of file command.h.
References get_objv().
| virtual Tcl_Obj* tcl::call_context::get_objv | ( | unsigned int | n | ) | throw () [inline, protected, virtual] |
Get the n'th argument.
Reimplemented in tcl::vec_context.
Definition at line 227 of file command.h.
Referenced by get_arg().
| Tcl_Obj* const* tcl::call_context::get_raw_args | ( | ) | const throw () [inline] |
| tcl::interpreter& tcl::call_context::interp | ( | ) | const throw () [inline] |
| unsigned int tcl::call_context::objc | ( | ) | const throw () [inline] |
| void tcl::call_context::set_obj_result | ( | const tcl::obj & | obj | ) | [protected, virtual] |
Return a Tcl_Obj*.
Reimplemented in tcl::vec_context.
Definition at line 203 of file command.cc.
Referenced by set_result().
| void tcl::call_context::set_result | ( | T | t | ) | [inline] |
Return satisfactorily with the result t of type T.
Definition at line 214 of file command.h.
References set_obj_result().
Referenced by tcl::generic_function< R, func_wrapper >::invoke().
1.6.3