| | |
The Prop class is the abstract base class for a number of specialized properties. More...
| Header: | #include <Prop.hpp> |
| Inherited By: | MsXpS::libXpertMassCore::ChemicalGroupProp, MsXpS::libXpertMassCore::DoubleProp, MsXpS::libXpertMassCore::IntProp, MsXpS::libXpertMassCore::NoDeletePointerProp, and MsXpS::libXpertMassCore::StringProp |
| Prop() | |
| Prop(const QString &name) | |
| Prop(const MsXpS::libXpertMassCore::Prop &other) | |
| virtual | ~Prop() |
| virtual void * | data() const |
| virtual void | deleteData() |
| virtual QString | formatXmlElement(int offset, const QString &indent = Utils::xmlIndentationToken) |
| const QString & | name() |
| virtual bool | renderXmlElement(const QDomElement &element, int version = 1) |
| void | setData(void *data) |
| void | setName(QString &name) |
| virtual MsXpS::libXpertMassCore::Prop & | operator=(const MsXpS::libXpertMassCore::Prop &other) |
Properties are libXpertMassCore' way of extending the capabilities of objects. A property is merely an encapsulation of:
In order to perform tasks in the derived classes using dynamic binding, virtual functions are available to derived classes to perform:
Derived classes should be named according the following scheme: XxxYyyZzzzProp, like StringProp or MonomerProp.
The classes that benefit from this Property-based extension mechanism all derive from PropListHolder.
See also StringProp and PropListHolder.
Constructs a Prop instance.
Constructs a Prop instance with name.
Constructs a Prop instance as a copy of other.
Note: The data are not duplicated.
[virtual noexcept] Prop::~Prop()Destructs this Prop instance.
Note: No action is taken here.
[virtual] void *Prop::data() constReturns the data.
See also setData().
[virtual] void Prop::deleteData()Deletes the data.
Nothing is done in this implementation.
[virtual] QString Prop::formatXmlElement(int offset, const QString &indent = Utils::xmlIndentationToken)Formats and returns a string representing this Prop instance.
The formatting of the XML element is performed using offset and indent.
Nothing is done in this implementation. Returns an empty string.
Returns the name.
See also setName().
[virtual] bool Prop::renderXmlElement(const QDomElement &element, int version = 1)Renders the element, with the specified version.
Nothing is done in this implementation and this function returns false.
Sets the data.
If mpa_data is non-nullptr, deleteData() is called before assigning data to mpa_data.
Ownership passes to this Prop instance.
See also data().
Sets the name.
See also name().
[virtual] MsXpS::libXpertMassCore::Prop &Prop::operator=(const MsXpS::libXpertMassCore::Prop &other)Assigns other to this Prop instance.
The data are not duplicated because their type is not known.
This variable holds the name of the property. Initialized to "NOT_SET".
This variable holds the allocated data belonging to this Prop instance. Initialized to nullptr.