tcl::command_group Class Reference

Represents a set of overloaded tcl::command objects. More...

#include <tcl/commandgroup.h>

Collaboration diagram for tcl::command_group:

Collaboration graph
[legend]

List of all members.

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_grouplookup (tcl::interpreter &interp, const char *name) throw ()
 Find the named command, if it exists.
static command_grouplookup_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


Detailed Description

Represents a set of overloaded tcl::command objects.

Definition at line 58 of file commandgroup.h.


Member Function Documentation

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.

References add(), and lookup().


The documentation for this class was generated from the following files:

The software described here is Copyright (c) 1998-2005, Rob Peters.
This page was generated Wed Dec 3 06:56:48 2008 by Doxygen version 1.5.5.