projects
/
h316.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
*** empty log message ***
[h316.git]
/
pc-tools
/
ldc2
/
src
/
configuration_manager.hh
diff --git
a/pc-tools/ldc2/src/configuration_manager.hh
b/pc-tools/ldc2/src/configuration_manager.hh
index d88d3dd7959bad57227dbe6f4a37d959d2d78d14..7849edf13cfdd46a827bae03722605a646a9d8b3 100644
(file)
--- a/
pc-tools/ldc2/src/configuration_manager.hh
+++ b/
pc-tools/ldc2/src/configuration_manager.hh
@@
-7,10
+7,11
@@
using namespace std;
/*!
using namespace std;
/*!
- *\brief Hachti's
wonderful commandline pars
er.
+ *\brief Hachti's
even more wonderful configuration manag
er.
*
* This class is designed to do all the work with the parameters passed to
* the main() routine of a program.\n
*
* This class is designed to do all the work with the parameters passed to
* the main() routine of a program.\n
+ * Additionally, it is able to interpret configuration files.
* Usage:\n
* - Create an instance.
* - Add Parameters/switches with add_param().
* Usage:\n
* - Create an instance.
* - Add Parameters/switches with add_param().
@@
-27,17
+28,20
@@
class argument_reader{
public:
argument_reader(string name);
public:
argument_reader(string name);
- void add_param (string shortname,
+ void add_param (string shortname,
string longname,
string description,
int *status,
string longname,
string description,
int *status,
+ bool allow_commandline=true,
+ bool allow_config_file=true,
string *target=NULL,
string placeholder=string("<string>")
);
vector<string> read_args(int argc, char ** args);
string *target=NULL,
string placeholder=string("<string>")
);
vector<string> read_args(int argc, char ** args);
+ vector<string> read_file(string filename);
- void get_help(vector<string> & target);
+ void get_help
(vector<string> & target);
vector<string> get_help();
void add_argument(string placeholder, string description, int * status, string * target);
vector<string> get_help();
void add_argument(string placeholder, string description, int * status, string * target);