FLAMCLE/P-API
Command Line Executor/Parser Application Programming Interface
|
Table structure for arguments. More...
#include <CLPDEF.h>
Data Fields | |
int | siTyp |
Data type Type of this parameter (CLPTYP_xxxxxx). The type will be displayed in context sensitive help messages (TYPE: type_name). More... | |
const char * | pcKyw |
Keyword (Parameter name) Pointer to a null-terminated key word for this parameter (:alpha:[:alnum:|'_']*). More... | |
const char * | pcAli |
Alias (other name for a existing parameter) Pointer to another key word to define an alias (:alpha:[:alnum:|'_']*). More... | |
int | siMin |
Minimum amount of entries for this argument (0-optional n-required). More... | |
int | siMax |
Maximum amount of entries for this argument (1-scalar n-array (n=0 unlimited array, n>1 limited array)). More... | |
int | siSiz |
Data size If fixed size type (switch, number, float, object, overlay) then size of this type else (string) available size in memory. String type can be defined as FIX with CLPFLG_FIX but this requires a typedef for this string size. For dynamic strings an initial size for the first memory allocation can be defined. More... | |
int | siOfs |
Data Offset Offset of an argument in a structure used for address calculation (the offset of(t,m) instruction is used by the macros for it). More... | |
int | siOid |
Object identifier Unique integer value representing the argument (object identifier, used in overlays or for switches). More... | |
unsigned int | uiFlg |
Control Flag Flag value which can be assigned with CLPFLG_SEL/CON/FIX/CNT/SEN/ELN/TLN/OID/ALI to define different characteristics. More... | |
struct ClpArgument * | psTab |
Table for next level Pointer to another parameter table for CLPTYP_OBJECT and CLPTYP_OVRLAY describing these structures, for CLPTYP_NUMBER, CLPTYP_FLOATN or CLPTYP_STRING to define selections (constant definitions) More... | |
const char * | pcDft |
Default value. More... | |
const char * | pcMan |
Manual page. More... | |
const char * | pcHlp |
Help message. More... | |
Table structure for arguments.
To simplify the definition of the corresponding data structures and argument tables it is recommended to use the CLPARGTAB macros defined in CLPMAC.h or for constant definitions the CLPCONTAB macros below. With the CLPMAC.h you can generate the tables or the corresponding data structures, depending if DEFINE_STRUCT defined or not.
Example:
First you must define the table:
Then you can use this table to define your structure or union, in our case we create a union:
And you use the same define to allocate the corresponding CLP table:
int ClpArgument::siTyp |
Data type Type of this parameter (CLPTYP_xxxxxx). The type will be displayed in context sensitive help messages (TYPE: type_name).
const char* ClpArgument::pcKyw |
Keyword (Parameter name) Pointer to a null-terminated key word for this parameter (:alpha:[:alnum:|'_']*).
const char* ClpArgument::pcAli |
Alias (other name for a existing parameter) Pointer to another key word to define an alias (:alpha:[:alnum:|'_']*).
int ClpArgument::siMin |
Minimum amount of entries for this argument (0-optional n-required).
int ClpArgument::siMax |
Maximum amount of entries for this argument (1-scalar n-array (n=0 unlimited array, n>1 limited array)).
int ClpArgument::siSiz |
Data size If fixed size type (switch, number, float, object, overlay) then size of this type else (string) available size in memory. String type can be defined as FIX with CLPFLG_FIX but this requires a typedef for this string size. For dynamic strings an initial size for the first memory allocation can be defined.
int ClpArgument::siOfs |
Data Offset Offset of an argument in a structure used for address calculation (the offset of(t,m) instruction is used by the macros for it).
int ClpArgument::siOid |
Object identifier Unique integer value representing the argument (object identifier, used in overlays or for switches).
unsigned int ClpArgument::uiFlg |
Control Flag Flag value which can be assigned with CLPFLG_SEL/CON/FIX/CNT/SEN/ELN/TLN/OID/ALI to define different characteristics.
struct ClpArgument* ClpArgument::psTab |
Table for next level Pointer to another parameter table for CLPTYP_OBJECT and CLPTYP_OVRLAY describing these structures, for CLPTYP_NUMBER, CLPTYP_FLOATN or CLPTYP_STRING to define selections (constant definitions)
const char* ClpArgument::pcDft |
Default value.
Pointer to a zero-terminated string to define the default values assigned if no argument was defined. If this pointer is NULL or empty ("") then no initialization is done.
For arrays of these types a list of the corresponding values (literals or key words) can be defined The default values are displayed in context sensitive help messages (PROPERTY: [value_list]) This value can be override by corresponding environment variable or property definition.
const char* ClpArgument::pcMan |
Manual page.
Pointer to a zero-terminated string for a detailed description of this argument (in ASCIIDOC format, content behind. DESCRIPTION, mainly simply some paragraphs). Can be a NULL pointer or empty string for constant definition or simple arguments. It is recommended to use a header file with a define for this long string (required for objects and overlays). All occurrences of "&{OWN}" or "&{PGM}" (that all their case variations) are replaced with the current owner or program name, respectively. All other content between "&{" and "}" is ignored (comment). The resulting text is converted on EBCDIC systems).
const char* ClpArgument::pcHlp |
Help message.
Pointer to a zero-terminated string for context sensitive help to this argument. Also used as headline in documentation generation. For this only alnum, blank, dot, comma, hyphen and parenthesis are used. At every other separator the headline will be cut, meaning it is possible to have more help information than head line. (converted on EBCDIC systems).