ThePEG::SwitchOption Class Reference

SwitchOption is used by the Switch class and its base class SwitchBase to define valid options in a switch. More...

#include <Switch.h>

Inheritance diagram for ThePEG::SwitchOption:

ThePEG::Named

List of all members.

Public Member Functions

 SwitchOption (SwitchBase &theSwitch, string newName, string newDescription, long newValue)
 Standard constructor.
 SwitchOption ()
 Default constructor.
const string & description () const
 The description of this option.
long value () const
 The value of this option.
 operator long () const
 The value of this option.

Private Attributes

string theDescription
 The description of this option.
long theValue
 The value of this option.


Detailed Description

SwitchOption is used by the Switch class and its base class SwitchBase to define valid options in a switch.

For each InterfacedBase class exactly one static Switch object should created for each member variable which should be interfaced. This object will automatically register itself with the BaseRepository class. Also for each Switch object exactly one static SwitchOption object should be created for each valid integer option.

See also:
InterfacedBase

InterfacedBase

Named

Definition at line 36 of file Switch.h.


Constructor & Destructor Documentation

ThePEG::SwitchOption::SwitchOption ( SwitchBase theSwitch,
string  newName,
string  newDescription,
long  newValue 
)

Standard constructor.

Parameters:
theSwitch the Switch object for which this option is defined. Note thet the static Switch object must be created before this is created.
newName the name of the option, may only contain letters [a-zA-z0-9_].
newDescription a brief description of the option.
newValue the integer value corresponding to this option.


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

Generated on Thu Apr 29 12:43:09 2010 for ThePEG by  doxygen 1.5.5