tcl::arg_spec Class Reference

Specify how many args a command can take. More...

#include <tcl/argspec.h>

List of all members.

Public Member Functions

 arg_spec (int nmin, int nmax=-1, bool ex=false)
 Construct with initial values for m_argc_min/m_argc_max/m_is_exact.
arg_specmin (int nmin)
arg_specmax (int nmax)
arg_specexact (bool ex)
arg_specnolimit ()
bool allows_argc (unsigned int objc) const
unsigned int argc_min () const
unsigned int argc_max () const
bool is_exact () const

Detailed Description

Specify how many args a command can take.

By convention, argc_min() and argc_max() INCLUDE the zero'th argument (i.e. the command name) in the arg count. Thus a command that takes no parameters would have an arg count of 1. If is_exact() is true, then the argc of a command invocation is required to be exactly equal either argc_min() or argc_max(); if it is false, then argc must be between argc_min() and argc_max(), inclusive.

Definition at line 49 of file argspec.h.


Constructor & Destructor Documentation

tcl::arg_spec::arg_spec ( int  nmin,
int  nmax = -1,
bool  ex = false 
) [inline, explicit]

Construct with initial values for m_argc_min/m_argc_max/m_is_exact.

If the value given for nmax is negative, then m_argc_max will be set to the same value as nmin.

Definition at line 62 of file argspec.h.


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