ThePEG::ParameterBase Class Reference

The Parameter and its base classes ParameterTBase and ParameterBase defines an interface to a class derived from the InterfacedBase, through which simple member variables can be manuipulated. More...

#include <Parameter.h>

Inheritance diagram for ThePEG::ParameterBase:

ThePEG::InterfaceBase ThePEG::Named ThePEG::ParameterTBase< Type > ThePEG::ThePEG::ParameterTBase< string > ThePEG::Parameter< T, Type > ThePEG::ThePEG::Parameter< T, string >

List of all members.

Public Member Functions

 ParameterBase (string newName, string newDescription, string newClassName, const type_info &newTypeInfo, bool depSafe, bool readonly, int limits)
 Standard constructor.
virtual ~ParameterBase ()
 The destructor.
virtual string exec (InterfacedBase &ib, string action, string arguments) const
 The general interface method overriding the one in InterfaceBase.
virtual string fullDescription (const InterfacedBase &ib) const
 Return a complete description of this parameter.
virtual void set (InterfacedBase &ib, string) const =0
 Set the member variable of ib to val.
virtual string minimum (const InterfacedBase &ib) const =0
 Return the minimum value allowed for the member variable of ib.
virtual string maximum (const InterfacedBase &ib) const =0
 Return the maximum value allowed for the member variable of ib.
virtual string get (const InterfacedBase &ib) const =0
 Return the value of the member variable of ib.
virtual string def (const InterfacedBase &ib) const =0
 Return the default value for the member variable of ib.
virtual void setDef (InterfacedBase &ib) const =0
 Set the member variable of ib to its default value.
bool limited () const
 True if there the variable is limited from above and below.
bool upperLimit () const
 True if there the variable is limited from abovew.
bool lowerLimit () const
 True if there the variable is limited from below.
void setLimited ()
 Set flag indicating that there are limits associated with the variable.
void setUnlimited ()
 Set flag indicating that there are no limits associated with the variable.

Private Attributes

int limit
 Determines if the values of the parameters are limited from above and/or below.


Detailed Description

The Parameter and its base classes ParameterTBase and ParameterBase defines an interface to a class derived from the InterfacedBase, through which simple member variables can be manuipulated.

Parameter is templated on the type of the member variable and the type of the InterfacedBase class, and is derived from the InterfaceBase class via ParameterTBase (which is templated only on the type of the member variable) and ParameterBase.

For each InterfacedBase class exactly one static Parameter object should created for each member variable which should be interfaced. This object will automatically register itself with the BaseRepository class.

See also:
InterfacedBase

InterfaceBase

Definition at line 64 of file Parameter.h.


Constructor & Destructor Documentation

ThePEG::ParameterBase::ParameterBase ( string  newName,
string  newDescription,
string  newClassName,
const type_info &  newTypeInfo,
bool  depSafe,
bool  readonly,
int  limits 
) [inline]

Standard constructor.

Parameters:
newName the name of the interface, may only contain letters [a-zA-z0-9_].
newDescription a brief description of the interface.
newClassName the name of the corresponding class.
newTypeInfo the type_info object of the corresponding class.
depSafe set to true if calls to this interface for one object does not influence other objects.
readonly if this is set true the interface will not be able to manipulate objects of the corresponding class, but will still be able to access information.
limits determines if the values of the parameters are limited from above and/or below. The possible values are given by Interface::Limits.

Definition at line 92 of file Parameter.h.


Member Function Documentation

virtual string ThePEG::ParameterBase::exec ( InterfacedBase ib,
string  action,
string  arguments 
) const [virtual]

The general interface method overriding the one in InterfaceBase.

For this class, action can be any of "set", "get", "min", "max", "def" and "setdef" and argument should be a something which can be read into a variable through a stringstream with the standard '>>' operator.

Implements ThePEG::InterfaceBase.


Member Data Documentation

Determines if the values of the parameters are limited from above and/or below.

The possible values are given by Interface::Limits.

Definition at line 194 of file Parameter.h.

Referenced by limited(), lowerLimit(), setLimited(), setUnlimited(), and upperLimit().


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

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