cConfigOption Class Reference
[Internal classes]

#include <cconfigoption.h>

Inheritance diagram for cConfigOption:

cNoncopyableOwnedObject cOwnedObject noncopyable cNamedObject cObject

List of all members.


Detailed Description

Describes a configuration option.

See also:
Register_GlobalConfigOption(), Register_PerRunConfigOption(), Register_GlobalConfigOptionU(), Register_PerRunConfigOptionU(), Register_PerObjectConfigOption(), Register_PerObjectConfigOptionU()

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)

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

Member Enumeration Documentation

Configuration option data types.

Configuration option kinds.


Constructor & Destructor Documentation

cConfigOption::cConfigOption ( const char *  name,
bool  isGlobal,
Type  type,
const char *  unit,
const char *  defaultValue,
const char *  description 
)

Constructor for non per-object options.

cConfigOption::cConfigOption ( const char *  name,
ObjectKind  kind,
Type  type,
const char *  unit,
const char *  defaultValue,
const char *  description 
)

Constructor for per-object options.


Member Function Documentation

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.

See also:
detailedInfo()

Reimplemented from cObject.

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>

bool cConfigOption::isGlobal (  )  const [inline]

Returns whether this is a global setting.

Global settings may only occur in the [General] section.

ObjectKind cConfigOption::getObjectKind (  )  const [inline]

Returns the object kind for per-object configuration options, KIND_NONE otherwise.

static const char* cConfigOption::getObjectKindName ( ObjectKind  kind  )  [static]

Returns the human-readable name of a per-object option object kind.

Type cConfigOption::getType (  )  const [inline]

Data type of the option.

static const char* cConfigOption::getTypeName ( Type  type  )  [static]

Returns the human-readable name of an option data type.

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.

const char* cConfigOption::getDefaultValue (  )  const [inline]

Returns the default value in string form, or NULL if there is no default.

const char* cConfigOption::getDescription (  )  const [inline]

Returns a brief textual description of the option, which can be used as help text or hint.


The documentation for this class was generated from the following file:

Generated on Wed Apr 3 14:40:28 2013 for OMNeT++ Simulation Library by  doxygen 1.5.5