1 #ifndef COMMAND_LINE_CLASS
2 #define COMMAND_LINE_CLASS
46 class internal_cmd_line_array_of_parms;
142 bool find(
char option_character,
int &index,
bool case_sense =
true)
const;
148 bool case_sense =
true)
const;
152 bool case_sense =
true)
const;
160 bool case_sense =
true)
const;
188 internal_cmd_line_array_of_parms *_implementation;
208 #define DEFINE_ARGC_AND_ARGV int _global_argc = 0; char **_global_argv = NULL_POINTER
211 #define SET_ARGC_ARGV(argc, argv) { \
212 application::_global_argc = argc; \
213 application::_global_argv = argv; \
int entries() const
Returns the number of fields found on the command line.
static structures::string_array get_command_line()
returns the command line passed to the program as a list of strings.
filesystem::filename program_name() const
Returns the program name found in the command line.
static void separate_command_line(const basis::astring &cmd_line, basis::astring &app, basis::astring &parms)
breaks apart a command line in "cmd_line" into "app" and "parms".
bool find(char option_character, int &index, bool case_sense=true) const
Returns true if the "option_character" is found in the parameters.
bool get_value(char option_character, basis::astring &value, bool case_sense=true) const
retrieves the "value" found for the option flag specified.
const command_parameter & get(int field) const
Returns the parameter at the "field" specified.
basis::astring text_form() const
returns a string with all the information we have for the command line.
basis::astring gather(int &index) const
coalesces parameters together until the next option flag.
bool zap(int field)
eats the entry at position "field".
command_line(int argc, char *argv[])
takes command line parameters in the form of "argc" and "argv".
DEFINE_CLASS_NAME("command_line")
const basis::astring & text() const
observes the string contents.
command_parameter(parameter_types type=BOGUS_ITEM)
default constructor initializes to mostly blank state.
DEFINE_CLASS_NAME("command_parameter")
command_parameter & operator=(const command_parameter &to_copy)
parameter_types type() const
observes the type of the parameter.
void type(parameter_types new_type)
modifies the type of the parameter.
Provides a dynamically resizable ASCII character string.
Provides operations commonly needed on file names.
An array of strings with some additional helpful methods.
Implements an application lock to ensure only one is running at once.