#include <tcl/commandgroup.h>
Public Member Functions | |
void | add (rutz::shared_ptr< tcl::command > p) |
Add the given tcl::command to this group's overload list. | |
rutz::fstring | resolved_name () const |
Get this group's fully namespace-qualified command name. | |
rutz::fstring | usage () const |
Returns a string giving the command's proper usage, including overloads. | |
int | invoke_raw (int s_objc, Tcl_Obj *const objv[]) throw () |
Static Public Member Functions | |
static command_group * | lookup (tcl::interpreter &interp, const char *name) throw () |
Find the named command, if it exists. | |
static command_group * | lookup_original (tcl::interpreter &interp, const char *name) throw () |
Find the named command, after following any namespace aliases. | |
static rutz::shared_ptr < tcl::command > | make (tcl::interpreter &interp, rutz::shared_ptr< tcl::function > callback, const char *cmd_name, const char *usage, const tcl::arg_spec &spec, const rutz::file_pos &src_pos) |
Build a new tcl::command object that will be hooked into a tcl::command_group. | |
Friends | |
class | impl |
Classes | |
class | impl |
Definition at line 58 of file commandgroup.h.
tcl::command_group * tcl::command_group::lookup | ( | tcl::interpreter & | interp, | |
const char * | name | |||
) | throw () [static] |
Find the named command, if it exists.
Returns null if no such command. DO NOT DELETE the pointer returned from this function! Its lifetime is managed internally by tcl.
Definition at line 320 of file commandgroup.cc.
Referenced by make().
tcl::command_group * tcl::command_group::lookup_original | ( | tcl::interpreter & | interp, | |
const char * | name | |||
) | throw () [static] |
Find the named command, after following any namespace aliases.
Returns null if no such command. DO NOT DELETE the pointer returned from this function! Its lifetime is managed internally by tcl.
Definition at line 328 of file commandgroup.cc.
References rutz::fstring::c_str(), tcl::interpreter::eval(), tcl::interpreter::get_result(), and rutz::sfmt().
shared_ptr< tcl::command > tcl::command_group::make | ( | tcl::interpreter & | interp, | |
rutz::shared_ptr< tcl::function > | callback, | |||
const char * | cmd_name, | |||
const char * | usage, | |||
const tcl::arg_spec & | spec, | |||
const rutz::file_pos & | src_pos | |||
) | [static] |
Build a new tcl::command object that will be hooked into a tcl::command_group.
If there is already a tcl::command_group for the given name, then the new tcl::command will be hooked into that tcl::command_group as an overload. Otherwise, a brand new tcl::command_group will be created.
Definition at line 346 of file commandgroup.cc.