thepeg is hosted by Hepforge, IPPP Durham
ThePEG 2.3.0
ThePEG::RefInterfaceBase Class Reference

RefInterfaceBase is an abstract base class inheriting from InterfaceBase used for subclasses dealing with interfaces to do with references in one Interfaced object to another. More...

#include <InterfaceBase.h>

Inheritance diagram for ThePEG::RefInterfaceBase:

Public Member Functions

 RefInterfaceBase (string newName, string newDescription, string newClassName, const type_info &newTypeInfo, string newRefClassName, const type_info &newRefTypeInfo, bool depSafe, bool readonly, bool norebind, bool nullable, bool defnull)
 Standard constructor.
 
string refClassName () const
 Return the class name of the class referred to by this interface.
 
const type_info & refTypeInfo () const
 Return the type_info object of the class referred to by this interface.
 
bool noRebind () const
 Get the flag saying whether the interface is responsible for rebinding of the corresponding refenerces.
 
void setNoRebind ()
 Set the flag saying that the interface is not responsible for rebinding refenerces.
 
void setRebind ()
 Set the flag saying that the interface is responsible for rebinding refenerces.
 
bool noNull () const
 Get the flag saying whether the interface is allowed to set the reference to null.
 
void setNullable ()
 Set the flag saying that the interface it is allowed to set the reference to null.
 
void setNotNullable ()
 Set the flag saying that the interface it is not allowed to set the reference to null.
 
bool defaultIfNull () const
 Get the flag saying wether a null pointer should be replaced by a default of suitable class when rebind is called.
 
void setDefaultIfNull ()
 Set the flag saying that a null pointer should be replaced by a default of suitable class when rebind is called.
 
void setNoDefaultIfNull ()
 Set the flag saying that a null pointer should not be replaced by a default of suitable class when rebind is called.
 
- Public Member Functions inherited from ThePEG::InterfaceBase
 InterfaceBase (string newName, string newDescription, string newClassName, const type_info &newTypeInfo, bool depSafe, bool readonly)
 Standard constructor.
 
virtual ~InterfaceBase ()
 The destructor.
 
string tag (int pos=-1) const
 Create a tag for this interface using its name and optional poisitional argument.
 
virtual string exec (InterfacedBase &ib, string action, string arguments) const =0
 Manipulate an object of the corresponding class.
 
virtual string type () const =0
 Return a code for the type of this interface.
 
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.
 
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 string fullDescription (const InterfacedBase &ib) const
 Return a complete description of this interface.
 
virtual void doxygenDescription (ostream &stream) const
 Print a description to be included in the Doxygen documentation to the given stream.
 
virtual string doxygenType () const =0
 Return a string describing the type of interface to be included in the Doxygen documentation.
 
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.
 
double rank () const
 Get the rank for this interface.
 
void rank (double r)
 Set the rank for this interface.
 
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

string theRefClassName
 The class name of the class referred to by this interface.
 
const type_info & theRefTypeInfo
 The type_info object of the class referred to by this interface.
 
bool dontRebind
 The flag saying whether the interface is responsible for rebinding refenerces.
 
bool isNullable
 The flag saying whether the interface is allowed to set a reference to null.
 
bool theDefaultIfNull
 The flag saying wether a null pointer should be replaced by a default of suitable class when rebind is called.
 

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

RefInterfaceBase is an abstract base class inheriting from InterfaceBase used for subclasses dealing with interfaces to do with references in one Interfaced object to another.

Definition at line 280 of file InterfaceBase.h.

Constructor & Destructor Documentation

◆ RefInterfaceBase()

ThePEG::RefInterfaceBase::RefInterfaceBase ( string  newName,
string  newDescription,
string  newClassName,
const type_info &  newTypeInfo,
string  newRefClassName,
const type_info &  newRefTypeInfo,
bool  depSafe,
bool  readonly,
bool  norebind,
bool  nullable,
bool  defnull 
)

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.
newRefClassNamethe name of the class referred to by the corresponding class..
newRefTypeInfothe type_info object of the class referred to by 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.
norebindif set to true, this interface is not responsible for the rebinding of corresponding objects.
nullableif set to true this corresponding references may be null.
defnullif set to true and a corresponding reference is null it may be given a a default value in the initialization of an EventGenerator.

