#include <iostream>#include <map>#include <vector>#include "log.h"#include "arguments.h"Classes | |
| class | argument |
Defines | |
| #define | DEBUG_ROUTINE "arguments" |
Functions | |
| void | arg_add (std::string arg, std::string param, std::string group, std::string text, sigc::signal< void, std::string > handler) |
| Add a new argument definition to parse. | |
| void | arg_extra (std::string arg, std::string param) |
| Alternative name of the last argument. | |
| string | dup_str (string todub, int dubs) |
| Create a string that dupicates the base string a number of times. | |
| void | show_help () |
| Calculate the amount of room needed between arguments and descriptions and show the help. | |
| void | arg_parse (int args, char *argv[]) |
| Routine that scans the arguments and invokes the various functions on them. | |
Variables | |
| map< string, argument > | arguments |
| Map from the arguments to its parameters. | |
| vector< string > | help |
| --help text lines | |
| vector< string > | version |
| --version text lines | |
| static string | args = "" |
| List of parameters that are synonimes of each other. | |
| static string | lastarg = "" |
| The previous argument found. | |
| static string | lasttext = "" |
| The previous description. | |
| static argument | last |
| The previous argument parameters. | |
| static string | program |
| The name of the current program for --help and --version texts. | |
| #define DEBUG_ROUTINE "arguments" |
| void arg_add | ( | std::string | arg, | |
| std::string | param, | |||
| std::string | group, | |||
| std::string | text, | |||
| sigc::signal< void, std::string > | handler | |||
| ) |
| void arg_extra | ( | std::string | arg, | |
| std::string | param | |||
| ) |
| void arg_parse | ( | int | args, | |
| char * | argv[] | |||
| ) |
Routine that scans the arguments and invokes the various functions on them.
This routine also handles --help and --version calls and exists then directly
| args | Number of command line arguments |
| argv | Array of the cmmand line argument strings |
| string dup_str | ( | string | todub, | |
| int | dubs | |||
| ) |
Create a string that dupicates the base string a number of times.
| todub | The string to duplicate |
| dubs | Number of duplicates needed |
| void show_help | ( | ) |
Calculate the amount of room needed between arguments and descriptions and show the help.
string args = "" [static] |
List of parameters that are synonimes of each other.
| vector<string> help |
--help text lines
string lasttext = "" [static] |
The previous description.
string program [static] |
The name of the current program for --help and --version texts.
| vector<string> version |
--version text lines
Generated on Tue Jan 1 17:30:01 2008 for general/arguments.cc File Reference by
Visit the project page on