|
CCAFFEINE
0.8.8
|
#include <CmdActionCCAPath.h>


Public Member Functions | |
| virtual char * | argtype () |
| virtual char ** | names (int &len) |
| virtual char * | help () |
| virtual int | doIt (CmdContext *cc, JCPN(Vector)*args) |
Private Member Functions | |
| char ** | pathToArgv (const char *path, int &argc) |
| void | destroyP2A (char **&argv, int argc) |
Private Attributes | |
| char * | namelist [1] |
path sub commands: init -- from env(CCA_COMPONENT_PATH) append -- add a dir to the path prepend -- insert dir at head of path set -- replace path show -- display current path
| char** CmdActionCCAPath::pathToArgv | ( | const char * | path, |
| int & | argc | ||
| ) | [private] |
disassembles env string to argv
| void CmdActionCCAPath::destroyP2A | ( | char **& | argv, |
| int | argc | ||
| ) | [private] |
destroys the result of a pathToArgv
| virtual char* CmdActionCCAPath::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** CmdActionCCAPath::names | ( | int & | len | ) | [virtual] |
name(s) of the function. Do not free them. on exit len is number of names.
Implements CmdAction.
| virtual char* CmdActionCCAPath::help | ( | ) | [virtual] |
Returns a string containing the description of this command.
Implements CmdAction.
| virtual int CmdActionCCAPath::doIt | ( | CmdContext * | cc, |
| JCPN(Vector)* | args | ||
| ) | [virtual] |
Does the action, called with the CmdContext of the interpreter and with a vector that matches the signature given by argtype(). The exit command returns 1; others return 0.
Implements CmdAction.
1.7.6.1