Member Function Documentation

◆ defaultIfNull()

bool ThePEG::RefInterfaceBase::defaultIfNull ( ) const
inline

Get the flag saying wether a null pointer should be replaced by a default of suitable class when rebind is called.

Definition at line 379 of file InterfaceBase.h.

References theDefaultIfNull.

◆ noNull()

bool ThePEG::RefInterfaceBase::noNull ( ) const
inline

Get the flag saying whether the interface is allowed to set the reference to null.

Definition at line 361 of file InterfaceBase.h.

References isNullable.

◆ noRebind()

bool ThePEG::RefInterfaceBase::noRebind ( ) const
inline

Get the flag saying whether the interface is responsible for rebinding of the corresponding refenerces.

Definition at line 343 of file InterfaceBase.h.

References dontRebind.

◆ refClassName()

string ThePEG::RefInterfaceBase::refClassName ( ) const
inline

Return the class name of the class referred to by this interface.

Definition at line 331 of file InterfaceBase.h.

References theRefClassName.

◆ refTypeInfo()

const type_info & ThePEG::RefInterfaceBase::refTypeInfo ( ) const
inline

Return the type_info object of the class referred to by this interface.

Definition at line 337 of file InterfaceBase.h.

References theRefTypeInfo.

◆ setDefaultIfNull()

void ThePEG::RefInterfaceBase::setDefaultIfNull ( )
inline

Set the flag saying that a null pointer should be replaced by a default of suitable class when rebind is called.

Definition at line 385 of file InterfaceBase.h.

References theDefaultIfNull.

◆ setNoDefaultIfNull()

void ThePEG::RefInterfaceBase::setNoDefaultIfNull ( )
inline

Set the flag saying that a null pointer should not be replaced by a default of suitable class when rebind is called.

Definition at line 391 of file InterfaceBase.h.

References theDefaultIfNull.

◆ setNoRebind()

void ThePEG::RefInterfaceBase::setNoRebind ( )
inline

Set the flag saying that the interface is not responsible for rebinding refenerces.

Definition at line 349 of file InterfaceBase.h.

References dontRebind.

◆ setNotNullable()

void ThePEG::RefInterfaceBase::setNotNullable ( )
inline

Set the flag saying that the interface it is not allowed to set the reference to null.

Definition at line 373 of file InterfaceBase.h.

References isNullable.

◆ setNullable()

void ThePEG::RefInterfaceBase::setNullable ( )
inline

Set the flag saying that the interface it is allowed to set the reference to null.

Definition at line 367 of file InterfaceBase.h.

References isNullable.

◆ setRebind()

void ThePEG::RefInterfaceBase::setRebind ( )
inline

Set the flag saying that the interface is responsible for rebinding refenerces.

Definition at line 355 of file InterfaceBase.h.

References dontRebind.

Member Data Documentation

◆ dontRebind

bool ThePEG::RefInterfaceBase::dontRebind
private

The flag saying whether the interface is responsible for rebinding refenerces.

Definition at line 410 of file InterfaceBase.h.

Referenced by noRebind(), setNoRebind(), and setRebind().

◆ isNullable

bool ThePEG::RefInterfaceBase::isNullable
private

The flag saying whether the interface is allowed to set a reference to null.

Definition at line 416 of file InterfaceBase.h.

Referenced by noNull(), setNotNullable(), and setNullable().

◆ theDefaultIfNull

bool ThePEG::RefInterfaceBase::theDefaultIfNull
private

The flag saying wether a null pointer should be replaced by a default of suitable class when rebind is called.

Definition at line 422 of file InterfaceBase.h.

Referenced by defaultIfNull(), setDefaultIfNull(), and setNoDefaultIfNull().

◆ theRefClassName

string ThePEG::RefInterfaceBase::theRefClassName
private

The class name of the class referred to by this interface.

Definition at line 399 of file InterfaceBase.h.

Referenced by refClassName().

◆ theRefTypeInfo

const type_info& ThePEG::RefInterfaceBase::theRefTypeInfo
private

The type_info object of the class referred to by this interface.

Definition at line 404 of file InterfaceBase.h.

Referenced by refTypeInfo().


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