|
ThePEG
1.8.0
|
The DeletedBase and its templated Deleted sub-class defines an interface to a class derived from the InterfacedBase. More...
#include <Deleted.h>

Public Member Functions | |
| DeletedBase (string newName, string newDescription, string newClassName, const type_info &newTypeInfo) | |
| Standard constructor. More... | |
| virtual string | exec (InterfacedBase &ib, string action, string arguments) const |
| The general interface method overriding the one in InterfaceBase. More... | |
| virtual string | doxygenType () const |
| Return a string describing the type of interface to be included in the Doxygen documentation. | |
| virtual string | type () const |
| Return a code for the type of this interface. | |
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 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. | |
| 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. | |
| const string & | name () const |
| Return name. | |
| bool | operator== (const Named &other) const |
| Test for equality. | |
| bool | operator< (const Named &other) const |
| Lexicographical comparison. | |
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 Named & | operator= (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. | |
The DeletedBase and its templated Deleted sub-class defines an interface to a class derived from the InterfacedBase.
It should be used when an interface is removed to provide a user-friendly message indicating why it was removed and possibly which interface should be used instead.
For each deleted interface to be defined for a class T, exactly one static object of the Deleted<T> must be created and initialized as follows:
Deleted<T> delint(name, description);
Where name is an identifier std::string which should only contain letters [a-zA-z0-9_] and description is an arbitrary std::string
The Deleted class, as all other InterfaceBase classes are mainly used in the BaseRepository class.
|
inline |
Standard constructor.
| 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. |
Definition at line 62 of file Deleted.h.
References ThePEG::InterfaceBase::rank().
|
virtual |
The general interface method overriding the one in InterfaceBase.
For this class, an exception will be thrown with a message given by the description string provided in the constructor.
Implements ThePEG::InterfaceBase.
1.8.9.1