Describes a configuration option. More...
#include <cconfigoption.h>
Public Types | |
| enum | Type |
| enum | ObjectKind |
Public Member Functions | |
Constructors, destructor | |
| cConfigOption (const char *name, bool isGlobal, Type type, const char *unit, const char *defaultValue, const char *description) | |
| cConfigOption (const char *name, ObjectKind kind, Type type, const char *unit, const char *defaultValue, const char *description) | |
Redefined cObject methods | |
| virtual std::string | info () const |
Getter methods | |
|
| |
| bool | isPerObject () const |
| bool | isGlobal () const |
| ObjectKind | getObjectKind () const |
| Type | getType () const |
| const char * | getUnit () const |
| const char * | getDefaultValue () const |
| const char * | getDescription () const |
| static const char * | getObjectKindName (ObjectKind kind) |
| static const char * | getTypeName (Type type) |
Describes a configuration option.
| const char* cConfigOption::getUnit | ( | ) | const [inline] |
Returns the unit of the option (e.g.
"s" for seconds, "b" for bytes, etc), or NULL if the option does not have a unit.
| virtual std::string cConfigOption::info | ( | ) | const [virtual] |
Can be redefined to produce a one-line description of object.
The string appears in the graphical user interface (Tkenv) e.g. when the object is displayed in a listbox. The returned string should possibly be at most 80-100 characters long, and must not contain newline.
Reimplemented from cObject.
| bool cConfigOption::isGlobal | ( | ) | const [inline] |
Returns whether this is a global setting.
Global settings may only occur in the [General] section.
| bool cConfigOption::isPerObject | ( | ) | const [inline] |
Returns whether this is a per-object configuration.
Per-object configuration entries take the form of <object-full-path>.<configname> = <value> in the inifile, instead of <configname> = <value>
1.6.3