Relacs
0.9.8
|
#include <options.h>
Public Types | |
enum | SaveFlags { NoName = 1, NoType = 2, NoInclude = 4, SwitchNameType = 8, Embrace = 16, PrintRequest = 32, FirstOnly = 64, PrintType = 128, PrintStyle = 256, DontCloseSection = 512, AlwaysQuote = 1024, EscapeQuotes = 2048 } |
typedef deque< Parameter > ::iterator | iterator |
typedef deque< Parameter > ::const_iterator | const_iterator |
typedef deque< Options * > ::iterator | section_iterator |
typedef deque< Options * > ::const_iterator | const_section_iterator |
Public Member Functions | |
Options (void) | |
Options (const Options &o) | |
Options (const Options &o, int flags) | |
Options (const string &name, const string &type, int flags, int style) | |
Options (const Str &opttxt, const string &assignment=":=", const string &separator=",;") | |
Options (const StrQueue &sq, const string &assignment=":=") | |
Options (istream &str, const string &assignment=":=", const string &comment="#", const string &stop="", string *line=0) | |
virtual | ~Options (void) |
Options & | operator= (const Options &o) |
Options & | assign (const Options &o) |
Options & | append (const Options &o) |
Options & | add (const Options &o) |
Options & | insert (const Options &o, const string &atname="") |
Options & | assign (const Options &o, int flags) |
Options & | copy (Options &o, int flags) |
Options & | append (const Options &o, int flags) |
Options & | add (const Options &o, int flags) |
Options & | insert (const Options &o, int flags, const string &atname="") |
Parameter * | assign (const string &name, const string &value) |
Options * | parentSection (void) |
const Options * | parentSection (void) const |
void | setParentSection (Options *parentsection) |
void | resetParents (void) |
Options * | rootSection (void) |
const Options * | rootSection (void) const |
string | name (void) const |
virtual void | setName (const string &name) |
virtual void | setName (const string &name, const string &type) |
string | type (void) const |
void | setType (const string &type) |
string | include (void) const |
void | setInclude (const string &include) |
void | setInclude (const string &url, const string &name) |
int | flag (void) const |
bool | flag (int selectflag) const |
Options & | setFlag (int flag) |
Options & | addFlag (int flag) |
Options & | delFlag (int flag) |
Options & | clearFlag (void) |
int | style (void) const |
Options & | setStyle (int style) |
Options & | addStyle (int style) |
Options & | delStyle (int style) |
Options & | clearStyle (void) |
bool | checkType (int mask) const |
Str | warning (void) const |
iterator | begin (void) |
iterator | end (void) |
const_iterator | begin (void) const |
const_iterator | end (void) const |
section_iterator | sectionsBegin (void) |
section_iterator | sectionsEnd (void) |
const_section_iterator | sectionsBegin (void) const |
const_section_iterator | sectionsEnd (void) const |
const_iterator | find (const string &pattern, int level=-1) const |
iterator | find (const string &pattern, int level=-1) |
const_iterator | rfind (const string &pattern, int level=-1) const |
iterator | rfind (const string &pattern, int level=-1) |
const_section_iterator | findSection (const string &pattern, int level=-1) const |
section_iterator | findSection (const string &pattern, int level=-1) |
const_section_iterator | rfindSection (const string &pattern, int level=-1) const |
section_iterator | rfindSection (const string &pattern, int level=-1) |
const Parameter & | operator[] (int i) const |
Parameter & | operator[] (int i) |
const Parameter & | operator[] (const string &name) const |
Parameter & | operator[] (const string &name) |
const Options & | section (int i) const |
Options & | section (int i) |
const Options & | section (const string &name) const |
Options & | section (const string &name) |
Str | request (const string &name) const |
Parameter & | setRequest (const string &name, const string &request) |
Parameter::ValueType | valueType (const string &name) const |
Parameter & | setValueType (const string &name, Parameter::ValueType type) |
int | flags (const string &name) const |
bool | flags (const string &name, int flag) const |
Parameter & | setFlags (const string &name, int flags) |
Parameter & | addFlags (const string &name, int flags) |
Parameter & | delFlags (const string &name, int flags) |
Parameter & | clearFlags (const string &name) |
bool | changed (const string &name) |
int | style (const string &name) const |
Parameter & | setStyle (const string &name, int style) |
Parameter & | addStyle (const string &name, int style) |
Parameter & | delStyle (const string &name, int style) |
Str | format (const string &name) const |
Parameter & | setFormat (const string &name, int width=0, int prec=-1, char fmt='g') |
Parameter & | setFormat (const string &name, const string &format) |
int | formatWidth (const string &name) const |
int | size (const string &name) const |
Parameter & | add (const Parameter &np) |
Parameter & | insert (const Parameter &np, const string &atname="") |
Parameter & | addText (const string &name, const string &request, const string &dflt, int flags=0, int style=0) |
Parameter & | addText (const string &name, const string &dflt="", int flags=0, int style=0) |
Parameter & | insertText (const string &name, const string &atname, const string &request, const string &dflt, int flags=0, int style=0) |
Parameter & | insertText (const string &name, const string &atname="", const string &dflt="", int flags=0, int style=0) |
Str | text (const string &name, int index, const string &dflt="", const string &format="", const string &unit="") const |
Str | text (const string &name, const string &dflt="", const string &format="", const string &unit="") const |
void | texts (const string &name, vector< string > &s, const string &format="", const string &unit="") const |
Str | allText (const string &name, const string &dflt="", const string &format="", const string &unit="", const string &separator=", ") const |
Parameter & | setText (const string &name, const string &strg) |
Parameter & | setText (const string &name, const Parameter &p) |
Parameter & | pushText (const string &name, const string &strg) |
Str | defaultText (const string &name, const string &format="", const string &unit="") const |
Parameter & | setDefaultText (const string &name, const string &dflt) |
Parameter & | addSelection (const string &name, const string &request, const string &selection, int flags=0, int style=0) |
Parameter & | addSelection (const string &name, const string &selection="", int flags=0, int style=0) |
Parameter & | insertSelection (const string &name, const string &atname, const string &request, const string &selection, int flags=0, int style=0) |
Parameter & | insertSelection (const string &name, const string &atname="", const string &selection="", int flags=0, int style=0) |
Parameter & | selectText (const string &name, const string &strg, int add=0) |
Parameter & | selectText (const string &name, int index) |
int | index (const string &name) const |
int | index (const string &name, const string &strg) const |
Parameter & | addNumber (const string &name, const string &request, double dflt, double minimum, double maximum=MAXDOUBLE, double step=1.0, const string &unit="", const string &outputunit="", const string &format="", int flags=0, int style=0) |
Parameter & | addNumber (const string &name, const string &request, double dflt, const string &unit="", const string &format="", int flags=0, int style=0) |
Parameter & | addNumber (const string &name, double dflt, const string &unit="", const string &format="", int flags=0, int style=0) |
Parameter & | addNumber (const string &name, double dflt, const string &unit, int flags, int style=0) |
Parameter & | addNumber (const string &name, double dflt, double error, const string &unit="", const string &format="", int flags=0, int style=0) |
Parameter & | addNumber (const string &name, const string &unit="", const string &format="", int flags=0, int style=0) |
Parameter & | insertNumber (const string &name, const string &atname, const string &request, double dflt, double minimum, double maximum=MAXDOUBLE, double step=1.0, const string &unit="", const string &outputunit="", const string &format="", int flags=0, int style=0) |
Parameter & | insertNumber (const string &name, const string &atname, const string &request, double dflt, const string &unit="", const string &format="", int flags=0, int style=0) |
Parameter & | insertNumber (const string &name, const string &atname, double dflt, const string &unit="", const string &format="", int flags=0, int style=0) |
Parameter & | insertNumber (const string &name, const string &atname, const string &unit="", const string &format="", int flags=0, int style=0) |
double | number (const string &name, double dflt=0.0, const string &unit="", int index=0) const |
double | number (const string &name, const string &unit, double dflt=0.0, int index=0) const |
double | number (const string &name, int index, double dflt=0.0, const string &unit="") const |
double | number (const string &name, int index, const string &unit, double dflt=0.0) const |
void | numbers (const string &name, vector< double > &n, const string &unit="") const |
double | error (const string &name, const string &unit="", int index=0) const |
double | error (const string &name, int index, const string &unit="") const |
void | errors (const string &name, vector< double > &n, const string &unit="") const |
Parameter & | setNumber (const string &name, double number, double error, const string &unit="") |
Parameter & | setNumber (const string &name, double number, const string &unit="") |
Parameter & | pushNumber (const string &name, double number, double error=-1.0, const string &unit="") |
Parameter & | pushNumber (const string &name, double number, const string &unit) |
Parameter & | setNumber (const string &name, const Parameter &p) |
double | defaultNumber (const string &name, const string &unit="") const |
Parameter & | setDefaultNumber (const string &name, double dflt, const string &unit="") |
double | minimum (const string &name, const string &unit="") const |
double | maximum (const string &name, const string &unit="") const |
double | step (const string &name, const string &unit="") const |
Parameter & | setStep (const string &name, double step, const string &unit="") |
Parameter & | setMinMax (const string &name, double minimum=-MAXDOUBLE, double maximum=MAXDOUBLE, double step=1.0, const string &unit="") |
Str | unit (const string &name) const |
Str | outUnit (const string &name) const |
Parameter & | setUnit (const string &name, const string &internunit, const string &outunit="") |
Parameter & | setOutUnit (const string &name, const string &outputunit) |
Parameter & | changeUnit (const string &name, const string &internunit) |
Parameter & | addInteger (const string &name, const string &request, long dflt, long minimum=LONG_MIN, long maximum=LONG_MAX, long step=1, const string &unit="", const string &outputunit="", int width=0, int flags=0, int style=0) |
Parameter & | addInteger (const string &name, long dflt, const string &unit="", int width=0, int flags=0, int style=0) |
Parameter & | addInteger (const string &name, const string &unit="") |
Parameter & | insertInteger (const string &name, const string &atname, const string &request, long dflt, long minimum=LONG_MIN, long maximum=LONG_MAX, long step=1, const string &unit="", const string &outputunit="", int width=0, int flags=0, int style=0) |
Parameter & | insertInteger (const string &name, const string &atname, long dflt, const string &unit="", int width=0, int flags=0, int style=0) |
Parameter & | insertInteger (const string &name, const string &atname, const string &unit="", int width=0, int flags=0, int style=0) |
long | integer (const string &name, const string &unit="", long dflt=0, int index=0) const |
long | integer (const string &name, int index, long dflt=0, const string &unit="") const |
long | integer (const string &name, int index, const string &unit, long dflt=0) const |
void | integers (const string &name, vector< long > &n, const string &unit="") const |
void | integers (const string &name, vector< int > &n, const string &unit="") const |
Parameter & | setInteger (const string &name, long number, long error, const string &unit="") |
Parameter & | setInteger (const string &name, long number, const string &unit="") |
Parameter & | pushInteger (const string &name, long number, long error, const string &unit="") |
Parameter & | pushInteger (const string &name, long number, const string &unit="") |
Parameter & | setInteger (const string &name, const Parameter &p) |
long | defaultInteger (const string &name, const string &unit="") const |
Parameter & | setDefaultInteger (const string &name, long dflt, const string &unit="") |
Parameter & | setMinMax (const string &name, long minimum=LONG_MIN, long maximum=LONG_MAX, long step=1, const string &unit="") |
Parameter & | setMinMax (const string &name, int minimum, int maximum, int step=1, const string &unit="") |
Parameter & | addBoolean (const string &name, const string &request, bool dflt, int flags=0, int style=0) |
Parameter & | addBoolean (const char *name, const char *request, bool dflt, int flags=0, int style=0) |
Parameter & | addBoolean (const string &name, bool dflt, int flags=0, int style=0) |
Parameter & | addBoolean (const char *name, bool dflt, int flags=0, int style=0) |
Parameter & | insertBoolean (const string &name, const string &atname="", const string &request="", bool dflt=false, int flags=0, int style=0) |
Parameter & | insertBoolean (const string &name, const string &atname, int flags=0, int style=0) |
bool | boolean (const string &name, bool dflt=false, int index=0) const |
bool | boolean (const string &name, int index, bool dflt=false) const |
void | booleans (const string &name, vector< bool > &n) const |
Parameter & | setBoolean (const string &name, bool b) |
Parameter & | setBoolean (const string &name, const Parameter &p) |
bool | defaultBoolean (const string &name) const |
Parameter & | setDefaultBoolean (const string &name, bool dflt) |
Parameter & | addDate (const string &name, const string &request, int year=0, int month=0, int day=0, int flags=0, int style=0) |
Parameter & | addDate (const string &name, int year, int month, int day, int flags=0, int style=0) |
Parameter & | addDate (const string &name, int flags=0, int style=0) |
Parameter & | insertDate (const string &name, const string &atname="", const string &request="", int year=0, int month=0, int day=0, int flags=0, int style=0) |
Parameter & | insertDate (const string &name, const string &atname, int year=0, int month=0, int day=0, int flags=0, int style=0) |
Parameter & | insertDate (const string &name, const string &atname, int flags=0, int style=0) |
const Parameter & | date (const string &name, int index, int &year, int &month, int &day) const |
Parameter & | setDate (const string &name, int year, int month, int day) |
Parameter & | setDate (const string &name, const string &date) |
Parameter & | setDate (const string &name, const struct tm &date) |
Parameter & | setDate (const string &name, const time_t &time) |
Parameter & | setCurrentDate (const string &name) |
Parameter & | setDate (const string &name, const Parameter &p) |
const Parameter & | defaultDate (const string &name, int index, int &year, int &month, int &day) const |
Parameter & | setDefaultDate (const string &name, int year, int month, int day) |
Parameter & | addTime (const string &name, const string &request, int hour=0, int minutes=0, int seconds=0, int milliseconds=0, int flags=0, int style=0) |
Parameter & | addTime (const string &name, int hour, int minutes, int seconds, int milliseconds=0, int flags=0, int style=0) |
Parameter & | addTime (const string &name, int flags=0, int style=0) |
Parameter & | insertTime (const string &name, const string &atname="", const string &request="", int hour=0, int minutes=0, int seconds=0, int milliseconds=0, int flags=0, int style=0) |
Parameter & | insertTime (const string &name, const string &atname, int hour=0, int minutes=0, int seconds=0, int milliseconds=0, int flags=0, int style=0) |
Parameter & | insertTime (const string &name, const string &atname, int flags=0, int style=0) |
const Parameter & | time (const string &name, int index, int &hour, int &minutes, int &seconds, int &milliseconds) const |
Parameter & | setTime (const string &name, int hour, int minutes, int seconds, int milliseconds=0) |
Parameter & | setTime (const string &name, const string &time) |
Parameter & | setTime (const string &name, const struct tm &time) |
Parameter & | setTime (const string &name, const time_t &time) |
Parameter & | setCurrentTime (const string &name) |
Parameter & | setTime (const string &name, const Parameter &p) |
const Parameter & | defaultTime (const string &name, int index, int &hour, int &minutes, int &seconds, int &milliseconds) const |
Parameter & | setDefaultTime (const string &name, int hour, int minutes, int seconds, int milliseconds=0) |
Options & | newSection (int level, const string &name, const string &type="", int flag=0, int style=0) |
Options & | newSection (int level, const string &name, int flag, int style=0) |
Options & | newSection (const string &name, const string &type="", int flag=0, int style=0) |
Options & | newSection (const string &name, int flag, int style=0) |
Options & | newSubSection (const string &name, const string &type="", int flag=0, int style=0) |
Options & | newSubSection (const string &name, int flag, int style=0) |
Options & | newSubSubSection (const string &name, const string &type="", int flag=0, int style=0) |
Options & | newSubSubSection (const string &name, int flag, int style=0) |
Options & | addSection (const string &name, const string &type="", int flag=0, int style=0) |
Options & | addSection (const string &name, int flag, int style=0) |
Options & | insertSection (const string &name, const string &atpattern, const string &type="", int flag=0, int style=0) |
Options & | insertSection (const string &name, const string &atpattern, int flag, int style=0) |
Options & | newSection (int level, const Options &opt, int selectmask, const string &name="", const string &type="", int flag=0, int style=0) |
Options & | newSection (int level, const Options &opt, const string &name="", const string &type="", int flag=0, int style=0) |
Options & | newSection (int level, const Options &opt, const string &name, int flag, int style=0) |
Options & | newSection (const Options &opt, int selectmask, const string &name="", const string &type="", int flag=0, int style=0) |
Options & | newSection (const Options &opt, const string &name="", const string &type="", int flag=0, int style=0) |
Options & | newSection (const Options &opt, const string &name, int flag, int style=0) |
Options & | newSubSection (const Options &opt, int selectmask, const string &name="", const string &type="", int flag=0, int style=0) |
Options & | newSubSection (const Options &opt, const string &name="", const string &type="", int flag=0, int style=0) |
Options & | newSubSection (const Options &opt, const string &name, int flag, int style=0) |
Options & | newSubSubSection (const Options &opt, int selectmask, const string &name="", const string &type="", int flag=0, int style=0) |
Options & | newSubSubSection (const Options &opt, const string &name="", const string &type="", int flag=0, int style=0) |
Options & | newSubSubSection (const Options &opt, const string &name, int flag, int style=0) |
Options & | addSection (const Options &opt, int selectmask, const string &name="", const string &type="", int flag=0, int style=0) |
Options & | addSection (const Options &opt, const string &name="", const string &type="", int flag=0, int style=0) |
Options & | addSection (const Options &opt, const string &name, int flag, int style=0) |
Options & | insertSection (const Options &opt, int selectmask, const string &name, const string &atpattern, const string &type="", int flag=0, int style=0) |
Options & | insertSection (const Options &opt, const string &name, const string &atpattern, const string &type="", int flag=0, int style=0) |
Options & | insertSection (const Options &opt, const string &name, const string &atpattern, int flag, int style=0) |
Options & | newSection (Options *opt, bool newparent=false) |
Options & | addSection (Options *opt, bool newparent=false) |
Options & | insertSection (Options *opt, const string &atpattern, bool newparent=false) |
Options & | newSections (Options *opt, bool newparent=false) |
void | endSection (void) |
void | clearSections (void) |
void | setSection (Options &opt) |
void | lastSection (void) |
int | up (void) |
int | down (void) |
Parameter & | setDefault (const string &name) |
Options & | setDefaults (int flags=0) |
Parameter & | setToDefault (const string &name) |
Options & | setToDefaults (int flags=0) |
Options & | erase (iterator p) |
Options & | erase (section_iterator p) |
Options & | erase (Options *s) |
Options & | erase (const string &pattern) |
Options & | erase (int selectflag) |
Options & | pop (void) |
Options & | popSection (void) |
Options & | flatten (Options *root=0) |
Options & | clear (bool revert=true) |
int | size (void) const |
int | size (int selectflag) const |
bool | empty (void) const |
int | parameterSize (void) const |
int | parameterSize (int flags) const |
int | sectionsSize (void) const |
int | sectionsSize (int flags) const |
bool | exist (const string &pattern) const |
bool | existSection (const string &pattern) const |
Options & | setFlags (int flags, int selectflag=0) |
Options & | addFlags (int flags, int selectflag=0) |
Options & | delFlags (int flags, int selectflag=0) |
Options & | setValueTypeFlags (int flags, int typemask) |
Options & | addValueTypeFlags (int flags, int typemask) |
Options & | delValueTypeFlags (int flags, int typemask) |
Options & | setStyles (int style, int selectflag=0) |
Options & | addStyles (int style, int selectflag=0) |
Options & | delStyles (int style, int selectflag=0) |
int | styleSize (int style) const |
Options & | setValueTypeStyles (int style, int typemask) |
Options & | addValueTypeStyles (int style, int typemask) |
Options & | delValueTypeStyles (int style, int typemask) |
int | nameWidth (int selectmask=0, bool detailed=false, bool escape=false) const |
string | save (int selectmask=0, int flags=0) const |
ostream & | save (ostream &str, const string &start="", int selectmask=0, int flags=0, int width=-1) const |
ostream & | save (ostream &str, const string &textformat, const string &numberformat, const string &boolformat="%i=%b", const string &dateformat="%i=%04Y-%02m-%02d", const string &timeformat="%i=%02H:%02M:%02S", const string §ionformat="%i", int selectmask=0, const string &start="") const |
ostream & | saveXML (ostream &str, int selectmask=0, int flags=0, int level=0, int indent=4) const |
Options & | read (const string &opttxt, int flag, const string &assignment=":=", const string &separator=",;", int *indent=0) |
Options & | read (const string &opttxt, const string &assignment=":=", const string &separator=",;") |
istream & | read (istream &str, int flag, const string &assignment=":=", const string &comment="#", const string &stop="", Str *line=0) |
istream & | read (istream &str, const string &assignment=":=", const string &comment="#", const string &stop="", Str *line=0) |
Options & | read (const StrQueue &sq, int flag=0, const string &assignment=":=") |
bool | read (const Parameter &p, int flag=0) |
Options & | read (const Options &o, int flags=0, int flag=0) |
bool | readAppend (const Parameter &p) |
Options & | readAppend (const Options &o, int flags=0) |
Options & | load (const Str &opttxt, const string &assignment=":=", const string &separator=",;", int *indent=0, int *indentspacing=0, int *level=0) |
istream & | load (istream &str, const string &assignment=":=", const string &comment="#", const string &stop="", string *line=0) |
Options & | load (const StrQueue &sq, const string &assignment=":=") |
virtual void | notify (void) |
void | callNotifies (void) |
bool | setNotify (bool notify=true) |
bool | unsetNotify (void) |
bool | notifying (void) const |
Static Public Member Functions | |
static double | floorLog10 (double v) |
static double | floor10 (double v, double scale=1.0) |
static double | ceil10 (double v, double scale=1.0) |
Static Public Attributes | |
static const int | NonDefault = Parameter::NonDefault |
static const long | TabSection = 0x04000000 |
Friends | |
bool | operator== (const Options &o1, const Options &o2) |
bool | operator== (const Options &o, const string &name) |
bool | operator< (const Options &o1, const Options &o2) |
ostream & | operator<< (ostream &str, const Options &o) |
istream & | operator>> (istream &str, Options &o) |
A hierarchical name-value list for configuration files and dialogs.
In addition to the name-value pairs an Options also contains other Options as so called sections. This way a hierarchical structure is created. Each Options has a name() and a type(). New sections can be added with the newSection() functions.
Use addNumber(), addInteger(), addBoolean(), addText(), addSelection(), addTime() and addDate() to add option variables to the currently active section. With insertNumber(), insertText(), etc. new options can be inserted into the options list.
Use setNumber(), setText(), etc. to change the value, minimum and maximum value, unit and format of an already existing option. With erase() options can selectively be erased.
The values of the options can be read out with number(), integer(), boolean(), text(), index(), time() and date(). In addition the default values are accessible with defaultNumber() and defaultText(). Minimum and maximum values can be read with minimum() and maximum(). The corresponding unit and formatting string can be read with unit() and format().
The total number of defined options is returned by size(). To check wether an option with a certain name exist use exist().
The read(), readAppend(), load() and save() functions read the values of options, load new options, and save options from and to strings or files. Options have a flag() and Parameter have flags(). These can be used to select them for saving, etc. THey also have a style() that is used to determine how they are displayed in a dialog.
typedef deque< Parameter >::const_iterator const_iterator |
typedef deque< Options* >::iterator section_iterator |
typedef deque< Options* >::const_iterator const_section_iterator |
enum SaveFlags |
Flags for the customizing saving of Options.
Enumerator | |
---|---|
NoName |
Do not save the name of a section. |
NoType |
Do not save the type of a section. |
NoInclude |
Do not save the include file of a section. |
SwitchNameType |
Switch name and type, i.e. the sections name is saved as its type, and its type is saved as its name. |
Embrace |
Make sure that the saved string is embraced with curly braces to get a valid YAML string. |
PrintRequest |
Print the request string. |
FirstOnly |
If the Parameter::ListAlways style bit is not set only print out the first value. |
PrintType |
Specify the type of the value. |
PrintStyle |
Indicate the style of a section or Parameter name. |
DontCloseSection |
Do not write the final closing |
AlwaysQuote |
Always quote value strings. |
EscapeQuotes |
Escape the quotes of strings with an backslash. |
Options | ( | void | ) |
Constructs an empty options list.
Referenced by Options::add(), Options::append(), Options::assign(), Options::copy(), Options::down(), Options::insertSection(), Options::load(), Options::newSection(), SaveFiles::RelacsFiles::open(), Options::readAppend(), and Options::section().
Copy constructor.
References Options::assign().
Copy Options o that have flags() & flags greater than zero to this. If flags equals zero, all options are copied.
References Options::assign().
Options | ( | const string & | name, |
const string & | type, | ||
int | flags, | ||
int | style | ||
) |
Constructs an empty Options with name name, type string type, flag flags, and style flag style.
Create options from string opttxt. See load( const Str &opttxt, const string &separator ) for details.
References Options::load().
Create options from strings sq. See load( const StrQueue &sq ) for details.
References Options::load().
Options | ( | istream & | str, |
const string & | assignment = ":=" , |
||
const string & | comment = "#" , |
||
const string & | stop = "" , |
||
string * | line = 0 |
||
) |
Create options from input stream str. See load( istream &str, const string &comment, const string &stop, string *line ) for details.
References Options::load().
|
virtual |
Deconstructs an options list.
References Options::clear().
Copy Options o to this.
References Options::assign().
Copy Options o to this.
References Options::begin(), Options::clear(), Options::end(), Options::Options(), Options::sectionsBegin(), Options::sectionsEnd(), and Options::setParentSection().
Referenced by MacroCommand::acceptDialog(), Options::operator=(), Options::Options(), and Options::read().
Append Options o to this. That is, all Parameter of o are added to this Options' Parameter and all sections of o are added to the list of this' sections.
References Options::begin(), Options::end(), Options::Options(), Options::sectionsBegin(), Options::sectionsEnd(), and Options::setParentSection().
Referenced by TableKey::add(), DeviceSelector::dialogClosed(), and SaveFiles::ODMLFiles::writeStimulus().
Append Options o to the currently active section of Options. That is, all Parameter and Sections of o are added to the Parameter and Sections of the currently active section of Options.
References Options::begin(), Options::end(), Options::Options(), Options::sectionsBegin(), Options::sectionsEnd(), and Options::setParentSection().
Referenced by Options::addBoolean(), Options::addDate(), Options::addInteger(), Options::addNumber(), Options::addText(), Options::addTime(), Options::flatten(), and Options::readAppend().
Insert all name-value pairs of Options o at the beginning of the options list (atname == "") or at the position of the option with name atname. If the option with name atname does not exist, the options are appended to the end of the list. Sections of o are not considered for insertion.
References Options::begin(), Options::end(), and Options::find().
Referenced by TableKey::insert(), DataFile::insert(), Options::insertBoolean(), Options::insertDate(), Options::insertInteger(), Options::insertNumber(), Options::insertText(), Options::insertTime(), and DataFile::readBlock().
Copy Options o that have flags() & flags greater than zero to this. If flags equals zero, all options are copied. If flags is negative, only options whose values differ from the default value and have abs(flags) set in their flags() are copied. If flags equals NonDefault, all options whose values differ from their default value are copied.
References Options::begin(), Options::clear(), Options::end(), Options::Options(), Options::sectionsBegin(), Options::sectionsEnd(), and Options::setParentSection().
Copy all options o that have flags() & flags greater than zero. If flags equals zero, all options are copied. If flags is negative, only options whose values differ from the default value and have abs(flags) set in their flags() are copied. If flags equals NonDefault, all options whose values differ from their default value are copied.
References Options::begin(), Options::clear(), Options::end(), Options::Options(), Options::sectionsBegin(), Options::sectionsEnd(), and Options::setParentSection().
Append all parameter and sections from o that have flags() & flags greater than zero to this. If flags equals zero, all Parameter and sections are appended. If flags is negative, only Parameter and sections whose values differ from the default value and have abs(flags) set in their flags() are copied. If flags equals NonDefault, all Parameter whose values differ from their default value are copied.
References Options::begin(), Options::end(), Options::Options(), Options::sectionsBegin(), Options::sectionsEnd(), and Options::setParentSection().
Append all parameter and sections from o that have flags() & flags greater than zero to the currently active section. If flags equals zero, all Parameter and sections are appended. If flags is negative, only Parameter and sections whose values differ from the default value and have abs(flags) set in their flags() are copied. If flags equals NonDefault, all Parameter whose values differ from their default value are copied.
References Options::begin(), Options::end(), Options::Options(), Options::sectionsBegin(), Options::sectionsEnd(), and Options::setParentSection().
Insert name-value pairs of o that have flags() & flags greater than zero at the beginning of the options list (atname == "") or at the position of the option with name atname. If the option with name atname does not exist, the options are appended to the end of the list. Sections of o are not considered for insertion.
References Options::begin(), Options::end(), and Options::find().
Parameter * assign | ( | const string & | name, |
const string & | value | ||
) |
Set the value of an existing option with name name to value. Set warning message, if the value is invalid. Used by read().
References Options::callNotifies(), Str::empty(), Options::end(), and Options::find().
Options * parentSection | ( | void | ) |
Returns a pointer to the Options where this Options belongs to as a section. If this Options does not belong to an Options, NULL is returned.
Referenced by Options::addSection(), Options::endSection(), TableKey::erase(), Options::erase(), Options::insert(), Options::insertSection(), Options::load(), Options::newSection(), DataDescriptionModel::parent(), Options::read(), Options::rootSection(), and Options::up().
const Options * parentSection | ( | void | ) | const |
Returns a const pointer to the Options where this Options belongs to as a section. If this Options does not belong to an Options, NULL is returned.
void setParentSection | ( | Options * | parentsection | ) |
Set the parent Options of this Options to parent.
Referenced by Options::add(), Options::addSection(), Options::append(), Options::assign(), Options::copy(), Options::down(), Options::erase(), Options::flatten(), Options::insertSection(), Options::load(), Options::newSection(), and Options::readAppend().
void resetParents | ( | void | ) |
Reset the parentSection() of all sections and subsections for this tree of Options.
References Options::sectionsBegin(), and Options::sectionsEnd().
Options * rootSection | ( | void | ) |
Returns a pointer to the top most Options in the hierarchy. If this Options does not have a parentSection() this is returned.
References Options::parentSection().
Referenced by Options::callNotifies().
const Options * rootSection | ( | void | ) | const |
Returns a pointer to the top most Options in the hierarchy. If this Options does not have a parentSection() this is returned.
References Options::parentSection().
string name | ( | void | ) | const |
The name of this section of options.
Referenced by MetaData::add(), OptWidget::assign(), SaveFiles::ODMLFiles::close(), DeviceList< T, PluginID >::create(), FilterDetectors::createFilters(), DataDescriptionModel::data(), FilterSelector::dialogClosed(), Options::down(), Options::load(), Options::nameWidth(), SaveFiles::ODMLFiles::open(), SaveFiles::RelacsFiles::openStimulusFiles(), OutList::operator=(), relacs::operator==(), Options::read(), Options::save(), Options::saveXML(), Attenuate::setFrequencyName(), Options::setInclude(), Attenuate::setIntensityName(), Options::setName(), MetaData::setSectionName(), Macros::startMacro(), Macros::startNextRePro(), SaveFiles::RelacsFiles::writeStimulus(), and SaveFiles::ODMLFiles::writeStimulus().
|
virtual |
Set the name of this section of options to name.
Reimplemented in Filter, RELACSPlugin, Control, ConfigDialog, and RePro.
References Options::name().
Referenced by OutData::alphaWave(), OutData::append(), OutData::bandNoiseWave(), OutData::constWave(), InData::copy(), Options::down(), Options::insertSection(), Options::load(), Options::newSection(), OutData::noiseWave(), OutData::ouNoiseWave(), OutData::pulseWave(), OutData::rampWave(), OutData::rectangleWave(), OutData::repeat(), SaveFiles::save(), OutData::sawDownWave(), OutData::sawUpWave(), Options::setName(), OutData::sineWave(), OutData::sweepWave(), and OutData::triangleWave().
|
virtual |
Set the name of this section of options to name and its type to type. The default implementation uses setName() for setting the name.
References Options::setName(), and Options::type().
string type | ( | void | ) | const |
The type specifyier of this section of options.
Referenced by DataIndex::addStimulus(), OutData::append(), DataDescriptionModel::data(), Device::deviceTypeStr(), Options::down(), PlotTrace::init(), OutData::load(), Options::load(), DataIndex::DataItem::loadCell(), Options::nameWidth(), OutData::operator+=(), OutList::operator=(), Options::save(), Options::saveXML(), Device::setDeviceType(), Options::setName(), Options::setType(), and SaveFiles::writeStimulus().
void setType | ( | const string & | type | ) |
Set the type specifier of this section of options to type.
References Options::type().
Referenced by OutData::alphaWave(), OutData::append(), OutData::bandNoiseWave(), OutData::constWave(), InData::copy(), Options::down(), OutData::fill(), Options::insertSection(), OutData::load(), Options::load(), DataIndex::DataItem::loadCell(), Options::newSection(), OutData::noiseWave(), OutData::operator+=(), OutData::ouNoiseWave(), OutData::pulseWave(), OutData::rampWave(), OutData::rectangleWave(), OutData::repeat(), OutData::sawDownWave(), OutData::sawUpWave(), MetaData::setSectionName(), OutData::sineWave(), OutData::sweepWave(), and OutData::triangleWave().
string include | ( | void | ) | const |
The include path.
Referenced by OutList::operator=(), Options::saveXML(), and Options::setInclude().
void setInclude | ( | const string & | include | ) |
Tell this section of options that it inherits some of it contents from a section in a different file specified by include.
References Options::include().
Referenced by Options::down(), and SaveFiles::ODMLFiles::writeStimulus().
void setInclude | ( | const string & | url, |
const string & | name | ||
) |
Tell this section of options that it inherits some of it contents from a section with name name saved in a different file at url. This information is written out by the saveXML() function only.
References Options::name().
int flag | ( | void | ) | const |
The flag for this secion of options.
Referenced by Options::addFlag(), Options::addFlags(), Options::addStyles(), Options::delFlags(), Options::delStyles(), Options::flag(), Options::nameWidth(), Options::save(), Options::saveXML(), FilterDetectors::setAdjustFlag(), ConfigClass::setConfigSelectMask(), Options::setFlag(), Options::setFlags(), and Options::setStyles().
bool flag | ( | int | selectflag | ) | const |
True if one of the bits specified by abs(selectflag) is set in the Option's flag(), or selectflag equals zero or NonDefault.
References relacs::abs(), Options::flag(), and Options::NonDefault.
Options & setFlag | ( | int | flag | ) |
Set the flag of this section of options to flag.
References Options::flag().
Referenced by Options::setFlags(), and Options::setValueTypeFlags().
Options & addFlag | ( | int | flag | ) |
Add the bits specified by flag to the flag of this section of options.
References Options::flag().
Referenced by Options::addFlags(), Options::addValueTypeFlags(), Options::insertSection(), and Options::newSection().
Options & delFlag | ( | int | flag | ) |
Clear the bits specified by flag in the flag of this section of options.
Referenced by Options::delFlags(), and Options::delValueTypeFlags().
Options & clearFlag | ( | void | ) |
Set all bits of the flag of this section of options, i.e. set it to 0.
int style | ( | void | ) | const |
The style flag for name() and type() of this secion of options.
Referenced by ConfigDialog::addDialogStyle(), Options::addStyle(), Options::load(), Options::save(), ConfigDialog::setDialogStyle(), Options::setStyle(), and Options::styleSize().
Options & setStyle | ( | int | style | ) |
Set the style flag for name() and type() of this section of options to style.
References Options::style().
Referenced by Options::down(), Options::load(), Options::setStyles(), and Options::setValueTypeStyles().
Options & addStyle | ( | int | style | ) |
Add the bits specified by style in the style flag for name() and type() of this section of options.
References Options::style().
Referenced by Options::addStyles(), Options::addValueTypeStyles(), Options::insertSection(), and Options::newSection().
Options & delStyle | ( | int | style | ) |
Clear the bits specified by style in the style flag for name() and type() of this section of options.
Referenced by Options::delStyles(), and Options::delValueTypeStyles().
Options & clearStyle | ( | void | ) |
Clear all bits of the style of this section of options, i.e. set it to 0.
bool checkType | ( | int | mask | ) | const |
true
if one of the bits specified by mask corresponds to the Parameter::Section bit, or mask equals zero, or mask is negative and the Parameter::Section bit is not contained in abs( mask ). References Parameter::Section.
Referenced by Options::addValueTypeFlags(), Options::addValueTypeStyles(), Options::delValueTypeFlags(), Options::delValueTypeStyles(), Options::setValueTypeFlags(), and Options::setValueTypeStyles().
|
inline |
Returns the warning messages of the last called Option member-function.
Referenced by RePro::checkOptions(), FilterDetectors::createFilters(), FilterDetectors::createTracesEvents(), FilterDetectors::filter(), FilterDetectors::init(), and Options::load().
|
inline |
Referenced by Options::add(), Options::addFlags(), Options::addStyles(), Options::addValueTypeFlags(), Options::addValueTypeStyles(), Options::append(), OutData::append(), Options::assign(), OptWidget::assign(), Macros::check(), Options::copy(), Options::delFlags(), MacroFile::delMacro(), Options::delStyles(), Options::delValueTypeFlags(), Options::delValueTypeStyles(), Options::erase(), Options::find(), Options::insert(), Options::nameWidth(), relacs::operator<(), relacs::operator==(), Options::parameterSize(), Options::read(), Options::readAppend(), DataFile::readBlock(), DataFile::readMetaData(), Options::rfind(), Options::save(), Options::saveXML(), Options::setDefaults(), Options::setFlags(), Options::setStyles(), Options::setToDefaults(), Options::setValueTypeFlags(), Options::setValueTypeStyles(), Options::size(), Options::styleSize(), and Options::up().
|
inline |
Referenced by OptWidgetBase::activateOption(), Options::add(), Options::addFlags(), Options::addStyle(), Options::addStyles(), Options::addValueTypeFlags(), Options::addValueTypeStyles(), Options::allText(), Options::append(), OutData::append(), Options::assign(), OptWidget::assign(), Options::boolean(), Options::booleans(), Options::changed(), Options::changeUnit(), Options::clearFlags(), TableKey::column(), Options::copy(), FilterDetectors::createFilters(), OptWidget::customEvent(), Options::date(), Options::defaultBoolean(), Options::defaultDate(), Options::defaultInteger(), Options::defaultNumber(), Options::defaultText(), Options::defaultTime(), Options::delFlags(), MacroFile::delMacro(), Options::delStyle(), Options::delStyles(), Options::delValueTypeFlags(), Options::delValueTypeStyles(), Options::erase(), Options::error(), Options::errors(), Options::exist(), Options::find(), Options::flags(), Options::format(), Options::formatWidth(), Options::index(), OptWidgetText::initActivation(), OptWidgetMultiText::initActivation(), OptWidgetNumber::initActivation(), OptWidgetBoolean::initActivation(), OptWidgetDate::initActivation(), OptWidgetTime::initActivation(), Options::insert(), Options::integer(), Options::integers(), Options::maximum(), Options::minimum(), Options::nameWidth(), Options::number(), Options::numbers(), relacs::operator<(), relacs::operator==(), Options::operator[](), OptWidgetBase::OptWidgetBase(), Options::outUnit(), Options::parameterSize(), Options::pushInteger(), Options::pushNumber(), Options::pushText(), Options::read(), Options::readAppend(), DataFile::readMetaData(), Options::request(), Options::rfind(), Options::save(), Options::saveXML(), Options::selectText(), Options::setBoolean(), Options::setCurrentDate(), Options::setCurrentTime(), Options::setDate(), Options::setDefault(), Options::setDefaultBoolean(), Options::setDefaultDate(), Options::setDefaultInteger(), Options::setDefaultNumber(), Options::setDefaults(), Options::setDefaultText(), Options::setDefaultTime(), Options::setFlags(), Options::setFormat(), Options::setInteger(), Options::setMinMax(), Options::setNumber(), Options::setOutUnit(), Options::setRequest(), Options::setStep(), Options::setStyle(), Options::setStyles(), Options::setText(), Options::setTime(), Options::setToDefault(), Options::setToDefaults(), Options::setUnit(), Options::setValueType(), Options::setValueTypeFlags(), Options::setValueTypeStyles(), Options::size(), Options::step(), Options::style(), Options::styleSize(), Options::text(), OptWidgetText::textChanged(), OptWidgetMultiText::textChanged(), Options::texts(), Options::time(), Options::unit(), Options::up(), OptWidgetNumber::valueChanged(), OptWidgetBoolean::valueChanged(), OptWidgetDate::valueChanged(), OptWidgetTime::valueChanged(), and Options::valueType().
|
inline |
|
inline |
|
inline |
Referenced by Options::add(), Options::addFlags(), Options::addStyles(), Options::addValueTypeFlags(), Options::addValueTypeStyles(), Options::append(), Options::assign(), OptWidget::assign(), Options::clear(), Options::copy(), Options::delFlags(), Options::delStyles(), Options::delValueTypeFlags(), Options::delValueTypeStyles(), Options::erase(), Options::find(), Options::findSection(), Options::flatten(), Options::nameWidth(), relacs::operator<(), relacs::operator==(), Options::read(), Options::readAppend(), Options::resetParents(), Options::rfind(), Options::rfindSection(), Options::save(), Options::saveXML(), Options::sectionsSize(), Options::setDefaults(), Options::setFlags(), MetaData::setSectionName(), Options::setStyles(), Options::setToDefaults(), Options::setValueTypeFlags(), Options::setValueTypeStyles(), Options::size(), and Options::styleSize().
|
inline |
Referenced by Options::add(), Options::addFlags(), Options::addStyles(), Options::addValueTypeFlags(), Options::addValueTypeStyles(), Options::append(), Options::assign(), OptWidget::assign(), Options::clear(), TableKey::column(), Options::copy(), DeviceList< T, PluginID >::create(), FilterDetectors::createFilters(), Options::delFlags(), Options::delStyles(), Options::delValueTypeFlags(), Options::delValueTypeStyles(), Options::erase(), Options::existSection(), Options::find(), Options::findSection(), Options::flatten(), Options::insertSection(), DataIndex::DataItem::loadCell(), Options::nameWidth(), relacs::operator<(), relacs::operator==(), Options::read(), Options::readAppend(), MetaDataGroup::readConfig(), Options::resetParents(), Options::rfind(), Options::rfindSection(), Options::save(), Options::saveXML(), Options::section(), Options::sectionsSize(), Options::setDefaults(), Options::setFlags(), MetaData::setSectionName(), Options::setStyles(), Options::setToDefaults(), Options::setValueTypeFlags(), Options::setValueTypeStyles(), Options::size(), Options::styleSize(), and MetaData::update().
|
inline |
|
inline |
Options::const_iterator find | ( | const string & | pattern, |
int | level = -1 |
||
) | const |
Search for the first option that matches pattern. pattern can be a list of search terms separated by '>', for example 'aaa>bbb', to search parameter 'bbb' in section 'aaa'. Alternative search terms can be separated by '|'. For example, if pattern is "date|time", then "date" is searched first and if this is not found, "time" is searched. Returns end() if no match for pattern is found.
References StrQueue::assign(), Options::begin(), Options::empty(), Options::end(), StrQueue::erase(), StrQueue::find(), Options::sectionsBegin(), Options::sectionsEnd(), and StrQueue::size().
Referenced by Options::addFlags(), Options::addStyle(), Options::allText(), Options::assign(), Options::boolean(), Options::booleans(), Options::changed(), Options::changeUnit(), Options::clearFlags(), TableKey::column(), FilterDetectors::createFilters(), Options::date(), Options::defaultBoolean(), Options::defaultDate(), Options::defaultInteger(), Options::defaultNumber(), Options::defaultText(), Options::defaultTime(), Options::delFlags(), Options::delStyle(), Options::erase(), Options::error(), Options::errors(), Options::exist(), Options::flags(), Options::format(), Options::formatWidth(), Options::index(), Options::insert(), Options::integer(), Options::integers(), Options::maximum(), Options::minimum(), Options::number(), Options::numbers(), Options::operator[](), Options::outUnit(), Options::pushInteger(), Options::pushNumber(), Options::pushText(), Options::request(), Options::selectText(), Options::setBoolean(), Options::setCurrentDate(), Options::setCurrentTime(), Options::setDate(), Options::setDefault(), Options::setDefaultBoolean(), Options::setDefaultDate(), Options::setDefaultInteger(), Options::setDefaultNumber(), Options::setDefaultText(), Options::setDefaultTime(), Options::setFlags(), Options::setFormat(), FilterSelector::setInputTraces(), Options::setInteger(), Options::setMinMax(), Options::setNumber(), Options::setOutUnit(), Options::setRequest(), Options::setStep(), Options::setStyle(), Options::setText(), Options::setTime(), Options::setToDefault(), Options::setUnit(), Options::setValueType(), Options::size(), Options::step(), Options::style(), Options::text(), Options::texts(), Options::time(), Options::unit(), and Options::valueType().
Options::iterator find | ( | const string & | pattern, |
int | level = -1 |
||
) |
Search for the first option that matches pattern. pattern can be a list of search terms separated by '>', for example 'aaa>bbb', to search parameter 'bbb' in section 'aaa'. Alternative search terms can be separated by '|'. For example, if pattern is "date|time", then "date" is searched first and if this is not found, "time" is searched. Returns end() if no match for pattern is found.
References StrQueue::assign(), Options::begin(), Options::empty(), Options::end(), StrQueue::erase(), StrQueue::find(), Options::sectionsBegin(), Options::sectionsEnd(), and StrQueue::size().
Options::const_iterator rfind | ( | const string & | pattern, |
int | level = -1 |
||
) | const |
Search for the last option that matches pattern. Returns end() if name is not found. See find() for details about valid patterns pattern.
References StrQueue::assign(), Options::begin(), Options::empty(), Options::end(), StrQueue::erase(), Options::sectionsBegin(), Options::sectionsEnd(), and StrQueue::size().
Options::iterator rfind | ( | const string & | pattern, |
int | level = -1 |
||
) |
Search for the last option that matches pattern. Returns end() if name is not found. See find() for details about valid patterns pattern.
References StrQueue::assign(), Options::begin(), Options::empty(), Options::end(), StrQueue::erase(), Options::sectionsBegin(), Options::sectionsEnd(), and StrQueue::size().
Options::const_section_iterator findSection | ( | const string & | pattern, |
int | level = -1 |
||
) | const |
Search for the first section of Options that matches pattern. pattern can be a list of search terms separated by '>', for example 'aaa>bbb', to search subsection 'bbb' in section 'aaa'. Alternative search terms can be separated by '|'. For example, if pattern is "date|time", then "date" is searched first and if this is not found, "time" is searched. Returns sectionsEnd() if no match for pattern is found.
References StrQueue::assign(), Options::empty(), StrQueue::erase(), Options::sectionsBegin(), Options::sectionsEnd(), Options::sectionsSize(), and StrQueue::size().
Referenced by TableKey::column(), FilterDetectors::createFilters(), Options::erase(), Options::existSection(), Options::insertSection(), DataIndex::DataItem::loadCell(), Options::read(), MetaDataGroup::readConfig(), Options::section(), and MetaData::update().
Options::section_iterator findSection | ( | const string & | pattern, |
int | level = -1 |
||
) |
Search for the first section of Options that matches pattern. pattern can be a list of search terms separated by '>', for example 'aaa>bbb', to search subsection 'bbb' in section 'aaa'. Alternative search terms can be separated by '|'. For example, if pattern is "date|time", then "date" is searched first and if this is not found, "time" is searched. Returns sectionsEnd() if no match for pattern is found.
References StrQueue::assign(), Options::empty(), StrQueue::erase(), Options::sectionsBegin(), Options::sectionsEnd(), Options::sectionsSize(), and StrQueue::size().
Options::const_section_iterator rfindSection | ( | const string & | pattern, |
int | level = -1 |
||
) | const |
Search for the last section of Options that matches pattern. pattern can be a list of search terms separated by '>', for example 'aaa>bbb', to search subsection 'bbb' in section 'aaa'. Alternative search terms can be separated by '|'. For example, if pattern is "date|time", then "date" is searched first and if this is not found, "time" is searched. Returns sectionsEnd() if no match for pattern is found.
References StrQueue::assign(), Options::empty(), StrQueue::erase(), Options::sectionsBegin(), Options::sectionsEnd(), Options::sectionsSize(), and StrQueue::size().
Options::section_iterator rfindSection | ( | const string & | pattern, |
int | level = -1 |
||
) |
Search for the last section of Options that matches pattern. pattern can be a list of search terms separated by '>', for example 'aaa>bbb', to search subsection 'bbb' in section 'aaa'. Alternative search terms can be separated by '|'. For example, if pattern is "date|time", then "date" is searched first and if this is not found, "time" is searched. Returns sectionsEnd() if no match for pattern is found.
References StrQueue::assign(), Options::empty(), StrQueue::erase(), Options::sectionsBegin(), Options::sectionsEnd(), Options::sectionsSize(), and StrQueue::size().
const Parameter & operator[] | ( | int | i | ) | const |
Get i-th name-value pair.
Parameter & operator[] | ( | int | i | ) |
Get i-th name-value pair.
const Parameter & operator[] | ( | const string & | name | ) | const |
Get the name-value pair with name name.
References Options::end(), and Options::find().
Parameter & operator[] | ( | const string & | name | ) |
Get the name-value pair with name name.
References Options::end(), and Options::find().
const Options & section | ( | int | i | ) | const |
Get i-th section.
References Options::Options().
Referenced by SaveFiles::addFile(), SaveFiles::closeFiles(), DataDescriptionModel::data(), PlotTrace::displayIndex(), RELACSWidget::editFilters(), RELACSWidget::editInputTraces(), RELACSWidget::editOutputTraces(), DataDescriptionModel::hasChildren(), DataDescriptionModel::index(), DataDescriptionModel::parent(), DataDescriptionModel::rowCount(), and SaveFiles::RelacsFiles::writeRePro().
Options & section | ( | int | i | ) |
Get i-th section.
References Options::Options().
const Options & section | ( | const string & | name | ) | const |
Get section with name name.
References Options::findSection(), Options::Options(), and Options::sectionsEnd().
Options & section | ( | const string & | name | ) |
Get section with name name.
References Options::findSection(), Options::Options(), and Options::sectionsEnd().
Str request | ( | const string & | name | ) | const |
Returns the request string of the option with name name.
References Str::empty(), Options::end(), and Options::find().
Parameter & setRequest | ( | const string & | name, |
const string & | request | ||
) |
Set request string of the option with name name to request.
References Str::empty(), Options::end(), and Options::find().
Parameter::ValueType valueType | ( | const string & | name | ) | const |
The type of the option with name name.
References Str::empty(), Options::end(), Options::find(), and Parameter::NoType.
Parameter & setValueType | ( | const string & | name, |
Parameter::ValueType | type | ||
) |
Set type of the option with name name to type.
References Str::empty(), Options::end(), and Options::find().
int flags | ( | const string & | name | ) | const |
The flags of the option with name name.
References Str::empty(), Options::end(), and Options::find().
Referenced by MetaData::addSaveFlags(), and MetaData::setSaveFlags().
bool flags | ( | const string & | name, |
int | flag | ||
) | const |
true
if the flags of the option with name name have flag set. References Str::empty(), Options::end(), and Options::find().
Parameter & setFlags | ( | const string & | name, |
int | flags | ||
) |
Set the flags of the option with name name to flags.
References Str::empty(), Options::end(), and Options::find().
Parameter & addFlags | ( | const string & | name, |
int | flags | ||
) |
Add the bits specified by flags to the flags of the option with name name.
References Str::empty(), Options::end(), and Options::find().
Referenced by MetaData::add(), Options::read(), MetaDataGroup::readConfig(), OptWidget::updateSettings(), and OptWidget::updateValues().
Parameter & delFlags | ( | const string & | name, |
int | flags | ||
) |
Clear the bits specified by flags of the flags of the option with name name.
References Str::empty(), Options::end(), and Options::find().
Referenced by OptWidget::accept(), OptWidget::acceptNotify(), ConfigDialog::notificationFromDialog(), OptWidget::updateSettings(), and OptWidget::updateValues().
Parameter & clearFlags | ( | const string & | name | ) |
Clear all bits of the flags of the option with name name.
References Str::empty(), Options::end(), and Options::find().
bool changed | ( | const string & | name | ) |
Return true if the changedFlag() of the option with name name is set, i.e. whose value has been changed..
References Str::empty(), Options::end(), and Options::find().
Referenced by Options::read().
int style | ( | const string & | name | ) | const |
The style of the option with name name.
References Str::empty(), Options::end(), and Options::find().
Parameter & setStyle | ( | const string & | name, |
int | style | ||
) |
Set the style of the option with name name to style.
References Str::empty(), Options::end(), and Options::find().
Parameter & addStyle | ( | const string & | name, |
int | style | ||
) |
Add the bits specified by style to the style of the option with name name.
References Str::empty(), Options::end(), and Options::find().
Parameter & delStyle | ( | const string & | name, |
int | style | ||
) |
Clear the bits specified by style of the style of the option with name name.
References Str::empty(), Options::end(), and Options::find().
Str format | ( | const string & | name | ) | const |
Return the format string of the option with name name. If there is no option with name name, or the option is neither a number nor an integer, an empty string is returned.
References Str::empty(), Options::end(), Options::find(), and Str::format().
Referenced by SaveFiles::RelacsFiles::openStimulusFiles(), SaveFiles::RelacsFiles::openTraceFiles(), Attenuate::setFrequencyFormat(), and Attenuate::setIntensityFormat().
Parameter & setFormat | ( | const string & | name, |
int | width = 0 , |
||
int | prec = -1 , |
||
char | fmt = 'g' |
||
) |
Set format string of an existing number option with name name to have a width of width, precision of prec and type fmt.
References Str::empty(), Options::end(), and Options::find().
Parameter & setFormat | ( | const string & | name, |
const string & | format | ||
) |
Set the format of an existing number option with name name to format.
References Str::empty(), Options::end(), and Options::find().
int formatWidth | ( | const string & | name | ) | const |
Returns the width specified by the format string of the option specified by name.
References Str::empty(), Options::end(), and Options::find().
int size | ( | const string & | name | ) | const |
If several values correspond to the option with name name size() returns the number of values.
References Str::empty(), Options::end(), and Options::find().
Referenced by DataFile::add(), DataFile::close(), OutList::deviceBufferSize(), Macro::dialog(), MacroCommand::dialog(), DataFile::emptyLines(), DataFile::insert(), DataFile::levels(), Macro::menuStr(), DataFile::metaData(), DataFile::metaDataIndex(), DataFile::metaDataOptions(), DataFile::newMetaData(), SaveFiles::RelacsFiles::openStimulusFiles(), relacs::operator==(), DataFile::readBlock(), Macro::variablesStr(), SaveFiles::RelacsFiles::writeRePro(), and SaveFiles::RelacsFiles::writeStimulus().
Add parameter np to options.
Insert a new Parameter np at the position of the Parameter specified by atname. list (atname == "") or. If atname is empty or no Parameter is found for atname, the Parameter is inserted at the beginning or appended to the end of the currently active section, respectively.
References Options::end(), Options::find(), Options::parentSection(), and Parameter::setParentSection().
Parameter & addText | ( | const string & | name, |
const string & | request, | ||
const string & | dflt, | ||
int | flags = 0 , |
||
int | style = 0 |
||
) |
Add a text option at the end of the options list. Its request string for the options dialog is set to request, its name string is set to name. The option has a default value dflt.
References Options::add(), Str::empty(), and Parameter::warning().
Referenced by Device::addInfo(), MetaDataGroup::addRecordingOptions(), Options::addSelection(), TableKey::addText(), InData::copy(), OutData::fill(), Attenuate::init(), Device::initOptions(), Attenuate::initOptions(), Macros::Macros(), Attenuate::mute(), RELACSWidget::RELACSWidget(), SaveFiles::save(), Trigger::setSettings(), AnalogInput::setSettings(), Settings::Settings(), AttSim::settings(), and DigitalIO::settings().
|
inline |
Add a text option at the end of the options list. Its name string and its request string for the options dialog are set to name. The option has a default value dflt.
Parameter & insertText | ( | const string & | name, |
const string & | atname, | ||
const string & | request, | ||
const string & | dflt, | ||
int | flags = 0 , |
||
int | style = 0 |
||
) |
Insert a new text option at the beginning of the options list (atname == "") or at the position of the option with name atname. If the option with name atname does not exist, the option is appended to the end of the list. Its request string for the options dialog is set to request, its name string is set to name. The option has a default value dflt.
References Str::empty(), Options::insert(), and Parameter::warning().
Referenced by SaveFiles::addFile(), OutData::fill(), Options::insertSelection(), TableKey::insertText(), and OutData::load().
|
inline |
Insert a new text option at the beginning of the options list (atname == "") or at the position of the option with name atname. If the option with name atname does not exist, the option is appended to the end of the list. Its name string and its request string for the options dialog are set to name. The option has a default value dflt.
Str text | ( | const string & | name, |
int | index, | ||
const string & | dflt = "" , |
||
const string & | format = "" , |
||
const string & | unit = "" |
||
) | const |
Return the index-th string of the text option with name name. If there is no option with name name an empty string is returned.
References Str::empty(), Options::end(), Options::find(), and Str::text().
Referenced by DataIndex::addRepro(), DeviceList< T, PluginID >::create(), Macros::create(), FilterDetectors::createFilters(), DataDescriptionModel::data(), PlotTrace::displayIndex(), Macros::load(), DataIndex::DataItem::loadCell(), AudioMonitor::notify(), Settings::notify(), Attenuate::open(), PlotTrace::print(), RELACSWidget::RELACSWidget(), RePro::reproPath(), RePro::reproTimeStr(), MetaData::save(), Macros::saveConfig(), Session::sessionTimeStr(), RELACSPlugin::sessionTimeStr(), Trigger::set(), and Macros::switchMacro().
|
inline |
Return the first string of the text option with name name. If there is no option with name name an empty string is returned.
void texts | ( | const string & | name, |
vector< string > & | s, | ||
const string & | format = "" , |
||
const string & | unit = "" |
||
) | const |
Return in s all values of the text option with name name as a list of strings formatted according to format using unit. See Parameter::text() for details.
References Str::empty(), Options::end(), and Options::find().
Str allText | ( | const string & | name, |
const string & | dflt = "" , |
||
const string & | format = "" , |
||
const string & | unit = "" , |
||
const string & | separator = ", " |
||
) | const |
Return all values of the parameter with name name, formatted according to format using unit, and concatenated using separator. If there is no option with name name an empty string is returned. See Parameter::text() for details.
References Str::empty(), Options::end(), and Options::find().
Parameter & setText | ( | const string & | name, |
const string & | strg | ||
) |
Set the value of an existing text option with name name to strg.
References Options::callNotifies(), Str::empty(), Options::end(), and Options::find().
Referenced by InputConfig::dialogClosed(), OutputConfig::dialogClosed(), Macros::saveConfig(), Device::setDeviceIdent(), and SaveFiles::RelacsFiles::writeRePro().
Set value of an existing text option with name name to the one of p, if both are of valueType() Text. If the value of the parameter is changing then the changedFlag() is set.
References Options::callNotifies(), Str::empty(), Options::end(), and Options::find().
Parameter & pushText | ( | const string & | name, |
const string & | strg | ||
) |
Add strg to the value of an existing text option with name name.
References Options::callNotifies(), Str::empty(), Options::end(), and Options::find().
Referenced by SaveFiles::addFile().
Str defaultText | ( | const string & | name, |
const string & | format = "" , |
||
const string & | unit = "" |
||
) | const |
Return the default string of the text option with name name. If there is no option with name name, or the option is not a text, an empty string is returned.
References Str::empty(), Options::end(), and Options::find().
Parameter & setDefaultText | ( | const string & | name, |
const string & | dflt | ||
) |
Set the default string of an existing text option with name name to dflt.
References Str::empty(), Options::end(), and Options::find().
Parameter & addSelection | ( | const string & | name, |
const string & | request, | ||
const string & | selection, | ||
int | flags = 0 , |
||
int | style = 0 |
||
) |
Add a text-selection option at the end of the options list. Its request string for the options dialog is set to request, its name string is set to name. The option has a list selection of strings (separated by ", ") that can be selected.
References Options::addText(), and Parameter::SelectText.
Referenced by AudioMonitor::AudioMonitor(), and Trigger::initOptions().
|
inline |
Add a text option at the end of the options list. Its name string and its request string for the options dialog are set to name. The option has a list selection of strings (separated by ", ") that can be selected.
Parameter & insertSelection | ( | const string & | name, |
const string & | atname, | ||
const string & | request, | ||
const string & | selection, | ||
int | flags = 0 , |
||
int | style = 0 |
||
) |
Insert a new text option at the beginning of the options list (atname == "") or at the position of the option with name atname. If the option with name atname does not exist, the option is appended to the end of the list. Its request string for the options dialog is set to request, its name string is set to name. The option has a list selection of strings (separated by ", ") that can be selected.
References Options::insertText(), and Parameter::SelectText.
|
inline |
Insert a new text option at the beginning of the options list (atname == "") or at the position of the option with name atname. If the option with name atname does not exist, the option is appended to the end of the list. Its name string and its request string for the options dialog are set to name. The option has a list selection of strings (separated by ", ") that can be selected.
Parameter & selectText | ( | const string & | name, |
const string & | strg, | ||
int | add = 0 |
||
) |
If the text parameter has several values, then the value that is matched by strg is inserted as the first value. If strg does not match any of the text values strg is added to the text values and is marked as selected if add > 0, or if add == 0 and the SelectText - Bit in the Parameter's style is not set.
References Options::callNotifies(), Str::empty(), Options::end(), and Options::find().
Parameter & selectText | ( | const string & | name, |
int | index | ||
) |
If the text parameter has several values, then the index-th value is selected by inserting it as the first value.
References Options::callNotifies(), Str::empty(), Options::end(), and Options::find().
int index | ( | const string & | name | ) | const |
Returns the index of the selected value, i.e. the index minus one of the matching value with the first value.
References Str::empty(), Options::end(), and Options::find().
Referenced by RELACSPlugin::attenuator(), AudioMonitor::audioCallback(), AISim::bipolarRange(), PlotTrace::displayIndex(), RELACSPlugin::events(), Options::load(), AnalogInput::maxGainIndex(), AnalogInput::minGainIndex(), PlotTrace::print(), Options::read(), RELACSPlugin::trace(), AISim::unipolarRange(), and SaveFiles::RelacsFiles::writeEvents().
int index | ( | const string & | name, |
const string & | strg | ||
) | const |
Returns the index of the value that matches strg.
References Str::empty(), Options::end(), and Options::find().
Parameter & addNumber | ( | const string & | name, |
const string & | request, | ||
double | dflt, | ||
double | minimum, | ||
double | maximum = MAXDOUBLE , |
||
double | step = 1.0 , |
||
const string & | unit = "" , |
||
const string & | outputunit = "" , |
||
const string & | format = "" , |
||
int | flags = 0 , |
||
int | style = 0 |
||
) |
Add a new number option at the end of the options list. Its request string for the options dialog is set to request, its name string is set to name. The option has a default value dflt, minimum value minimum and maximum value maximum, as well as a unit unit and a format string format (ANSI C printf() syntax, only %g, %f, %e are allowed, since the number is a double).
References Options::add(), Str::empty(), and Parameter::warning().
Referenced by TableKey::addNumber(), MetaDataGroup::addRecordingOptions(), OutData::alphaWave(), AudioMonitor::AudioMonitor(), OutData::bandNoiseWave(), OutData::constWave(), InData::copy(), DefaultRePro::DefaultRePro(), OutData::fill(), Attenuate::init(), AOSim::initOptions(), AISim::initOptions(), Trigger::initOptions(), OutData::noiseWave(), AttSim::open(), SaveFiles::RelacsFiles::openStimulusFiles(), OutData::ouNoiseWave(), OutData::pulseWave(), OutData::rampWave(), OutData::rectangleWave(), RELACSWidget::RELACSWidget(), OutData::repeat(), OutData::sawDownWave(), OutData::sawUpWave(), Attenuator::setInfo(), AnalogInput::setInfo(), AnalogOutput::setInfo(), AnalogInput::setSettings(), AnalogOutput::setSettings(), Settings::Settings(), AttSim::settings(), OutData::sineWave(), OutData::sweepWave(), Temperature::Temperature(), OutData::triangleWave(), and Attenuate::write().
|
inline |
Add a new number option at the end of the options list. Its request string for the options dialog is set to request, its name string is set to name. The option has a default value dflt, a unit unit and a format string format (ANSI C printf() syntax, only %g, %f, %e are allowed, since the number is a double).
|
inline |
Add a new number option at the end of the options list. Its name string and request string is set to name. The option has a default value dflt, a unit unit and a format string format (ANSI C printf() syntax, only %g, %f, %e are allowed, since the number is a double).
|
inline |
Add a new number option at the end of the options list. Its name string and request string is set to name. The option has a default value dflt and a unit unit.
|
inline |
Add a new number option at the end of the options list. Its name string and request string is set to name. The option has a default value dflt, an error error, a unit unit and a format string format (ANSI C printf() syntax, only %g, %f, %e are allowed, since the number is a double).
References Parameter::setNumber().
|
inline |
Add a new number option at the end of the options list. Its name string and request string is set to name. The option has a unit unit and a format string format (ANSI C printf() syntax, only %g, %f, %e are allowed, since the number is a double).
Parameter & insertNumber | ( | const string & | name, |
const string & | atname, | ||
const string & | request, | ||
double | dflt, | ||
double | minimum, | ||
double | maximum = MAXDOUBLE , |
||
double | step = 1.0 , |
||
const string & | unit = "" , |
||
const string & | outputunit = "" , |
||
const string & | format = "" , |
||
int | flags = 0 , |
||
int | style = 0 |
||
) |
Insert a new number option at the beginning of the options list (atname == "") or at the position of the option with name atname. If the option with name atname does not exist, the option is appended to the end of the list. Its request string for the options dialog is set to request, its name string is set to name. The option has a default value dflt, minimum value minimum and maximum value maximum, as well as a unit unit and a format string format (ANSI C printf() syntax, only %g, %f, %e are allowed, since the number is a double).
References Str::empty(), Options::insert(), and Parameter::warning().
Referenced by OutData::append(), TableKey::insertNumber(), and SaveFiles::writeStimulus().
|
inline |
Insert a new number option at the beginning of the options list (atname == "") or at the position of the option with name atname. If the option with name atname does not exist, the option is appended to the end of the list. Its request string for the options dialog is set to request, its name string is set to name. The option has a default value dflt, a unit unit and a format string format (ANSI C printf() syntax, only %g, %f, %e are allowed, since the number is a double).
|
inline |
Insert a new number option at the beginning of the options list (atname == "") or at the position of the option with name atname. If the option with name atname does not exist, the option is appended to the end of the list. Its name string and request string is set to name. The option has a default value dflt, a unit unit and a format string format (ANSI C printf() syntax, only %g, %f, %e are allowed, since the number is a double).
|
inline |
Insert a new number option at the beginning of the options list (atname == "") or at the position of the option with name atname. If the option with name atname does not exist, the option is appended to the end of the list. Its name string and request string is set to name. The option has a unit unit and a format string format (ANSI C printf() syntax, only %g, %f, %e are allowed, since the number is a double).
double number | ( | const string & | name, |
double | dflt = 0.0 , |
||
const string & | unit = "" , |
||
int | index = 0 |
||
) | const |
Return the index-th number of the option with name name. If there is no option with name name, or the option is neither a number nor an integer, zero is returned.
References Str::empty(), Options::end(), and Options::find().
Referenced by PlotTrace::displayIndex(), DefaultRePro::main(), AudioMonitor::notify(), Settings::notify(), AOSim::open(), Trigger::set(), RELACSWidget::startFirstAcquisition(), and RELACSWidget::updateData().
|
inline |
|
inline |
Return the index-th number of the option with name name. If there is no option with name name, or the option is neither a number nor an integer, zero is returned.
|
inline |
void numbers | ( | const string & | name, |
vector< double > & | n, | ||
const string & | unit = "" |
||
) | const |
Return in n all number-values of the option with name name in the unit unit.
References Str::empty(), Options::end(), and Options::find().
Referenced by AISim::open().
double error | ( | const string & | name, |
const string & | unit = "" , |
||
int | index = 0 |
||
) | const |
Return the index-th standard deviation of the option with name name. If there is no option with name name, or the option is neither a number nor an integer, zero is returned.
References Str::empty(), Options::end(), and Options::find().
Referenced by Options::load(), and Options::read().
|
inline |
Return the index-th standard deviation of the option with name name. If there is no option with name name, or the option is neither a number nor an integer, zero is returned.
void errors | ( | const string & | name, |
vector< double > & | n, | ||
const string & | unit = "" |
||
) | const |
Return in n all error-values of the option with name name in the unit unit.
References Str::empty(), Options::end(), and Options::find().
Parameter & setNumber | ( | const string & | name, |
double | number, | ||
double | error, | ||
const string & | unit = "" |
||
) |
Set the value of an existing number option with name name to number.
References Options::callNotifies(), Str::empty(), Options::end(), and Options::find().
Referenced by OutData::append(), InputConfig::dialogClosed(), OutputConfig::dialogClosed(), SaveFiles::save(), and SaveFiles::RelacsFiles::writeRePro().
|
inline |
Set the value of an existing number option with name name to number.
Parameter & pushNumber | ( | const string & | name, |
double | number, | ||
double | error = -1.0 , |
||
const string & | unit = "" |
||
) |
Add number to the value of an existing number option with name name.
References Options::callNotifies(), Str::empty(), Options::end(), and Options::find().
|
inline |
Add number to the value of an existing number option with name name.
Set value of an existing number option with name name to the one of p, if both are of valueType() Number. If the value of the parameter is changing then the changedFlag() is set.
References Options::callNotifies(), Str::empty(), Options::end(), and Options::find().
double defaultNumber | ( | const string & | name, |
const string & | unit = "" |
||
) | const |
Return the default number of the option with name name. If there is no option with name name, or the option is neither a number nor an integer, zero is returned.
References Str::empty(), Options::end(), and Options::find().
Parameter & setDefaultNumber | ( | const string & | name, |
double | dflt, | ||
const string & | unit = "" |
||
) |
Set the default number of an existing number option with name name to dflt.
References Str::empty(), Options::end(), and Options::find().
double minimum | ( | const string & | name, |
const string & | unit = "" |
||
) | const |
Return the minimum number of the option with name name. If there is no option with name name, or the option is neither a number nor an integer, zero is returned.
References Str::empty(), Options::end(), and Options::find().
double maximum | ( | const string & | name, |
const string & | unit = "" |
||
) | const |
Return the maximum number of the option with name name. If there is no option with name name, or the option is neither a number nor an integer, zero is returned.
References Str::empty(), Options::end(), and Options::find().
double step | ( | const string & | name, |
const string & | unit = "" |
||
) | const |
Return the step size of the option with name name. If there is no option with name name, or the option is neither a number nor an integer, unity is returned.
References Str::empty(), Options::end(), and Options::find().
Parameter & setStep | ( | const string & | name, |
double | step, | ||
const string & | unit = "" |
||
) |
References Str::empty(), Options::end(), and Options::find().
Parameter & setMinMax | ( | const string & | name, |
double | minimum = -MAXDOUBLE , |
||
double | maximum = MAXDOUBLE , |
||
double | step = 1.0 , |
||
const string & | unit = "" |
||
) |
Set the minimum and maximum of an existing number option with name name to minimum and maximum, respectively.
References Str::empty(), Options::end(), and Options::find().
|
inlinestatic |
Returns the largest power of ten smaller or equal to v.
|
inlinestatic |
Returns the next smaller multiple of floorLog10( v ). This is flooring to the leading digit. For example: 23.7 -> 20, 1.45 -> 1. scale determines to which digit the number should be floored. For example with scale = 0.1 you get 23.7 -> 23, 1.45 -> 1.4
|
inlinestatic |
Returns the next larger multiple of floorLog10( v ). This is ceiling to the leading digit. For example: 23.7 -> 30, 1.45 -> 2. scale determines to which digit the number should be ceiled. For example with scale = 0.1 you get 23.7 -> 24, 1.45 -> 1.5
Str unit | ( | const string & | name | ) | const |
Return the internal unit of the option with name name. If there is no option with name name, or the option is neither a number nor an integer, an empty string is returned.
References Str::empty(), Options::end(), Options::find(), and Str::unit().
Referenced by Attenuate::setFrequencyUnit(), and Attenuate::setIntensityUnit().
Str outUnit | ( | const string & | name | ) | const |
Return the unit used for output and dialogs of the option with name name. If there is no option with name name, or the option is neither a number nor an integer, an empty string is returned.
References Str::empty(), Options::end(), and Options::find().
Referenced by SaveFiles::RelacsFiles::openStimulusFiles().
Parameter & setUnit | ( | const string & | name, |
const string & | internunit, | ||
const string & | outunit = "" |
||
) |
Set the internal unit and the output unit of an existing number option with name name to internunit and outunit, respectively. If outunit is an empty string it is set to internunit.
References Str::empty(), Options::end(), and Options::find().
Parameter & setOutUnit | ( | const string & | name, |
const string & | outputunit | ||
) |
Set the output unit of an existing number option with name name to outputunit.
References Str::empty(), Options::end(), and Options::find().
Parameter & changeUnit | ( | const string & | name, |
const string & | internunit | ||
) |
Set the internal unit of an existing number option with name name to inputunit. The values of the parameter are converted accordingly.
References Str::empty(), Options::end(), and Options::find().
Parameter & addInteger | ( | const string & | name, |
const string & | request, | ||
long | dflt, | ||
long | minimum = LONG_MIN , |
||
long | maximum = LONG_MAX , |
||
long | step = 1 , |
||
const string & | unit = "" , |
||
const string & | outputunit = "" , |
||
int | width = 0 , |
||
int | flags = 0 , |
||
int | style = 0 |
||
) |
Add a new integer option at the end of the options list. Its request string for the options dialog is set to request, its name string is set to name. The option has a default value dflt, minimum value minimum and maximum value maximum, as well as a unit unit and a width of output format width.
References Options::add(), Str::empty(), and Parameter::warning().
Referenced by Device::addInfo(), Attenuate::init(), Attenuate::initOptions(), RELACSWidget::RELACSWidget(), OutData::repeat(), SaveFiles::save(), Attenuator::setInfo(), DigitalIO::setInfo(), AnalogInput::setInfo(), AnalogOutput::setInfo(), AnalogInput::setSettings(), AnalogOutput::setSettings(), and DigitalIO::settings().
|
inline |
Add a new integer option at the end of the options list. Its name string and request string is set to name. The option has a default value dflt, a unit unit, and a width of output format width.
|
inline |
Add a new integer option at the end of the options list. Its name string and request string is set to name. The option has a unit unit, and a width of output format width.
Parameter & insertInteger | ( | const string & | name, |
const string & | atname, | ||
const string & | request, | ||
long | dflt, | ||
long | minimum = LONG_MIN , |
||
long | maximum = LONG_MAX , |
||
long | step = 1 , |
||
const string & | unit = "" , |
||
const string & | outputunit = "" , |
||
int | width = 0 , |
||
int | flags = 0 , |
||
int | style = 0 |
||
) |
Insert a new integer option at the beginning of the options list (atname == "") or at the position of the option with name atname. If the option with name atname does not exist, the option is appended to the end of the list. Its request string for the options dialog is set to request, its name string is set to name. The option has a default value dflt, minimum value minimum and maximum value maximum, as well as a unit unit and a width of output format width.
References Str::empty(), Options::insert(), and Parameter::warning().
|
inline |
Insert a new integer option at the beginning of the options list (atname == "") or at the position of the option with name atname. If the option with name atname does not exist, the option is appended to the end of the list. Its name string and request string is set to name. The option has a default value dflt, a unit unit, and a width of output format width.
|
inline |
Insert a new integer option at the beginning of the options list (atname == "") or at the position of the option with name atname. If the option with name atname does not exist, the option is appended to the end of the list. Its name string and request string is set to name. The option has a unit unit, and a width of output format width.
long integer | ( | const string & | name, |
const string & | unit = "" , |
||
long | dflt = 0 , |
||
int | index = 0 |
||
) | const |
Return the index-th integer number of the option with name name. If there is no option with name name, or the option is neither a number nor an integer, zero is returned.
References Str::empty(), Options::end(), and Options::find().
Referenced by FilterDetectors::createFilters(), and Attenuate::open().
|
inline |
Return the index-th integer number of the option with name name. If there is no option with name name, or the option is neither a number nor an integer, zero is returned.
|
inline |
void integers | ( | const string & | name, |
vector< long > & | n, | ||
const string & | unit = "" |
||
) | const |
Return in n all integer-values of the option with name name in the unit unit.
References Str::empty(), Options::end(), and Options::find().
void integers | ( | const string & | name, |
vector< int > & | n, | ||
const string & | unit = "" |
||
) | const |
Return in n all integer-values of the option with name name in the unit unit.
References Str::empty(), Options::end(), and Options::find().
Parameter & setInteger | ( | const string & | name, |
long | number, | ||
long | error, | ||
const string & | unit = "" |
||
) |
Set the value of an existing integer option with name name to number.
References Options::callNotifies(), Str::empty(), Options::end(), and Options::find().
Referenced by InputConfig::dialogClosed(), OutputConfig::dialogClosed(), and SaveFiles::RelacsFiles::writeRePro().
|
inline |
Set the value of an existing integer option with name name to number.
Parameter & pushInteger | ( | const string & | name, |
long | number, | ||
long | error, | ||
const string & | unit = "" |
||
) |
Add number to the value of an existing integer option with name name.
References Options::callNotifies(), Str::empty(), Options::end(), and Options::find().
|
inline |
Add number to the value of an existing integer option with name name.
Set value of an existing integer option with name name to the one of p, if both are of valueType() Integer. If the value of the parameter is changing then the changedFlag() is set.
References Options::callNotifies(), Str::empty(), Options::end(), and Options::find().
long defaultInteger | ( | const string & | name, |
const string & | unit = "" |
||
) | const |
Return the default number of the integer option with name name. If there is no option with name name, or the option is neither a number nor an integer, zero is returned.
References Str::empty(), Options::end(), and Options::find().
Parameter & setDefaultInteger | ( | const string & | name, |
long | dflt, | ||
const string & | unit = "" |
||
) |
Set the default number of an existing integer option with name name to dflt.
References Str::empty(), Options::end(), and Options::find().
Parameter & setMinMax | ( | const string & | name, |
long | minimum = LONG_MIN , |
||
long | maximum = LONG_MAX , |
||
long | step = 1 , |
||
const string & | unit = "" |
||
) |
Set the minimum and maximum of an existing integer number option with name name to minimum and maximum, respectively.
References Str::empty(), Options::end(), and Options::find().
|
inline |
Set the minimum and maximum of an existing integer number option with name name to minimum and maximum, respectively.
Parameter & addBoolean | ( | const string & | name, |
const string & | request, | ||
bool | dflt, | ||
int | flags = 0 , |
||
int | style = 0 |
||
) |
Add a boolean option at the end of the options list. Its request string for the options dialog is set to request, its name string is set to name. The option has a default value dflt.
References Options::add(), Str::empty(), and Parameter::warning().
Referenced by AudioMonitor::AudioMonitor(), Macros::Macros(), RELACSWidget::RELACSWidget(), RePros::RePros(), AnalogInput::setSettings(), AnalogOutput::setSettings(), and Settings::Settings().
|
inline |
Add a boolean option at the end of the options list. Its name string and request string is set to name. The option has a default value dflt.
|
inline |
|
inline |
Parameter & insertBoolean | ( | const string & | name, |
const string & | atname = "" , |
||
const string & | request = "" , |
||
bool | dflt = false , |
||
int | flags = 0 , |
||
int | style = 0 |
||
) |
Insert a new boolean option at the beginning of the options list (atname == "") or at the position of the option with name atname. If the option with name atname does not exist, the option is appended to the end of the list. Its request string for the options dialog is set to request, its name string is set to name. The option has a default value dflt.
References Str::empty(), Options::insert(), and Parameter::warning().
|
inline |
Insert a new boolean option at the beginning of the options list (atname == "") or at the position of the option with name atname. If the option with name atname does not exist, the option is appended to the end of the list. Its name string and request string is set to name. The option has a default value dflt.
Insert a new boolean option at the beginning of the options list (atname == "") or at the position of the option with name atname. If the option with name atname does not exist, the option is appended to the end of the list. Its name string and request string is set to name.
bool boolean | ( | const string & | name, |
bool | dflt = false , |
||
int | index = 0 |
||
) | const |
Return the boolean of the option with name name. If there is no option with name name, or the option is neither a boolean, nor a number, nor an integer, false is returned.
References Str::empty(), Options::end(), and Options::find().
Referenced by ReProData::acceptDialog(), MacroCommand::acceptDialog(), FilterDetectors::createFilters(), MacroCommand::execute(), AudioMonitor::notify(), and RELACSWidget::startSession().
|
inline |
void booleans | ( | const string & | name, |
vector< bool > & | n | ||
) | const |
Return in n all boolean-values of the options with name name.
References Str::empty(), Options::end(), and Options::find().
Parameter & setBoolean | ( | const string & | name, |
bool | b | ||
) |
Set the value of an existing boolean option with name name to string.
References Options::callNotifies(), Str::empty(), Options::end(), and Options::find().
Referenced by InputConfig::dialogClosed(), AudioMonitor::mute(), and AudioMonitor::unmute().
Set value of an existing boolean option with name name to the one of p, if both are of valueType() Boolean. If the value of the parameter is changing then the changedFlag() is set.
References Options::callNotifies(), Str::empty(), Options::end(), and Options::find().
bool defaultBoolean | ( | const string & | name | ) | const |
Return the default boolean of the option with name name. If there is no option with name name, or the option is neither a boolean, nor a number nor an integer, false is returned.
References Str::empty(), Options::end(), and Options::find().
Parameter & setDefaultBoolean | ( | const string & | name, |
bool | dflt | ||
) |
Set the default value of an existing boolean option with name name to dflt.
References Str::empty(), Options::end(), and Options::find().
Parameter & addDate | ( | const string & | name, |
const string & | request, | ||
int | year = 0 , |
||
int | month = 0 , |
||
int | day = 0 , |
||
int | flags = 0 , |
||
int | style = 0 |
||
) |
Add a date option at the end of the options list.
[in] | name | the name string of the new option |
[in] | request | the request string of the new option |
[in] | year | the default value for the year |
[in] | month | the default value for the month |
[in] | day | the default value for the dat |
[in] | flags | some flags |
[in] | style | defines the style in a GUI. |
References Options::add(), Parameter::Date, Str::empty(), and Parameter::warning().
Referenced by MetaDataGroup::addRecordingOptions().
|
inline |
Add a date option at the end of the options list.
[in] | name | the name and request string of the new option |
[in] | year | the default value for the year |
[in] | month | the default value for the month |
[in] | day | the default value for the day |
[in] | flags | some flags |
[in] | style | defines the style in a GUI. |
|
inline |
Add a date option at the end of the options list with year, month and day set to zero.
[in] | name | the name and request string of the new option |
[in] | flags | some flags |
[in] | style | defines the style in a GUI. |
Parameter & insertDate | ( | const string & | name, |
const string & | atname = "" , |
||
const string & | request = "" , |
||
int | year = 0 , |
||
int | month = 0 , |
||
int | day = 0 , |
||
int | flags = 0 , |
||
int | style = 0 |
||
) |
Insert a new date option at the beginning of the options list (atname == "") or at the position of the option with name atname. If the option with name atname does not exist, the option is appended to the end of the list.
[in] | name | the name string of the new option |
[in] | atname | the name string of the existing option where the new options should be inserted. If left empty, the new option is inserted at the beginning of the option list. |
[in] | request | the request string of the new option |
[in] | year | the default value for the year |
[in] | month | the default value for the month |
[in] | day | the default value for the day |
[in] | flags | some flags |
[in] | style | defines the style in a GUI. |
References Parameter::Date, Str::empty(), Options::insert(), and Parameter::warning().
|
inline |
Insert a new date option at the beginning of the options list (atname == "") or at the position of the option with name atname. If the option with name atname does not exist, the option is appended to the end of the list.
[in] | name | the name and request string of the new option |
[in] | atname | the name string of the existing option where the new options should be inserted. If left empty, the new option is inserted at the beginning of the option list. |
[in] | year | the default value for the year |
[in] | month | the default value for the month |
[in] | day | the default value for the day |
[in] | flags | some flags |
[in] | style | defines the style in a GUI. |
|
inline |
Insert a new date option at the beginning of the options list (atname == "") or at the position of the option with name atname. If the option with name atname does not exist, the option is appended to the end of the list. The year, month and day are set to zero.
[in] | name | the name and request string of the new option |
[in] | atname | the name string of the existing option where the new options should be inserted. If left empty, the new option is inserted at the beginning of the option list. |
[in] | flags | some flags |
[in] | style | defines the style in a GUI. |
const Parameter & date | ( | const string & | name, |
int | index, | ||
int & | year, | ||
int & | month, | ||
int & | day | ||
) | const |
Get the date from a date option.
[in] | name | the name string of the option |
[in] | index | the index of the date |
[out] | year | the year of the specified date |
[out] | month | the month of the specified date |
[out] | day | the day of the specified date |
References Str::empty(), Options::end(), and Options::find().
Parameter & setDate | ( | const string & | name, |
int | year, | ||
int | month, | ||
int | day | ||
) |
Set the value of an existing date option.
[in] | name | the name string of the option |
[in] | year | the new value for the year |
[in] | month | the new value for the month |
[in] | day | the new value for the day |
References Options::callNotifies(), Str::empty(), Options::end(), and Options::find().
Parameter & setDate | ( | const string & | name, |
const string & | date | ||
) |
Set the value of an existing date option.
[in] | name | the name string of the option |
[in] | date | the new value for the date |
References Options::callNotifies(), Str::empty(), Options::end(), and Options::find().
Parameter & setDate | ( | const string & | name, |
const struct tm & | date | ||
) |
Set the value of an existing date option.
[in] | name | the name string of the option |
[in] | date | the new value for the date |
References Options::callNotifies(), Str::empty(), Options::end(), and Options::find().
Parameter & setDate | ( | const string & | name, |
const time_t & | time | ||
) |
Set the value of an existing date option.
[in] | name | the name string of the option |
[in] | time | the new value for the date |
References Options::callNotifies(), Str::empty(), Options::end(), and Options::find().
Parameter & setCurrentDate | ( | const string & | name | ) |
Set the value of an existing date option to the current date.
[in] | name | the name string of the option |
References Options::callNotifies(), Str::empty(), Options::end(), and Options::find().
Set value of an existing date option with name name to the one of p, if both are of valueType() Date. If the value of the parameter is changing then the changedFlag() is set.
References Options::callNotifies(), Str::empty(), Options::end(), and Options::find().
const Parameter & defaultDate | ( | const string & | name, |
int | index, | ||
int & | year, | ||
int & | month, | ||
int & | day | ||
) | const |
Get the default date from a date option.
[in] | name | the name string of the option |
[in] | index | the index of the default date |
[out] | year | the year of the specified default date |
[out] | month | the month of the specified default date |
[out] | day | the day of the specified default date |
References Str::empty(), Options::end(), and Options::find().
Parameter & setDefaultDate | ( | const string & | name, |
int | year, | ||
int | month, | ||
int | day | ||
) |
Set the default value of an existing date option.
[in] | name | the name string of the option |
[in] | year | the new value for the default year |
[in] | month | the new value for the default month |
[in] | day | the new value for the default day |
References Str::empty(), Options::end(), and Options::find().
Parameter & addTime | ( | const string & | name, |
const string & | request, | ||
int | hour = 0 , |
||
int | minutes = 0 , |
||
int | seconds = 0 , |
||
int | milliseconds = 0 , |
||
int | flags = 0 , |
||
int | style = 0 |
||
) |
Add a time option at the end of the options list.
[in] | name | the name string of the new option |
[in] | request | the request string of the new option |
[in] | hour | the default value for the hour |
[in] | minutes | the default value for the minutes |
[in] | seconds | the default value for the seconds |
[in] | milliseconds | the default value for the milliseconds |
[in] | flags | some flags |
[in] | style | defines the style in a GUI. |
References Options::add(), Str::empty(), and Parameter::warning().
Referenced by MetaDataGroup::addRecordingOptions().
|
inline |
Add a time option at the end of the options list.
[in] | name | the name and request string of the new option |
[in] | hour | the default value for the hour |
[in] | minutes | the default value for the minutes |
[in] | seconds | the default value for the seconds |
[in] | milliseconds | the default value for the milliseconds |
[in] | flags | some flags |
[in] | style | defines the style in a GUI. |
|
inline |
Add a time option at the end of the options list with hour, minutes and seconds set to zero.
[in] | name | the name and request string of the new option |
[in] | flags | some flags |
[in] | style | defines the style in a GUI. |
Parameter & insertTime | ( | const string & | name, |
const string & | atname = "" , |
||
const string & | request = "" , |
||
int | hour = 0 , |
||
int | minutes = 0 , |
||
int | seconds = 0 , |
||
int | milliseconds = 0 , |
||
int | flags = 0 , |
||
int | style = 0 |
||
) |
Insert a new time option at the beginning of the options list (atname == "") or at the position of the option with name atname. If the option with name atname does not exist, the option is appended to the end of the list.
[in] | name | the name string of the new option |
[in] | atname | the name string of the existing option where the new options should be inserted. If left empty, the new option is inserted at the beginning of the option list. |
[in] | request | the request string of the new option |
[in] | hour | the default value for the hour |
[in] | minutes | the default value for the minutes |
[in] | seconds | the default value for the seconds |
[in] | milliseconds | the default value for the milliseconds |
[in] | flags | some flags |
[in] | style | defines the style in a GUI. |
References Str::empty(), Options::insert(), and Parameter::warning().
|
inline |
Insert a new time option at the beginning of the options list (atname == "") or at the position of the option with name atname. If the option with name atname does not exist, the option is appended to the end of the list.
[in] | name | the name and request string of the new option |
[in] | atname | the name string of the existing option where the new options should be inserted. If left empty, the new option is inserted at the beginning of the option list. |
[in] | hour | the default value for the hour |
[in] | minutes | the default value for the minutes |
[in] | seconds | the default value for the seconds |
[in] | milliseconds | the default value for the milliseconds |
[in] | flags | some flags |
[in] | style | defines the style in a GUI. |
|
inline |
Insert a new time option at the beginning of the options list (atname == "") or at the position of the option with name atname. If the option with name atname does not exist, the option is appended to the end of the list. The hour, minutes, seconds and milliseconds are set to zero.
[in] | name | the name and request string of the new option |
[in] | atname | the name string of the existing option where the new options should be inserted. If left empty, the new option is inserted at the beginning of the option list. |
[in] | flags | some flags |
[in] | style | defines the style in a GUI. |
const Parameter & time | ( | const string & | name, |
int | index, | ||
int & | hour, | ||
int & | minutes, | ||
int & | seconds, | ||
int & | milliseconds | ||
) | const |
Get the time from a time option.
[in] | name | the name string of the option |
[in] | index | the index of the time |
[out] | hour | the hour of the specified time |
[out] | minutes | the minutes of the specified time |
[out] | seconds | the seconds of the specified time |
[out] | milliseconds | the milliseconds of the specified time |
References Str::empty(), Options::end(), and Options::find().
Referenced by AudioMonitor::audioCallback(), PlotTrace::displayIndex(), SaveFiles::SaveFiles(), Session::Session(), and Session::startTheSession().
Parameter & setTime | ( | const string & | name, |
int | hour, | ||
int | minutes, | ||
int | seconds, | ||
int | milliseconds = 0 |
||
) |
Set the value of an existing time option.
[in] | name | the name string of the option |
[in] | hour | the new value for the hour |
[in] | minutes | the new value for the minutes |
[in] | seconds | the new value for the seconds |
[in] | milliseconds | the new value for the milliseconds |
References Options::callNotifies(), Str::empty(), Options::end(), and Options::find().
Parameter & setTime | ( | const string & | name, |
const string & | time | ||
) |
Set the value of an existing time option.
[in] | name | the name string of the option |
[in] | time | the new value for the time |
References Options::callNotifies(), Str::empty(), Options::end(), and Options::find().
Parameter & setTime | ( | const string & | name, |
const struct tm & | time | ||
) |
Set the value of an existing time option.
[in] | name | the name string of the option |
[in] | time | the new value for the time |
References Options::callNotifies(), Str::empty(), Options::end(), and Options::find().
Parameter & setTime | ( | const string & | name, |
const time_t & | time | ||
) |
Set the value of an existing time option.
[in] | name | the name string of the option |
[in] | time | the new value for the time |
References Options::callNotifies(), Str::empty(), Options::end(), and Options::find().
Parameter & setCurrentTime | ( | const string & | name | ) |
Set the value of an existing time option to the current time.
[in] | name | the name string of the option |
References Options::callNotifies(), Str::empty(), Options::end(), and Options::find().
Set value of an existing time option with name name to the one of p, if both are of valueType() Time. If the value of the parameter is changing then the changedFlag() is set.
References Options::callNotifies(), Str::empty(), Options::end(), and Options::find().
const Parameter & defaultTime | ( | const string & | name, |
int | index, | ||
int & | hour, | ||
int & | minutes, | ||
int & | seconds, | ||
int & | milliseconds | ||
) | const |
Get the default time from a time option.
[in] | name | the name string of the option |
[in] | index | the index of the default time |
[out] | hour | the hour of the specified default time |
[out] | minutes | the minutes of the specified default time |
[out] | seconds | the seconds of the specified default time |
[out] | milliseconds | the milliseconds of the specified default time |
References Str::empty(), Options::end(), and Options::find().
Parameter & setDefaultTime | ( | const string & | name, |
int | hour, | ||
int | minutes, | ||
int | seconds, | ||
int | milliseconds = 0 |
||
) |
Set the default value of an existing time option.
[in] | name | the name string of the option |
[in] | hour | the new value for the default hour |
[in] | minutes | the new value for the default minutes |
[in] | seconds | the new value for the default seconds |
[in] | milliseconds | the new value for the default milliseconds |
References Str::empty(), Options::end(), and Options::find().
Options & newSection | ( | int | level, |
const string & | name, | ||
const string & | type = "" , |
||
int | flag = 0 , |
||
int | style = 0 |
||
) |
Add a new subsection of level level. The new section is named name, has the optional type specifier type, some flag for selecting this section, and is formatted according to the style flag. level = 0 is the upper level, i.e. a new section is added. Higher levels add sections lower in the hierachy, i.e. level = 1 adds a subsection, level = 2 a subsubsection, etc. Subsequent calls to addText(), addNumber(), etc. add new Parameter to the added section.
References Str::empty(), Options::Options(), Options::parentSection(), and Options::setParentSection().
Referenced by MetaData::add(), Options::addSection(), OutData::append(), MetaDataGroup::clear(), DeviceSelector::dialogClosed(), OutData::fill(), DataIndex::DataItem::loadCell(), TableKey::newSection(), Options::newSection(), Options::newSubSection(), Options::newSubSubSection(), OutData::operator+=(), MetaDataGroup::readConfig(), RELACSWidget::RELACSWidget(), OutData::repeat(), SaveFiles::save(), Settings::Settings(), and SaveFiles::ODMLFiles::writeStimulus().
|
inline |
Options & newSection | ( | const string & | name, |
const string & | type = "" , |
||
int | flag = 0 , |
||
int | style = 0 |
||
) |
Add a new section of Options to the end of the sections list. The new section is named name, has the optional type specifier type, some flag for selecting this section, and is formatted according to the style flag. Subsequent calls to addText(), addNumber(), etc. add new Parameter to the added section.
References Options::newSection().
|
inline |
Options & newSubSection | ( | const string & | name, |
const string & | type = "" , |
||
int | flag = 0 , |
||
int | style = 0 |
||
) |
Add a new subsection of Options to the last section. The new subsection is named name, has the optional type specifier type, some flag for selecting this section, and is formatted according to the style flag. Subsequent calls to addText(), addNumber(), etc. add new Parameter to the added subsection.
References Options::newSection().
Referenced by TableKey::newSubSection().
|
inline |
Options & newSubSubSection | ( | const string & | name, |
const string & | type = "" , |
||
int | flag = 0 , |
||
int | style = 0 |
||
) |
Add a new subsubsection of Options to the last subsection of the last section. The new subsubsection is named name, has the optional type specifier type, some flag for selecting this section, and is formatted according to the style flag. Subsequent calls to addText(), addNumber(), etc. add new Parameter to the added subsubsection.
References Options::newSection().
Referenced by TableKey::newSubSubSection().
|
inline |
Options & addSection | ( | const string & | name, |
const string & | type = "" , |
||
int | flag = 0 , |
||
int | style = 0 |
||
) |
Add a new section of Options to the end of the currently active Option's sections list. The new section is named name, has the optional type specifier type, some flag for selecting this section, and is formatted according to the style flag. Subsequent calls to addText(), addNumber(), etc. add new Parameter to the added section.
References Options::clearSections(), Options::newSection(), and Options::parentSection().
|
inline |
Options & insertSection | ( | const string & | name, |
const string & | atpattern, | ||
const string & | type = "" , |
||
int | flag = 0 , |
||
int | style = 0 |
||
) |
Insert a new section of Options before the section specified by atpattern. If atpattern is not found or if atpattern is empty, the new section is added to the beginning or the end of the currently active Options' section list, respectively. The new section is named name, has the optional type specifier type, some flag for selecting this section, and is formatted according to the style flag. Subsequent calls to addText(), addNumber(), etc. add new Parameter to the inserted section.
References Options::findSection(), Options::Options(), Options::parentSection(), Options::sectionsEnd(), and Options::setParentSection().
Referenced by TableKey::insertSection().
|
inline |
Options & newSection | ( | int | level, |
const Options & | opt, | ||
int | selectmask, | ||
const string & | name = "" , |
||
const string & | type = "" , |
||
int | flag = 0 , |
||
int | style = 0 |
||
) |
Add opt as a new subsection of level level. Only name-value pairs and sections as specified by selectmask are taken from opt. If name is not an empty string, the name of the new section is set to name. If type is not an empty string, the type of the new section is set to type. flag and style are added to the new sections flag and style flag, respectively. level = 0 is the upper level, i.e. a new section is added. Higher levels add sections lower in the hierachy, i.e. level = 1 adds a subsection, level = 2 a subsubsection, etc. Subsequent calls to addText(), addNumber(), etc. add new Parameter to the added section.
References Options::addFlag(), Options::addStyle(), Str::empty(), Options::Options(), Options::parentSection(), Options::setName(), Options::setParentSection(), and Options::setType().
|
inline |
References name.
|
inline |
Options & newSection | ( | const Options & | opt, |
int | selectmask, | ||
const string & | name = "" , |
||
const string & | type = "" , |
||
int | flag = 0 , |
||
int | style = 0 |
||
) |
Add opt as a new section to the end of this Options section list. Only name-value pairs and sections as specified by selectmask are taken from opt. If name is not an empty string, the name of the new section is set to name. If type is not an empty string, the type of the new section is set to type. flag and style are added to the new sections flag and style flag, respectively. Subsequent calls to addText(), addNumber(), etc. add new Parameter to the added section.
References Options::newSection().
|
inline |
References name.
Options & newSubSection | ( | const Options & | opt, |
int | selectmask, | ||
const string & | name = "" , |
||
const string & | type = "" , |
||
int | flag = 0 , |
||
int | style = 0 |
||
) |
Add opt as a new subsection to the last section. Only name-value pairs and sections as specified by selectmask are taken from opt. If name is not an empty string, the name of the new section is set to name. If type is not an empty string, the type of the new section is set to type. flag and style are added to the new sections flag and style flag, respectively. Subsequent calls to addText(), addNumber(), etc. add new Parameter to the added section.
References Options::newSection().
|
inline |
References name.
Options & newSubSubSection | ( | const Options & | opt, |
int | selectmask, | ||
const string & | name = "" , |
||
const string & | type = "" , |
||
int | flag = 0 , |
||
int | style = 0 |
||
) |
Add opt as a new subsubsection to the last subsection of the last section. Only name-value pairs and sections as specified by selectmask are taken from opt. If name is not an empty string, the name of the new section is set to name. If type is not an empty string, the type of the new section is set to type. flag and style are added to the new sections flag and style flag, respectively. Subsequent calls to addText(), addNumber(), etc. add new Parameter to the added section.
References Options::newSection().
|
inline |
References name.
|
inline |
Options & addSection | ( | const Options & | opt, |
int | selectmask, | ||
const string & | name = "" , |
||
const string & | type = "" , |
||
int | flag = 0 , |
||
int | style = 0 |
||
) |
Add opt as a new section to the end of the currently active Option's sections list. Only name-value pairs and sections as specified by selectmask are taken from opt. The new section is named name, has the optional type specifier type, some flag for selecting this section, and is formatted according to the style flag. Subsequent calls to addText(), addNumber(), etc. add new Parameter to the added section.
References Options::clearSections(), Options::newSection(), and Options::parentSection().
|
inline |
References name.
Options & insertSection | ( | const Options & | opt, |
int | selectmask, | ||
const string & | name, | ||
const string & | atpattern, | ||
const string & | type = "" , |
||
int | flag = 0 , |
||
int | style = 0 |
||
) |
Insert opt as a new section of Options before the section specified by atpattern. Only name-value pairs and sections as specified by selectmask are taken from opt. If atpattern is not found or if atpattern is empty, the new section is added to the beginning or the end of the currently active Options' section list, respectively. If name is not an empty string, the name of the new section is set to name. If type is not an empty string, the type of the new section is set to type. flag and style are added to the new sections flag and style flag, respectively. Subsequent calls to addText(), addNumber(), etc. add new Parameter to the inserted section.
References Options::addFlag(), Options::addStyle(), Options::findSection(), Options::Options(), Options::parentSection(), Options::sectionsEnd(), Options::setName(), Options::setParentSection(), and Options::setType().
|
inline |
|
inline |
Add opt as a section. Only a pointer of opt is stored, the content of opt is not copied. If opt does not have a parentSection() or newparent is true
then its parent section is set to this. Subsequent calls to addText(), addNumber(), etc. still add new Parameter to the currently active section.
Add opt as a section to the end of the currently active Option's sections list. Only a pointer of opt is stored, the content of opt is not copied. If opt does not have a parentSection() or newparent is true
then its parent section is set to currently active section. Subsequent calls to addText(), addNumber(), etc. still add new Parameter to the currently active section.
References Options::parentSection(), and Options::setParentSection().
Insert opt as a section of Options before the section specified by atpattern. If atpattern is not found or if atpattern is empty, the new section is added to the beginning or the end of the currently active Options' section list, respectively. Only a pointer of opt is stored, the content of opt is not copied. If opt does not have a parentSection() or newparent is true
then its parent section is set to its parent in the new tree. Subsequent calls to addText(), addNumber(), etc. still add new Parameter to the currently active section.
References Options::findSection(), Options::parentSection(), Options::sectionsEnd(), and Options::setParentSection().
Add all sections of opt as a section. Only a pointer of the sections is stored, their content is not copied. If newparent is true
then the sections' parent section is set to this. Subsequent calls to addText(), addNumber(), etc. still add new Parameter to the currently active section.
Referenced by MetaData::add().
void endSection | ( | void | ) |
End the currently active section such that subsequent calls to addText(), addNumber(), etc. add new Parameter to the parent section.
References Options::parentSection().
void clearSections | ( | void | ) |
Reset the currently active section such that subsequent calls to addText(), addNumber(), etc. add new Parameter to this Options.
Referenced by Options::addSection(), OutData::append(), and Options::flatten().
void setSection | ( | Options & | opt | ) |
Make opt the currently active section of this such that subsequent calls to addText(), addNumber(), etc. add new Parameter to opt.
void lastSection | ( | void | ) |
Make the last top-level section of this the currently active section such that addText(), addNumber(), etc. add new Parameter to the last top-level section. If this does not have sections, this is made the currently active section.
int up | ( | void | ) |
Move this Options with its name-value pairs and sections one level up in the hierachy to its parentSection().
References Options::begin(), Options::end(), and Options::parentSection().
int down | ( | void | ) |
Make this Options with its name-value pairs and sections a section of this, i.e. move it down the hierarchy.
References Options::empty(), Options::name(), Options::Options(), Options::setInclude(), Options::setName(), Options::setParentSection(), Options::setStyle(), Options::setType(), and Options::type().
Referenced by Options::load(), DataIndex::DataItem::loadCell(), and OutData::operator+=().
Parameter & setDefault | ( | const string & | name | ) |
Set value of option with name name to its default.
References Options::callNotifies(), Str::empty(), Options::end(), and Options::find().
Options & setDefaults | ( | int | flags = 0 | ) |
Set values of all options to their default.
References Options::begin(), Options::callNotifies(), Options::end(), Options::sectionsBegin(), Options::sectionsEnd(), and Str::setDefault().
Referenced by Macros::check(), MacroCommand::dialog(), Macro::launch(), MacroCommand::run(), RePro::saveConfig(), and MacroCommand::start().
Parameter & setToDefault | ( | const string & | name | ) |
Set default of option with name name to its value.
References Str::empty(), Options::end(), and Options::find().
Referenced by Macros::saveConfig().
Options & setToDefaults | ( | int | flags = 0 | ) |
Set defaults of all options to their values.
References Options::begin(), Options::end(), Options::sectionsBegin(), and Options::sectionsEnd().
Referenced by Macro::acceptDialog(), Macro::addParameter(), MetaData::dialog(), MetaData::presetDialog(), and RePro::readConfig().
Options & erase | ( | Options::iterator | p | ) |
Remove the Parameter where p points to. p can also be contained in a subsection of Options.
References Options::end(), and Options::parentSection().
Referenced by SaveFiles::closeFiles(), MacroFile::delMacro(), TableKey::erase(), SaveFiles::ODMLFiles::open(), DataFile::readBlock(), and MetaData::remove().
Options & erase | ( | Options::section_iterator | s | ) |
Remove the Options where s points to. s can also be contained in a subsection of Options.
References Options::parentSection(), and Options::sectionsEnd().
Remove the Options where s points to. s can also be contained in a subsection of Options.
References Options::parentSection(), Options::sectionsBegin(), Options::sectionsEnd(), and Options::setParentSection().
Options & erase | ( | const string & | pattern | ) |
Remove all Parameter and Options specified by pattern.
References Options::end(), Options::find(), Options::findSection(), Options::parentSection(), and Options::sectionsEnd().
Options & erase | ( | int | selectflag | ) |
Remove all Parameter and Options whose flag matches selectflag.
References Options::begin(), Options::end(), Options::sectionsBegin(), and Options::sectionsEnd().
Options & pop | ( | void | ) |
Remove last Parameter from the currently active section.
Referenced by FilterDetectors::addMenu().
Options & popSection | ( | void | ) |
Remove last Options from the currently active section.
Flatten the Options, i.e. delete all sections and subsections and copy their Parameter to this. The Parameter are copied to root, which by default is this.
References Options::add(), Options::clearSections(), Options::flatten(), Options::sectionsBegin(), Options::sectionsEnd(), and Options::setParentSection().
Referenced by Options::flatten().
Options & clear | ( | bool | revert = true | ) |
Remove all Parameter and sections of Options. If revert is set to true
, also revert parentSection() of non-owned sections to zero.
References Options::sectionsBegin(), and Options::sectionsEnd().
Referenced by ReProData::acceptDialog(), MetaData::add(), OutData::alphaWave(), OutData::append(), Options::assign(), Attenuate::attenuate(), OutData::bandNoiseWave(), MetaDataGroup::clear(), MetaData::clear(), Attenuate::clear(), OutData::clear(), TableKey::clear(), AOSim::close(), AttSim::close(), AISim::close(), DataFile::close(), Attenuate::close(), OutData::constWave(), InData::copy(), Options::copy(), DataIndex::DataItem::DataItem(), MacroCommand::dialogAction(), DeviceSelector::dialogClosed(), PlotTrace::displayData(), PlotTrace::displayIndex(), OutData::fill(), Attenuate::init(), OutData::load(), Macro::Macro(), DataFile::metaDataOptions(), Attenuate::mute(), OutData::noiseWave(), AOSim::open(), AttSim::open(), AISim::open(), AnalogInput::open(), DigitalIO::open(), AnalogOutput::open(), Attenuate::open(), SaveFiles::openFiles(), OutData::ouNoiseWave(), OutDataInfo::OutDataInfo(), OutData::pulseWave(), OutData::rampWave(), MetaDataGroup::readConfig(), FilterDetectors::readConfig(), DeviceList< T, PluginID >::readConfig(), OutData::rectangleWave(), OutData::repeat(), ReProData::ReProData(), AOSim::reset(), AISim::reset(), AnalogOutput::reset(), SaveFiles::save(), SaveFiles::SaveFiles(), OutData::sawDownWave(), OutData::sawUpWave(), Attenuator::setInfo(), DigitalIO::setInfo(), AnalogInput::setInfo(), AnalogOutput::setInfo(), Trigger::setSettings(), AnalogInput::setSettings(), AnalogOutput::setSettings(), AttSim::settings(), DigitalIO::settings(), OutData::sineWave(), TableKey::subSection(), OutData::sweepWave(), OutData::triangleWave(), Attenuate::write(), and Options::~Options().
int size | ( | void | ) | const |
Total number of name-value pairs in this Options and all its sections.
References Options::sectionsBegin(), and Options::sectionsEnd().
Referenced by MetaDataGroup::configSize(), ConfigClass::configSize(), Macros::create(), ConfigDialog::dialog(), RePro::dialog(), Options::empty(), PlotTrace::init(), PlotTrace::plot(), PlotTrace::print(), SaveFiles::RelacsFiles::resetIndex(), Macros::saveConfig(), AudioMonitor::start(), Macros::switchMacro(), AnalogOutput::testWriteData(), SaveFiles::RelacsFiles::writeEvents(), and SaveFiles::writeToggle().
int size | ( | int | selectflag | ) | const |
Total number of name-value pairs in this Options and all its sections that have selectflag set in their flags(). If selectflag equals zero, all options are counted. If selectflag is negative, only options whose values differ from the default value and have abs(selectflag) set in their flags are counted. If selectflag equals NonDefault, all options whose values differ from their default value are counted. The flag() of the sections is not used by this function.
References Options::begin(), Options::end(), Options::sectionsBegin(), Options::sectionsEnd(), and Str::size().
bool empty | ( | void | ) | const |
True if there are no name-value pairs in this Options and all its sections.
References Options::size().
Referenced by MetaData::add(), Device::addInfo(), Macro::addMenu(), OptWidget::assign(), DeviceList< T, PluginID >::create(), FilterDetectors::createFilters(), Macro::dialog(), ConfigDialog::dialogHeaderWidget(), PlotTrace::displayIndex(), Options::down(), TableKey::erase(), Options::find(), Options::findSection(), SaveFiles::RelacsFiles::openStimulusFiles(), relacs::operator<<(), RELACSWidget::RELACSWidget(), RePro::releaseKey(), Options::rfind(), Options::rfindSection(), Options::save(), SaveFiles::RelacsFiles::writeRePro(), SaveFiles::writeStimulus(), and SaveFiles::RelacsFiles::writeStimulus().
int parameterSize | ( | void | ) | const |
Referenced by DataDescriptionModel::data(), DataDescriptionModel::hasChildren(), DataDescriptionModel::index(), DataDescriptionModel::parent(), DataDescriptionModel::rowCount(), and SaveFiles::RelacsFiles::writeRePro().
int parameterSize | ( | int | flags | ) | const |
References Options::begin(), and Options::end().
int sectionsSize | ( | void | ) | const |
Referenced by MetaData::add(), Options::findSection(), DataDescriptionModel::hasChildren(), DataIndex::DataItem::loadCell(), DataDescriptionModel::parent(), Options::rfindSection(), DataDescriptionModel::rowCount(), and SaveFiles::RelacsFiles::writeRePro().
int sectionsSize | ( | int | flags | ) | const |
References Options::sectionsBegin(), and Options::sectionsEnd().
bool exist | ( | const string & | pattern | ) | const |
True if a name-value pair with name name exist somewhere in the hierarchy of Options.
References Options::end(), and Options::find().
Referenced by SaveFiles::addFile(), and Attenuate::open().
bool existSection | ( | const string & | pattern | ) | const |
True if a section (including the name() of this Options) of name-value pairs with name name exist somewhere in the hierarchy of Options.
References Options::findSection(), and Options::sectionsEnd().
Options & setFlags | ( | int | flags, |
int | selectflag = 0 |
||
) |
Set flags of all options that are selected by selectflag to flags. If selectflag equals zero, all options are considered. If selectflag is negative, only options whose values differ from the default value and have abs(selectflag) set in their flags are considered. If selectflag equals NonDefault, all options whose values differ from their default value are considered.
References Options::begin(), Options::end(), Options::flag(), Options::sectionsBegin(), Options::sectionsEnd(), and Options::setFlag().
Options & addFlags | ( | int | flags, |
int | selectflag = 0 |
||
) |
Add the bits specified by flags to the flags of all options that are selected by selectflag. If selectflag equals zero, all options are considered. If selectflag is negative, only options whose values differ from the default value and have abs(selectflag) set in their flags are considered. If selectflag equals NonDefault, all options whose values differ from their default value are considered.
References Options::addFlag(), Options::begin(), Options::end(), Options::flag(), Options::sectionsBegin(), and Options::sectionsEnd().
Options & delFlags | ( | int | flags, |
int | selectflag = 0 |
||
) |
Clear the bits specified by flags of the flags of all options that are selected by selectflag. If selectflag equals zero, all options are considered. If selectflag is negative, only options whose values differ from the default value and have abs(selectflag) set in their flags are considered. If selectflag equals NonDefault, all options whose values differ from their default value are considered.
References Options::begin(), Options::delFlag(), Options::end(), Options::flag(), Options::sectionsBegin(), and Options::sectionsEnd().
Options & setValueTypeFlags | ( | int | flags, |
int | typemask | ||
) |
Set flags of all options whose type matches typemask (see Parameter::valueTypes() ) to flags.
References Options::begin(), Options::checkType(), Options::end(), Options::sectionsBegin(), Options::sectionsEnd(), and Options::setFlag().
Options & addValueTypeFlags | ( | int | flags, |
int | typemask | ||
) |
Add flags to the flags of all options whose type matches typemask (see Parameter::valueTypes() ).
References Options::addFlag(), Options::begin(), Options::checkType(), Options::end(), Options::sectionsBegin(), and Options::sectionsEnd().
Options & delValueTypeFlags | ( | int | flags, |
int | typemask | ||
) |
Clear the bits specified by flags of the flags of all options whose type matches typemask (see Parameter::vallueTypes() ).
References Options::begin(), Options::checkType(), Options::delFlag(), Options::end(), Options::sectionsBegin(), and Options::sectionsEnd().
Options & setStyles | ( | int | style, |
int | selectflag = 0 |
||
) |
Set style of all Parameter and sections that match selectflag to style.
References Options::begin(), Options::end(), Options::flag(), Options::sectionsBegin(), Options::sectionsEnd(), and Options::setStyle().
Options & addStyles | ( | int | style, |
int | selectflag = 0 |
||
) |
Add the bits specified by style to the style of all Parameter and sections that match selectflag.
References Options::addStyle(), Options::begin(), Options::end(), Options::flag(), Options::sectionsBegin(), and Options::sectionsEnd().
Referenced by RePro::dialog().
Options & delStyles | ( | int | style, |
int | selectflag = 0 |
||
) |
Clear the bits specified by style of the style of all Parameter and sections that match selectflag.
References Options::begin(), Options::delStyle(), Options::end(), Options::flag(), Options::sectionsBegin(), and Options::sectionsEnd().
Referenced by RePro::dialog().
int styleSize | ( | int | style | ) | const |
Total number of Parameter in all asections that have the style style set in their style().
References Options::begin(), Options::end(), Options::sectionsBegin(), Options::sectionsEnd(), and Options::style().
Options & setValueTypeStyles | ( | int | style, |
int | typemask | ||
) |
Set style of all Parameter and sections whose type matches typemask (see Parameter::valueTypes() ) to style.
References Options::begin(), Options::checkType(), Options::end(), Options::sectionsBegin(), Options::sectionsEnd(), and Options::setStyle().
Options & addValueTypeStyles | ( | int | style, |
int | typemask | ||
) |
Add the bits specified by style to the style of all Parameter and sections whose type matches typemask (see Parameter::valueTypes() ).
References Options::addStyle(), Options::begin(), Options::checkType(), Options::end(), Options::sectionsBegin(), and Options::sectionsEnd().
Options & delValueTypeStyles | ( | int | style, |
int | typemask | ||
) |
Clear the bits specified by style of the style of all Parameter and sections whose type matches typemask (see Parameter::valueTypes() ).
References Options::begin(), Options::checkType(), Options::delStyle(), Options::end(), Options::sectionsBegin(), and Options::sectionsEnd().
int nameWidth | ( | int | selectmask = 0 , |
bool | detailed = false , |
||
bool | escape = false |
||
) | const |
Length of largest name. If detailed is true
, then include length of request string as well. If escape is true
, then include lenght of escaped quotes.
References Options::begin(), Options::end(), Options::flag(), Options::name(), Str::name(), Options::sectionsBegin(), Options::sectionsEnd(), Str::size(), and Options::type().
Referenced by Options::save().
string save | ( | int | selectmask = 0 , |
int | flags = 0 |
||
) | const |
Write names and their values to a string separated by ", ". Saves only options that have selectmask set in their flags(). If selectmask equals zero, all options are saved. If selectmask is negative, only options whose values differ from the default value and have abs(selectmask) set in their flags are saved. If selectmask equals NonDefault, all options whose values differ from their default value are saved. Use for flags values from SaveFlags to modify the way how the Options are written to the string.
References Options::begin(), Options::Embrace, Options::end(), Options::EscapeQuotes, Options::flag(), Options::name(), Options::NoName, Options::NoType, Options::PrintStyle, Options::sectionsBegin(), Options::sectionsEnd(), Options::style(), Options::SwitchNameType, Options::TabSection, and Options::type().
Referenced by Macro::menuStr(), relacs::operator<<(), PlotTrace::print(), MetaData::save(), MetaDataGroup::saveConfig(), DeviceList< T, PluginID >::saveConfig(), ConfigClass::saveConfig(), RELACSPlugin::saveDoxygenOptions(), TableKey::saveMetaData(), Session::setSaveData(), Macro::variablesStr(), and SaveFiles::RelacsFiles::writeRePro().
ostream & save | ( | ostream & | str, |
const string & | start = "" , |
||
int | selectmask = 0 , |
||
int | flags = 0 , |
||
int | width = -1 |
||
) | const |
Write names and their values to stream str as a valid YAML document. Start each line with start. Saves only options that have selectmask set in their flags(). If selectmask equals zero, all options are saved. If selectmask is negative, only options whose values differ from the default value and have abs(selectmask) set in their flags are saved. If selectmask equals NonDefault, all options whose values differ from their default value are saved. Use for flags values from SaveFlags to modify the way how the Options are written to the string.
References Options::begin(), Options::end(), Options::EscapeQuotes, Options::flag(), Options::name(), Options::nameWidth(), Options::NoName, Options::NoType, Options::PrintRequest, Options::PrintStyle, Options::sectionsBegin(), Options::sectionsEnd(), Options::style(), Options::SwitchNameType, Options::TabSection, and Options::type().
ostream & save | ( | ostream & | str, |
const string & | textformat, | ||
const string & | numberformat, | ||
const string & | boolformat = "%i=%b" , |
||
const string & | dateformat = "%i=%04Y-%02m-%02d" , |
||
const string & | timeformat = "%i=%02H:%02M:%02S" , |
||
const string & | sectionformat = "%i" , |
||
int | selectmask = 0 , |
||
const string & | start = "" |
||
) | const |
Write each name-value pair as a separate line to stream str and use textformat, numberformat, boolformat, dateformat, timeformat, and sectionformat for formatting text, number, boolean, date, and time parameter, or sections, respectively. Each line is started with start.
References Options::begin(), Options::empty(), Options::end(), Str::format(), Options::name(), Options::sectionsBegin(), Options::sectionsEnd(), and Options::type().
ostream & saveXML | ( | ostream & | str, |
int | selectmask = 0 , |
||
int | flags = 0 , |
||
int | level = 0 , |
||
int | indent = 4 |
||
) | const |
Write options in XML format to output stream.
[in] | str | the output stream |
[in] | selectmask | selects options that have selectmask set in their flags(). See Parameter::flags(int) for details. |
[in] | flags | some details on how the data should be saved. |
[in] | level | the level of indentation |
[in] | indent | the indentation depth, i.e. number of white space characters per level |
References Options::begin(), Options::DontCloseSection, Options::end(), Options::flag(), Options::include(), Options::name(), Options::NoInclude, Options::NoName, Options::NoType, Options::sectionsBegin(), Options::sectionsEnd(), Options::SwitchNameType, and Options::type().
Referenced by SaveFiles::ODMLFiles::open(), MetaData::saveXML(), SaveFiles::ODMLFiles::writeRePro(), and SaveFiles::ODMLFiles::writeStimulus().
Options & read | ( | const string & | opttxt, |
int | flag, | ||
const string & | assignment = ":=" , |
||
const string & | separator = ",;" , |
||
int * | indent = 0 |
||
) |
Read options from string opttxt of the form "parameter1: x, parameter2: y, parameter3: z, ...". If the parameters 'parameter1', 'parameter2', ... match the name of an option, its value is set to x, y, z, ... respectively, and flag is added to its flags, if flag is not 0.
References Parameter::addFlags(), Options::assign(), Options::callNotifies(), Str::empty(), Str::erase(), Options::error(), Str::find(), Str::findFirstNot(), Str::findLastNot(), Options::findSection(), Str::findSeparator(), Options::index(), Str::mid(), Options::name(), Options::parentSection(), Str::preventFirst(), Str::preventLast(), Options::read(), Options::sectionsEnd(), Str::size(), Str::strip(), and Str::WhiteSpace.
Referenced by MacroCommand::acceptDialog(), RePro::checkOptions(), MacroCommand::dialog(), ConfigDialog::notificationFromDialog(), relacs::operator>>(), Options::read(), Options::readAppend(), ConfigClass::readConfig(), and FilterSelector::setFilters().
|
inline |
istream & read | ( | istream & | str, |
int | flag, | ||
const string & | assignment = ":=" , |
||
const string & | comment = "#" , |
||
const string & | stop = "" , |
||
Str * | line = 0 |
||
) |
Read from stream str and set the values of existing options, until end of file or a line beginning with stop is reached. If stop equals the StopEmpty string, reading is stopped at an empty line. Before reading the option comments are removed from each line using Str::stripComment( comment ). If line does not equal zero then the last read line is returned in line. Each parameter that has been read from the stream gets its flag set to flag. The warning message is set.
References Options::callNotifies(), Str::empty(), Options::error(), Str::find(), Str::findFirstNot(), Options::read(), StrQueue::StopEmpty, Str::stripComment(), and Str::WhiteSpace.
|
inline |
References relacs::line().
Read options from the list of strings sq. Each line is assumed to be a single option. Each parameter that has been read from sq gets its flag set to flag. The warning message is set.
References Options::callNotifies(), Options::error(), and Options::read().
bool read | ( | const Parameter & | p, |
int | flag = 0 |
||
) |
Read options from the parameter p. Returns true
if p was read and add flag to the flags of the Parameter that read it.
References Options::addFlags(), Options::begin(), Options::callNotifies(), Options::end(), Options::sectionsBegin(), and Options::sectionsEnd().
Read options from the options o. A subset of the options can be selected by flags. Parameter that read a value get flag added to their flags.
References Options::begin(), Options::callNotifies(), Options::changed(), Options::end(), Options::sectionsBegin(), and Options::sectionsEnd().
bool readAppend | ( | const Parameter & | p | ) |
Read options from the parameter p. If no option with the name equal to p's name exist p is appended to the active section of Options. Returns true
if p was read, false
if it was appended.
References Options::add(), Options::callNotifies(), Str::empty(), Parameter::name(), and Options::read().
Referenced by ReProData::acceptDialog(), MacroCommand::acceptDialog(), and Options::readAppend().
Read options from the options o that have flags set. All options from o that do not exist are appended to the sections where they belong to.
References Options::begin(), Options::callNotifies(), Options::end(), Options::Options(), Options::readAppend(), Options::sectionsBegin(), Options::sectionsEnd(), and Options::setParentSection().
Options & load | ( | const Str & | opttxt, |
const string & | assignment = ":=" , |
||
const string & | separator = ",;" , |
||
int * | indent = 0 , |
||
int * | indentspacing = 0 , |
||
int * | level = 0 |
||
) |
Load options from string opttxt of the form "parameter1=x; parameter2=y; parameter3=z; ...". New options are created with the names and request strings set to parameter1, parameter2, parameter3, ... and their values set to x, y, z, ..., respectively.
References Options::callNotifies(), Options::down(), Str::empty(), Str::erase(), Options::error(), Str::find(), Str::findFirstNot(), Str::findLastNot(), Str::findSeparator(), Options::index(), Options::load(), Str::mid(), Options::name(), Options::Options(), Options::parentSection(), Str::preventFirst(), Str::preventLast(), Options::setName(), Options::setParentSection(), Parameter::setParentSection(), Options::setStyle(), Options::setType(), Str::size(), Str::strip(), Options::style(), Options::TabSection, Options::type(), Parameter::warning(), and Str::WhiteSpace.
Referenced by Macro::addParameter(), OutData::load(), Options::load(), DataIndex::DataItem::loadCell(), Options::Options(), MetaDataGroup::readConfig(), FilterDetectors::readConfig(), and DeviceList< T, PluginID >::readConfig().
istream & load | ( | istream & | str, |
const string & | assignment = ":=" , |
||
const string & | comment = "#" , |
||
const string & | stop = "" , |
||
string * | line = 0 |
||
) |
Read from stream str and create new options, until end of file or a line beginning with stop is reached. If stop equals the StopEmpty string, reading is stopped at an empty line. Each line is assumed to be a single option, which is loaded with Parameter::load(). Before loading the option comments are removed from each line using Str::stripComment( comment ). If line does not equal zero then the last read line is returned in line. The warning message is set.
References Options::callNotifies(), Str::find(), Str::findFirstNot(), relacs::line(), Options::load(), StrQueue::StopEmpty, Str::stripComment(), Options::warning(), and Str::WhiteSpace.
Create new options from the list of strings sq. Each line is assumed to be a single option, which is loaded with Parameter::load(). The warning message is set.
References Options::callNotifies(), Str::empty(), Options::load(), and Options::warning().
|
inlinevirtual |
This function can be reimplemented to react to a change of the value of some parameters. This function is called after each of the setNumber(), setText(), etc functions.
Reimplemented in SaveFiles, MetaData, Model, Settings, and AudioMonitor.
Referenced by Options::callNotifies(), OptWidgetText::doBrowse(), OptWidgetText::doTextChanged(), OptWidgetMultiText::doTextChanged(), OptWidgetNumber::doValueChanged(), OptWidgetBoolean::doValueChanged(), OptWidgetDate::doValueChanged(), OptWidgetTime::doValueChanged(), and Options::setNotify().
void callNotifies | ( | void | ) |
Calls the rootSection()'s and this Option's notify() functions if calling the notify() function is enbaled.
References Options::notify(), and Options::rootSection().
Referenced by OptWidget::accept(), OptWidget::acceptNotify(), Options::assign(), Options::load(), Options::pushInteger(), Options::pushNumber(), Options::pushText(), Options::read(), Options::readAppend(), Options::selectText(), Options::setBoolean(), Options::setCurrentDate(), Options::setCurrentTime(), Options::setDate(), Options::setDefault(), Options::setDefaults(), Options::setInteger(), Options::setNumber(), Options::setText(), and Options::setTime().
bool setNotify | ( | bool | notify = true | ) |
Enables the call of the notify() function if notify equals true
.
References Options::notify().
Referenced by OptWidgetText::doBrowse(), OptWidgetText::doTextChanged(), OptWidgetMultiText::doTextChanged(), OptWidgetNumber::doValueChanged(), OptWidgetBoolean::doValueChanged(), OptWidgetDate::doValueChanged(), OptWidgetTime::doValueChanged(), OptWidgetText::get(), OptWidgetMultiText::get(), OptWidgetNumber::get(), OptWidgetBoolean::get(), OptWidgetDate::get(), OptWidgetTime::get(), OptWidgetMultipleValues::get(), AudioMonitor::mute(), OptWidgetText::textChanged(), OptWidgetMultiText::textChanged(), AudioMonitor::unmute(), OptWidgetNumber::valueChanged(), OptWidgetBoolean::valueChanged(), OptWidgetDate::valueChanged(), and OptWidgetTime::valueChanged().
bool unsetNotify | ( | void | ) |
Disables the call of the notify() function.
Referenced by OptWidgetText::doBrowse(), OptWidgetText::doTextChanged(), OptWidgetMultiText::doTextChanged(), OptWidgetNumber::doValueChanged(), OptWidgetBoolean::doValueChanged(), OptWidgetDate::doValueChanged(), OptWidgetTime::doValueChanged(), OptWidgetText::get(), OptWidgetMultiText::get(), OptWidgetNumber::get(), OptWidgetBoolean::get(), OptWidgetDate::get(), OptWidgetTime::get(), OptWidgetMultipleValues::get(), AudioMonitor::mute(), OptWidgetText::textChanged(), OptWidgetMultiText::textChanged(), AudioMonitor::unmute(), OptWidgetNumber::valueChanged(), OptWidgetBoolean::valueChanged(), OptWidgetDate::valueChanged(), and OptWidgetTime::valueChanged().
bool notifying | ( | void | ) | const |
Returns true
if calling the notify() function is enabled.
Referenced by OptWidgetText::doBrowse(), OptWidgetText::doTextChanged(), OptWidgetMultiText::doTextChanged(), OptWidgetNumber::doValueChanged(), OptWidgetBoolean::doValueChanged(), OptWidgetDate::doValueChanged(), OptWidgetTime::doValueChanged(), OptWidgetText::get(), OptWidgetMultiText::get(), OptWidgetNumber::get(), OptWidgetBoolean::get(), OptWidgetDate::get(), OptWidgetTime::get(), OptWidgetMultipleValues::get(), OptWidgetText::textChanged(), OptWidgetMultiText::textChanged(), OptWidgetNumber::valueChanged(), OptWidgetBoolean::valueChanged(), OptWidgetDate::valueChanged(), and OptWidgetTime::valueChanged().
Returns true if the two Options o1 and o2 are equal, i.e. they have the same number of Parameter with identical name and value (as returned by Parameter::text()) and the same sections with identical name and type.
|
friend |
Returns true if the Option o1 is smaller than o2, i.e. o2 has less elements than o1, an name of o2 is smaller than the corresponding one in o1, or a value of o2 is smaller than the corresponding one in o1. This function is provided just to define some ordering of Options, as is needed for example for an stl::map.
|
friend |
Write names and their values to stream str
|
friend |
Read a single line from stream str and set options.
|
static |
Use this flag to select Parameter whose value differs from their default value.
Referenced by MacroCommand::acceptDialog(), and Options::flag().
|
static |
Section is a new tab.
Referenced by Options::load(), and Options::save().