umbrello 2.39.0
Umbrello UML Modeller is a Unified Modelling Language (UML) diagram program based on KDE Technology
|
Sets up instanceattribute information. More...
#include <instanceattribute.h>
Protected Member Functions | |
virtual bool | load1 (QDomElement &element) |
![]() | |
void | init () |
void | maybeSignalObjectCreated () |
void | save1end (QXmlStreamWriter &writer) |
Private Member Functions | |
void | init () |
UMLInstanceAttribute::init Initialize members of this class. | |
Private Attributes | |
QString | m_value |
Sets up instanceattribute information.
This class is used to set up information for an instanceattribute. It has a pointer to the attribute which it represents and a value. Member UMLObject::m_pSecondary is used for storing the pointer to the UMLAttribute. Member m_value is used for storing the value. If the value is empty but the associated UMLAttribute has a non empty initial value then the attribute initial value is copied to m_value. A UMLInstanceAttribute is strictly slaved to its corresponding UMLClassifier attribute. This means that a UMLInstanceAttribute is not created or removed by the user; instead, it is created or removed automatically when the UMLClassifier attribute is created or removed.
UMLInstanceAttribute::UMLInstanceAttribute | ( | UMLInstance * | parent, |
UMLAttribute * | umlAttr, | ||
const QString & | value = QString() ) |
Constructor
parent | The UMLInstance to which this instance attribute belongs. |
umlAttr | The UMLAttribute which this instance attribute reifies. It is expected that umlAttr be a non null pointer. If umlAttr is passed in as nullptr then the setAttribute method shall be used for setting a non null pointer before the instance attribute is used by the application. |
value | The value of the instance attribute. |
UMLAttribute * UMLInstanceAttribute::getAttribute | ( | ) | const |
Returns the UMLInstanceAttribute's UML attribute.
QString UMLInstanceAttribute::getValue | ( | ) | const |
Returns the UMLInstanceAttribute's value.
|
private |
UMLInstanceAttribute::init Initialize members of this class.
|
protectedvirtual |
Loads the UMLInstance "slot" XMI element.
Reimplemented from UMLObject.
|
virtual |
Creates the <UML:InstanceAttribute> XMI element.
Reimplemented from UMLObject.
void UMLInstanceAttribute::setAttribute | ( | UMLAttribute * | umlAttr | ) |
Sets the UMLInstanceAttribute's UML attribute.
umlAttr | Non null pointer to UMLAttribute. |
void UMLInstanceAttribute::setValue | ( | const QString & | value | ) |
Sets the UMLInstanceAttribute's value.
value | The value to set. |
|
virtual |
Display the properties configuration dialog for the instanceattribute.
Reimplemented from UMLObject.
QString UMLInstanceAttribute::toString | ( | ) | const |
Returns the textual notation for instance attribute.
|
private |