EnumParameter Class Reference
[Parameters]

Enumeration parameter type. More...

#include <parameter.h>

Inherits GenericParameter.

Inheritance diagram for EnumParameter:

Inheritance graph
[legend]
Collaboration diagram for EnumParameter:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 EnumParameter (string aName, string aComment, string aDefault, string aValues)
 the constructor of any parameter allows to define the various parameter attributes.
int get (string aClass, string aInstance)
 returns the parameter value.

Detailed Description

Enumeration parameter type.

It stores Enumerations; i.e., mutually exclusive options.

example:

Param->addParameter ("fooClass", new EnumParameter("foo",  "foo desc.", "Linux", "Linux MacOSX Win" ));
int fooVal = get<EnumParameter,int>(Param, "foo", "fooClass", "");

Comments in this case are used. The various options must be separated by spaces. The parameter will return a number corresponding to the selected option. In the above case, 0 will mean Linux, 1 MacOSX and 2 Win.


Constructor & Destructor Documentation

EnumParameter::EnumParameter string  aName,
string  aComment,
string  aDefault,
string  aValues
 

the constructor of any parameter allows to define the various parameter attributes.

Parameters:
aName name of the parameter. Spaces not allowed.
aComment a comment about the parameter
aDefault default value
aValues allowed values. Used, see above.


Member Function Documentation

int EnumParameter::get string  aClass,
string  aInstance
 

returns the parameter value.

Parameters:
aClass the class of the parameter.
aInstance The instance of the parameter


The documentation for this class was generated from the following file:
Generated on Wed Dec 22 23:23:49 2004 for NePSing by doxygen 1.3.9.1 ---- Hosted by SourceForge.net Logo