thepeg is hosted by Hepforge, IPPP Durham
ThePEG  2.1.5
ThePEG::ParameterTBase< string > Class Template Referenceabstract

This is a specialization of ParameterTBase for the string case. More...

#include <Parameter.h>

Inheritance diagram for ThePEG::ParameterTBase< string >:

Public Types

enum  FileType { NoFile, File, Directory }
 Enumerated variables to determine of a string parameter corresponds to a file or a directory. More...
 

Public Member Functions

 ParameterTBase (string newName, string newDescription, string newClassName, const type_info &newTypeInfo, bool depSafe, bool readonly)
 Standard constructor. More...
 
virtual ~ParameterTBase ()
 Destructor.
 
virtual string type () const
 Return a code for the type of this parameter.
 
void fileType ()
 Indicate that this parameter corresponds to a file.
 
void directoryType ()
 Indicate that this parameter corresponds to a directory.
 
void file (FileType t)
 Indicate if this parameter corresponds to a file or directory.
 
FileType file () const
 See if this parameter corresponds to a file or directory.
 
virtual void set (InterfacedBase &ib, string newValue) const
 Set the member variables of ib to val. More...
 
virtual void tset (InterfacedBase &ib, string) const =0
 Set the member variables of ib to val.
 
virtual string get (const InterfacedBase &ib) const
 Return the value of the member variable of ib. More...
 
virtual string tget (const InterfacedBase &ib) const =0
 Return the value of the member variable of ib.
 
virtual string minimum (const InterfacedBase &) const
 Return the minimum value allowed for the member variable of ib. More...
 
virtual string maximum (const InterfacedBase &) const
 Return the maximum value allowed for the member variable of ib. More...
 
virtual string def (const InterfacedBase &ib) const
 Return the default value for the member variables of ib. More...
 
virtual string tdef (const InterfacedBase &ib) const =0
 Return the default value for the member variables of ib.
 
virtual void setDef (InterfacedBase &i) const
 set the member variable of ib to its default value.
 
virtual string doxygenType () const
 Return a string describing the type of interface to be included in the Doxygen documentation.
 
- Public Member Functions inherited from ThePEG::ParameterBase
 ParameterBase (string newName, string newDescription, string newClassName, const type_info &newTypeInfo, bool depSafe, bool readonly, int limits)
 Standard constructor. More...
 
virtual ~ParameterBase ()
 The destructor.
 
virtual string exec (InterfacedBase &ib, string action, string arguments) const
 The general interface method overriding the one in InterfaceBase. More...
 
virtual string fullDescription (const InterfacedBase &ib) const
 Return a complete description of this parameter.
 
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.
 
- Public Member Functions inherited from ThePEG::InterfaceBase
 InterfaceBase (string newName, string newDescription, string newClassName, const type_info &newTypeInfo, bool depSafe, bool readonly)
 Standard constructor. More...
 
virtual ~InterfaceBase ()
 The destructor.
 
string tag (int pos=-1) const
 Create a tag for this interface using its name and optional poisitional argument.
 
virtual bool notDefault (InterfacedBase &) const
 Returns true if the setting for this interface has been changed from its default value.
 
map< string, string > & objectDefaults (InterfacedBase &) const
 Returns the map of objectDefaults of the given object.
 
virtual void rebind (InterfacedBase &, const TranslationMap &, const IVector &=IVector()) const
 Rebind all references in ib according to the translation map. More...
 
virtual IVector getReferences (const InterfacedBase &) const
 For derived classes interfacing references between Interfaced objects, return the references for this interface.
 
string description () const
 Return the description of this interface.
 
virtual void doxygenDescription (ostream &stream) const
 Print a description to be included in the Doxygen documentation to the given stream.
 
string className () const
 Return the class name for the class this interface is defined for.
 
bool dependencySafe () const
 Get the flag saying whether changing an object with this interface may change the state of a dependent object .
 
void setDependencySafe ()
 Set the flag saying whether changing an object with this interface may change the state of a dependent object .
 
void setDependencySensitive ()
 Set the flag saying whether changing an object with this interface may change the state of a dependent object .
 
bool readOnly () const
 Get the flag saying whether this interface is allowed to change an object.
 
void setReadOnly ()
 Set the flag saying that this interface is allowed to change an object.
 
void setReadWrite ()
 Unset the flag saying that this interface is allowed to change an object.
 
