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.

Classes

class  impl

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

Detailed Description

Represents a set of overloaded tcl::command objects.

Definition at line 58 of file commandgroup.h.


Member Function Documentation

void tcl::command_group::add ( rutz::shared_ptr< tcl::command p  ) 

Add the given tcl::command to this group's overload list.

Definition at line 387 of file commandgroup.cc.

Referenced by make().

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(), 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().

fstring tcl::command_group::resolved_name (  )  const

Get this group's fully namespace-qualified command name.

Definition at line 393 of file commandgroup.cc.

Referenced by usage().

fstring tcl::command_group::usage (  )  const

Returns a string giving the command's proper usage, including overloads.

Definition at line 402 of file commandgroup.cc.

References resolved_name().


The documentation for this class was generated from the following files:
Generated on Sun May 8 08:31:33 2011 for iLab Neuromorphic Vision Toolkit by  doxygen 1.6.3