34 GAParameter(
const std::string &fn,
const std::string &sn, ParType tp,
const void *v);
43 std::string fullname()
const {
return fname; }
44 std::string shrtname()
const {
return sname; }
45 const void *value()
const
47 return (t == ParType::STRING
49 : (t == ParType::POINTER ? val.pval : &val));
51 const void *value(
const void *v)
54 return (t == ParType::STRING
56 : (t == ParType::POINTER ? val.pval : &val));
58 ParType type()
const {
return t; }
72 void setvalue(
const void *);
85 bool get(
const std::string &name,
void *)
const;
86 bool set(
const std::string &name,
const void *);
87 bool set(
const std::string &name,
int v) {
return set(name, (
void *)&v); }
88 bool set(
const std::string &name,
unsigned int v) {
return set(name, (
void *)&v); }
89 bool set(
const std::string &name,
char v) {
return set(name, (
void *)&v); }
90 bool set(
const std::string &name,
const char *v) {
return set(name, (
void *)v); }
91 bool set(
const std::string &name,
double v);
92 bool add(
const std::string &fn,
const std::string &sn, ParType,
const void *);
93 bool parse(
int &argc,
char **argv,
bool flag =
true);
95 bool write(
const char *filename)
const;
96 bool write(std::ostream &os)
const;
97 bool read(
const std::string &filename,
bool flag =
true);
98 bool read(std::istream &is,
bool flag =
true);
101 inline std::ostream &operator<<(std::ostream &os,
const GAParameterList &plist)
106 inline std::istream &operator>>(std::istream &is,
GAParameterList &plist)
Parameter List.
Definition: GAParameter.h:83
Naming the parameters.
Definition: GAParameter.h:32
Definition: GAParameter.h:63