bool anonymous () const
 Return true if this interface is anonyous, ie. More...
 
double rank () const
 Get the rank for this interface. More...
 
void rank (double r)
 Set the rank for this interface. More...
 
void setHasDefault (bool b)
 Indicate that this interface has a default value.
 
- Public Member Functions inherited from ThePEG::Named
 Named (const string &newName=string())
 Constructor with name.
 
 Named (const Named &)=default
 Explicit default copy-constructor (too avoid compiler warnings)
 
const string & name () const
 Return name.
 
bool operator== (const Named &other) const
 Test for equality.
 
bool operator< (const Named &other) const
 Lexicographical comparison.
 

Private Attributes

FileType isFileType
 Indicates if this parameter corresponds to a file or directory.
 

Additional Inherited Members

- Static Public Attributes inherited from ThePEG::InterfaceBase
static bool NoReadOnly
 If set to true, all read-only interfaces can be changed.
 
- Protected Member Functions inherited from ThePEG::Named
const Namedoperator= (const Named &other)
 Assignment.
 
const string & name (const string &newName)
 Set new name.
 
- Protected Attributes inherited from ThePEG::InterfaceBase
bool hasDefault
 A flag indicating whether this interface has a default setting.
 
bool isDependencySafe
 The flag saying whether changing an object with this interface may change the state of a dependent object .
 
bool isReadOnly
 The flag saying whether this interface is allowed to change an object.
 

Detailed Description

template<>
class ThePEG::ParameterTBase< string >

This is a specialization of ParameterTBase for the string case.

See also
ParameterTBase

Definition at line 794 of file Parameter.h.

Member Enumeration Documentation

◆ FileType

Enumerated variables to determine of a string parameter corresponds to a file or a directory.

Enumerator
NoFile 

Neither file nor directory.

File 

The parameter corresponds to a file.

Directory 

The parameter corresponds to a directory.

Definition at line 802 of file Parameter.h.

Constructor & Destructor Documentation

◆ ParameterTBase()

ThePEG::ParameterTBase< string >::ParameterTBase ( string  newName,
string  newDescription,
string  newClassName,
const type_info &  newTypeInfo,
bool  depSafe,
bool  readonly 
)
inline

Standard constructor.

Parameters
newNamethe name of the interface, may only contain letters [a-zA-z0-9_].
newDescriptiona brief description of the interface.
newClassNamethe name of the corresponding class.
newTypeInfothe type_info object of the corresponding class.
depSafeset to true if calls to this interface for one object does not influence other objects.
readonlyif 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.

Definition at line 830 of file Parameter.h.

References ThePEG::InterfaceBase::hasDefault.

Member Function Documentation

◆ def()

virtual string ThePEG::ParameterTBase< string >::def ( const InterfacedBase ib) const
inlinevirtual

Return the default value for the member variables of ib.

Calls tdef(const InterfacedBase &) and converts the returned value with an ostringstream.

Implements ThePEG::ParameterBase.

Definition at line 929 of file Parameter.h.

◆ get()

virtual string ThePEG::ParameterTBase< string >::get ( const InterfacedBase ib) const
inlinevirtual

Return the value of the member variable of ib.

Calls tget(const InterfacedBase &) and converts the returned value with an ostringstream.

Implements ThePEG::ParameterBase.

Definition at line 897 of file Parameter.h.

◆ maximum()

virtual string ThePEG::ParameterTBase< string >::maximum ( const InterfacedBase ) const
inlinevirtual

Return the maximum value allowed for the member variable of ib.

Not relevant for strings. Returns the empty string.

Implements ThePEG::ParameterBase.

Definition at line 920 of file Parameter.h.

◆ minimum()

virtual string ThePEG::ParameterTBase< string >::minimum ( const InterfacedBase ) const
inlinevirtual

Return the minimum value allowed for the member variable of ib.

Not relevant for strings. Returns the empty string.

Implements ThePEG::ParameterBase.

Definition at line 912 of file Parameter.h.

◆ set()

virtual void ThePEG::ParameterTBase< string >::set ( InterfacedBase ib,
string  newValue 
) const
inlinevirtual

Set the member variables of ib to val.

Uses a stringstream to read the val into a Type object and then calls tset(InterfacedBase &, Type).

Implements ThePEG::ParameterBase.

Definition at line 881 of file Parameter.h.

References ThePEG::StringUtils::stripws().


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