CmdActionHelp Class Reference

#include <CmdActionHelp.h>

Inheritance diagram for CmdActionHelp:

Inheritance graph
[legend]
Collaboration diagram for CmdActionHelp:

Collaboration graph
[legend]

List of all members.

Public Member Functions

virtual int doIt (CmdContext *cc, JCPN(Vector)*args)
virtual char * help ()
virtual char * argtype ()
virtual char ** names (int &len)

Private Member Functions

void writeCmdNames (CmdContext *cc, CmdAction *c)
void writeArgDesc (CmdContext *cc, char *argtype)

Private Attributes

char * namelist [2]


Detailed Description

The standard help implementation for a Cmd parser.

Member Function Documentation

void CmdActionHelp::writeCmdNames ( CmdContext cc,
CmdAction c 
) [private]

lists the names of the CmdAction given

void CmdActionHelp::writeArgDesc ( CmdContext cc,
char *  argtype 
) [private]

lists the syntax, as defined by the argtype given.

virtual int CmdActionHelp::doIt ( CmdContext cc,
JCPN(Vector)*  args 
) [virtual]

list help on a specific command or print the dictionary

Implements CmdAction.

virtual char* CmdActionHelp::help (  )  [virtual]

Returns a string containing the description of this command.

Implements CmdAction.

virtual char* CmdActionHelp::argtype (  )  [virtual]

Describes the args Vector wanted by this Command.

 This is our hack to get around stupid varargs-lessness in java.
 Each character indicates a separate user argument and its type.
 Type checked user input:
   C --> class named by user.
   c --> optional class named by user.
   I --> instance named by user.
   i --> optional instance named by user.
   S --> string token from user.
   s --> optional string token from user.
   K --> long token from user.
   k --> optional long token from user.
   D --> int token from user.
   d --> optional int token from user.
   B --> bool token from user.
   b --> optional bool token from user.
   G --> double token from user.
   g --> optional double token from user.
   * --> repeat previous character ad infinitum. can only appear last. 
 Special (cannot be followed directly by *):
   A --> all of the line after the command name token as a single string.
   a --> all of the line after the command name token as optional string.
   L --> the list of known CmdActions.
   P --> the command parser itself. 
 

Implements CmdAction.

virtual char** CmdActionHelp::names ( int &  len  )  [virtual]

name(s) of the function. Do not free them. on exit len is number of names.

Implements CmdAction.


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

Generated on Thu Sep 17 08:21:20 2009 for CCAFFEINE by  doxygen 1.5.9