umbrello: UMLObject Class Reference

umbrello 2.35.1 Umbrello UML Modeller is a Unified Modelling Language (UML) diagram program based on KDE Technology

Public Types | Public Slots | Signals | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | Friends | List of all members
UMLObject Class Reference

The base class for UML objects. More...

`#include <umlobject.h>`

Inheritance diagram for UMLObject:

## Public Types
enum | ObjectType { ot_Unknown = -1 , ot_UMLObject = 100 , ot_Actor , ot_UseCase , ot_Package , ot_Interface , ot_Datatype , ot_Enum , ot_Class , ot_Instance , ot_Association , ot_Attribute , ot_Operation , ot_EnumLiteral , ot_Template , ot_Component , ot_Artifact , ot_Node , ot_Stereotype , ot_Role , ot_Entity , ot_EntityAttribute , ot_Folder , ot_EntityConstraint , ot_UniqueConstraint , ot_ForeignKeyConstraint , ot_CheckConstraint , ot_Category , ot_Port , ot_InstanceAttribute , ot_SubSystem }

## Public Slots
void | emitModified ()

## Signals
void | modified ()

## Public Member Functions
| UMLObject (const UMLObject &other)
| UMLObject (UMLObject *parent, const QString &name, Uml::ID::Type id=Uml::ID::None)
| UMLObject (UMLObject *parent)
| UMLObject (const QString &name=QString(), Uml::ID::Type id=Uml::ID::None)
virtual | ~UMLObject ()
bool | operator== (const UMLObject &rhs) const
virtual void | copyInto (UMLObject *lhs) const
virtual UMLObject * | clone () const
virtual void | setBaseType (ObjectType ot)
ObjectType | baseType () const
QLatin1String | baseTypeStr () const
virtual void | setID (Uml::ID::Type NewID)
virtual Uml::ID::Type | id () const
QString | doc () const
bool | hasDoc () const
void | setDoc (const QString &d)
void | setVisibility (Uml::Visibility::Enum visibility)
void | setVisibilityCmd (Uml::Visibility::Enum visibility)
Uml::Visibility::Enum | visibility () const
void | setStereotype (const QString &_name)
void | setStereotypeCmd (const QString &_name)
QString | stereotype (bool includeAdornments=false) const
void | setUMLStereotype (UMLStereotype *stereo)
UMLStereotype * | umlStereotype () const
QStringList & | tags ()
QString | package (const QString &separator=QString(), bool includeRoot=false) const
UMLPackageList | packages (bool includeRoot=false) const
bool | setUMLPackage (UMLPackage *pPkg)
UMLPackage * | umlPackage () const
void | setUMLParent (UMLObject *parent)
UMLObject * | umlParent () const
virtual void | setName (const QString &strName)
virtual void | setNameCmd (const QString &strName)
QString | name () const
virtual QString | fullyQualifiedName (const QString &separator=QString(), bool includeRoot=false) const
void | setAbstract (bool bAbstract)
bool | isAbstract () const
virtual bool | showPropertiesDialog (QWidget *parent=0)
virtual bool | resolveRef ()
virtual void | saveToXMI (QXmlStreamWriter &writer)
virtual bool | loadFromXMI (QDomElement &element)
bool | loadStereotype (QDomElement &element)
void | setStatic (bool bStatic)
bool | isStatic () const
virtual bool | acceptAssociationType (Uml::AssociationType::Enum) const
void | setSecondaryId (const QString &id)
QString | secondaryId () const
void | setSecondaryFallback (const QString &id)
QString | secondaryFallback () const
void | save1 (QXmlStreamWriter &writer, const QString &type, const QString &tag=QString())
bool | isUMLActor () const
bool | isUMLArtifact () const
bool | isUMLAssociation () const
bool | isUMLAttribute () const
bool | isUMLCategory () const
bool | isUMLCheckConstraint () const
bool | isUMLClassifier () const
bool | isUMLComponent () const
bool | isUMLDatatype () const
bool | isUMLEntity () const
bool | isUMLEntityAttribute () const
bool | isUMLEntityConstraint () const
bool | isUMLEnum () const
bool | isUMLEnumLiteral () const
bool | isUMLFolder () const
bool | isUMLForeignKeyConstraint () const
bool | isUMLInstance () const
bool | isUMLInstanceAttribute () const
bool | isUMLNode () const
bool | isUMLObject () const
bool | isUMLOperation () const
bool | isUMLPackage () const
bool | isUMLPort () const
bool | isUMLRole () const
bool | isUMLStereotype () const
bool | isUMLTemplate () const
bool | isUMLUniqueConstraint () const
bool | isUMLUseCase () const
UMLActor * | asUMLActor ()
UMLArtifact * | asUMLArtifact ()
UMLAssociation * | asUMLAssociation ()
UMLAttribute * | asUMLAttribute ()
UMLCanvasObject * | asUMLCanvasObject ()
UMLCategory * | asUMLCategory ()
UMLCheckConstraint * | asUMLCheckConstraint ()
UMLClassifier * | asUMLClassifier ()
UMLClassifierListItem * | asUMLClassifierListItem ()
UMLClassifierSet * | asUMLClassifierSet ()
UMLComponent * | asUMLComponent ()
UMLDatatype * | asUMLDatatype ()
UMLEntity * | asUMLEntity ()
UMLEntityAttribute * | asUMLEntityAttribute ()
UMLEntityConstraint * | asUMLEntityConstraint ()
UMLEnum * | asUMLEnum ()
UMLEnumLiteral * | asUMLEnumLiteral ()
UMLFolder * | asUMLFolder ()
UMLForeignKeyConstraint * | asUMLForeignKeyConstraint ()
UMLInstance * | asUMLInstance ()
UMLInstanceAttribute * | asUMLInstanceAttribute ()
UMLNode * | asUMLNode ()
UMLObject * | asUMLObject ()
UMLOperation * | asUMLOperation ()
UMLPackage * | asUMLPackage ()
UMLPort * | asUMLPort ()
UMLRole * | asUMLRole ()
UMLStereotype * | asUMLStereotype ()
UMLTemplate * | asUMLTemplate ()
UMLUniqueConstraint * | asUMLUniqueConstraint ()
UMLUseCase * | asUMLUseCase ()
const UMLActor * | asUMLActor () const
const UMLArtifact * | asUMLArtifact () const
const UMLAssociation * | asUMLAssociation () const
const UMLAttribute * | asUMLAttribute () const
const UMLCanvasObject * | asUMLCanvasObject () const
const UMLCategory * | asUMLCategory () const
const UMLCheckConstraint * | asUMLCheckConstraint () const
const UMLClassifier * | asUMLClassifier () const
const UMLClassifierListItem * | asUMLClassifierListItem () const
const UMLClassifierSet * | asUMLClassifierSet () const
const UMLComponent * | asUMLComponent () const
const UMLDatatype * | asUMLDatatype () const
const UMLEntity * | asUMLEntity () const
const UMLEntityAttribute * | asUMLEntityAttribute () const
const UMLEntityConstraint * | asUMLEntityConstraint () const
const UMLEnum * | asUMLEnum () const
const UMLEnumLiteral * | asUMLEnumLiteral () const
const UMLFolder * | asUMLFolder () const
const UMLForeignKeyConstraint * | asUMLForeignKeyConstraint () const
const UMLInstance * | asUMLInstance () const
const UMLInstanceAttribute * | asUMLInstanceAttribute () const
const UMLNode * | asUMLNode () const
const UMLObject * | asUMLObject () const
const UMLOperation * | asUMLOperation () const
const UMLPackage * | asUMLPackage () const
const UMLPort * | asUMLPort () const
const UMLRole * | asUMLRole () const
const UMLStereotype * | asUMLStereotype () const
const UMLTemplate * | asUMLTemplate () const
const UMLUniqueConstraint * | asUMLUniqueConstraint () const
const UMLUseCase * | asUMLUseCase () const

## Static Public Member Functions
static QString | toString (ObjectType ot)
static QString | toI18nString (ObjectType t)
static Icon_Utils::IconType | toIcon (ObjectType t)

## Protected Member Functions
void | init ()
void | maybeSignalObjectCreated ()
void | save1end (QXmlStreamWriter &writer)
virtual bool | load1 (QDomElement &element)

## Protected Attributes
Uml::ID::Type | m_nId
| object's id More...
QString | m_Doc
| object's documentation More...
QPointer< UMLStereotype > | m_pStereotype
| stereotype of the object if applicable More...
QString | m_name
| objects name More...
ObjectType | m_BaseType
| objects type More...
Uml::Visibility::Enum | m_visibility
| objects visibility More...
bool | m_bAbstract
| state of whether the object is abstract or not More...
bool | m_bStatic
| flag for instance scope More...
bool | m_bCreationWasSignalled
| auxiliary to maybeSignalObjectCreated() More...
QPointer< UMLObject > | m_pSecondary
QString | m_SecondaryId
QString | m_SecondaryFallback
QStringList | m_TaggedValues
UMLObjectPrivate * | m_d
| private data More...

## Friends
class | ObjectsModel
QDebug | operator<< (QDebug out, const UMLObject &obj)

## Detailed Description

The base class for UML objects.

This class is the non-graphical version of UMLWidget. These are created and maintained in the class UMLDoc. This class holds all the generic information needed for all UML objects.

clone needs to be implemented by each child class.

saveToXMI saves the XMI attributes of each specific model class. It needs to be implemented by each child class. For creating the XMI element and saving the common XMI parts, it can use the save1() method.

Author
  Paul Hensgen phens.nosp@m.gen@.nosp@m.techi.nosp@m.e.co.nosp@m.m Bugs and comments to umbre.nosp@m.llo-.nosp@m.devel.nosp@m.@kde.nosp@m..org or https://bugs.kde.org

## Member Enumeration Documentation

## ◆ ObjectType

enum UMLObject::ObjectType

Enumerator
ot_Unknown |
ot_UMLObject |
ot_Actor |
ot_UseCase |
ot_Package |
ot_Interface |
ot_Datatype |
ot_Enum |
ot_Class |
ot_Instance |
ot_Association |
ot_Attribute |
ot_Operation |
ot_EnumLiteral |
ot_Template |
ot_Component |
ot_Artifact |
ot_Node |
ot_Stereotype |
ot_Role |
ot_Entity |
ot_EntityAttribute |
ot_Folder |
ot_EntityConstraint |
ot_UniqueConstraint |
ot_ForeignKeyConstraint |
ot_CheckConstraint |
ot_Category |
ot_Port |
ot_InstanceAttribute |
ot_SubSystem | no real object type

## Constructor & Destructor Documentation

## ◆ UMLObject() [1/4]

UMLObject::UMLObject | ( | const UMLObject & | other | ) |
| explicit

Creates a UMLObject.

Parameters

  other | object to created from

## ◆ UMLObject() [2/4]

UMLObject::UMLObject | ( | UMLObject * | parent,
|  | const QString & | name,
|  | Uml::ID::Type | id = `Uml::ID::None`
| ) |  |
| explicit

Creates a UMLObject.

Parameters

  parent | The parent of the object.
  name | The name of the object.
  id | The ID of the object (optional.) If omitted then a new ID will be assigned internally.

## ◆ UMLObject() [3/4]

UMLObject::UMLObject | ( | UMLObject * | parent | ) |
| explicit

Creates a UMLObject.

Parameters

  parent | The parent of the object.

## ◆ UMLObject() [4/4]

UMLObject::UMLObject | ( | const QString & | name = `QString()`,
|  | Uml::ID::Type | id = `Uml::ID::None`
| ) |  |
| explicit

Creates a UMLObject.

Parameters

  name | The name of the object.
  id | The ID of the object (optional.) If omitted then a new ID will be assigned internally.

## ◆ ~UMLObject()

UMLObject::~UMLObject | ( |  | ) |
| virtual

Standard destructor.

## Member Function Documentation

## ◆ acceptAssociationType()

bool UMLObject::acceptAssociationType | ( | Uml::AssociationType::Enum | type | ) | const
| virtual

This should be reimplemented by subclasses if they wish to accept certain types of associations. Note that this only tells if this UMLObject can accept the association type. When creating an association another check is made to see if the association is valid. For example a UMLClass (UMLClassifier) can accept generalizations and should return true. If while creating a generalization the superclass is already subclassed from this, the association is not valid and will not be created. The default accepts nothing (returns false)

Reimplemented in UMLClassifier.

## ◆ asUMLActor() [1/2]

UMLActor * UMLObject::asUMLActor | ( |  | ) |

## ◆ asUMLActor() [2/2]

const UMLActor * UMLObject::asUMLActor | ( |  | ) | const

## ◆ asUMLArtifact() [1/2]

UMLArtifact * UMLObject::asUMLArtifact | ( |  | ) |

## ◆ asUMLArtifact() [2/2]

const UMLArtifact * UMLObject::asUMLArtifact | ( |  | ) | const

## ◆ asUMLAssociation() [1/2]

UMLAssociation * UMLObject::asUMLAssociation | ( |  | ) |

## ◆ asUMLAssociation() [2/2]

const UMLAssociation * UMLObject::asUMLAssociation | ( |  | ) | const

## ◆ asUMLAttribute() [1/2]

UMLAttribute * UMLObject::asUMLAttribute | ( |  | ) |

## ◆ asUMLAttribute() [2/2]

const UMLAttribute * UMLObject::asUMLAttribute | ( |  | ) | const

## ◆ asUMLCanvasObject() [1/2]

UMLCanvasObject * UMLObject::asUMLCanvasObject | ( |  | ) |

## ◆ asUMLCanvasObject() [2/2]

const UMLCanvasObject * UMLObject::asUMLCanvasObject | ( |  | ) | const

## ◆ asUMLCategory() [1/2]

UMLCategory * UMLObject::asUMLCategory | ( |  | ) |

## ◆ asUMLCategory() [2/2]

const UMLCategory * UMLObject::asUMLCategory | ( |  | ) | const

## ◆ asUMLCheckConstraint() [1/2]

UMLCheckConstraint * UMLObject::asUMLCheckConstraint | ( |  | ) |

## ◆ asUMLCheckConstraint() [2/2]

const UMLCheckConstraint * UMLObject::asUMLCheckConstraint | ( |  | ) | const

## ◆ asUMLClassifier() [1/2]

UMLClassifier * UMLObject::asUMLClassifier | ( |  | ) |

## ◆ asUMLClassifier() [2/2]

const UMLClassifier * UMLObject::asUMLClassifier | ( |  | ) | const

## ◆ asUMLClassifierListItem() [1/2]

UMLClassifierListItem * UMLObject::asUMLClassifierListItem | ( |  | ) |

## ◆ asUMLClassifierListItem() [2/2]

const UMLClassifierListItem * UMLObject::asUMLClassifierListItem | ( |  | ) | const

## ◆ asUMLClassifierSet() [1/2]

UMLClassifierSet * UMLObject::asUMLClassifierSet | ( |  | ) |

## ◆ asUMLClassifierSet() [2/2]

const UMLClassifierSet * UMLObject::asUMLClassifierSet | ( |  | ) | const

## ◆ asUMLComponent() [1/2]

UMLComponent * UMLObject::asUMLComponent | ( |  | ) |

## ◆ asUMLComponent() [2/2]

const UMLComponent * UMLObject::asUMLComponent | ( |  | ) | const

## ◆ asUMLDatatype() [1/2]

UMLDatatype * UMLObject::asUMLDatatype | ( |  | ) |

## ◆ asUMLDatatype() [2/2]

const UMLDatatype * UMLObject::asUMLDatatype | ( |  | ) | const

## ◆ asUMLEntity() [1/2]

UMLEntity * UMLObject::asUMLEntity | ( |  | ) |

## ◆ asUMLEntity() [2/2]

const UMLEntity * UMLObject::asUMLEntity | ( |  | ) | const

## ◆ asUMLEntityAttribute() [1/2]

UMLEntityAttribute * UMLObject::asUMLEntityAttribute | ( |  | ) |

## ◆ asUMLEntityAttribute() [2/2]

const UMLEntityAttribute * UMLObject::asUMLEntityAttribute | ( |  | ) | const

## ◆ asUMLEntityConstraint() [1/2]

UMLEntityConstraint * UMLObject::asUMLEntityConstraint | ( |  | ) |

## ◆ asUMLEntityConstraint() [2/2]

const UMLEntityConstraint * UMLObject::asUMLEntityConstraint | ( |  | ) | const

## ◆ asUMLEnum() [1/2]

UMLEnum * UMLObject::asUMLEnum | ( |  | ) |

## ◆ asUMLEnum() [2/2]

const UMLEnum * UMLObject::asUMLEnum | ( |  | ) | const

## ◆ asUMLEnumLiteral() [1/2]

UMLEnumLiteral * UMLObject::asUMLEnumLiteral | ( |  | ) |

## ◆ asUMLEnumLiteral() [2/2]

const UMLEnumLiteral * UMLObject::asUMLEnumLiteral | ( |  | ) | const

## ◆ asUMLFolder() [1/2]

UMLFolder * UMLObject::asUMLFolder | ( |  | ) |

## ◆ asUMLFolder() [2/2]

const UMLFolder * UMLObject::asUMLFolder | ( |  | ) | const

## ◆ asUMLForeignKeyConstraint() [1/2]

UMLForeignKeyConstraint * UMLObject::asUMLForeignKeyConstraint | ( |  | ) |

## ◆ asUMLForeignKeyConstraint() [2/2]

const UMLForeignKeyConstraint * UMLObject::asUMLForeignKeyConstraint | ( |  | ) | const

## ◆ asUMLInstance() [1/2]

UMLInstance * UMLObject::asUMLInstance | ( |  | ) |

## ◆ asUMLInstance() [2/2]

const UMLInstance * UMLObject::asUMLInstance | ( |  | ) | const

## ◆ asUMLInstanceAttribute() [1/2]

UMLInstanceAttribute * UMLObject::asUMLInstanceAttribute | ( |  | ) |

## ◆ asUMLInstanceAttribute() [2/2]

const UMLInstanceAttribute * UMLObject::asUMLInstanceAttribute | ( |  | ) | const

## ◆ asUMLNode() [1/2]

UMLNode * UMLObject::asUMLNode | ( |  | ) |

## ◆ asUMLNode() [2/2]

const UMLNode * UMLObject::asUMLNode | ( |  | ) | const

## ◆ asUMLObject() [1/2]

UMLObject * UMLObject::asUMLObject | ( |  | ) |

## ◆ asUMLObject() [2/2]

const UMLObject * UMLObject::asUMLObject | ( |  | ) | const

## ◆ asUMLOperation() [1/2]

UMLOperation * UMLObject::asUMLOperation | ( |  | ) |

## ◆ asUMLOperation() [2/2]

const UMLOperation * UMLObject::asUMLOperation | ( |  | ) | const

## ◆ asUMLPackage() [1/2]

UMLPackage * UMLObject::asUMLPackage | ( |  | ) |

## ◆ asUMLPackage() [2/2]

const UMLPackage * UMLObject::asUMLPackage | ( |  | ) | const

## ◆ asUMLPort() [1/2]

UMLPort * UMLObject::asUMLPort | ( |  | ) |

## ◆ asUMLPort() [2/2]

const UMLPort * UMLObject::asUMLPort | ( |  | ) | const

## ◆ asUMLRole() [1/2]

UMLRole * UMLObject::asUMLRole | ( |  | ) |

## ◆ asUMLRole() [2/2]

const UMLRole * UMLObject::asUMLRole | ( |  | ) | const

## ◆ asUMLStereotype() [1/2]

UMLStereotype * UMLObject::asUMLStereotype | ( |  | ) |

## ◆ asUMLStereotype() [2/2]

const UMLStereotype * UMLObject::asUMLStereotype | ( |  | ) | const

## ◆ asUMLTemplate() [1/2]

UMLTemplate * UMLObject::asUMLTemplate | ( |  | ) |

## ◆ asUMLTemplate() [2/2]

const UMLTemplate * UMLObject::asUMLTemplate | ( |  | ) | const

## ◆ asUMLUniqueConstraint() [1/2]

UMLUniqueConstraint * UMLObject::asUMLUniqueConstraint | ( |  | ) |

## ◆ asUMLUniqueConstraint() [2/2]

const UMLUniqueConstraint * UMLObject::asUMLUniqueConstraint | ( |  | ) | const

## ◆ asUMLUseCase() [1/2]

UMLUseCase * UMLObject::asUMLUseCase | ( |  | ) |

## ◆ asUMLUseCase() [2/2]

const UMLUseCase * UMLObject::asUMLUseCase | ( |  | ) | const

## ◆ baseType()

UMLObject::ObjectType UMLObject::baseType | ( |  | ) | const

Returns the type of the object.

Returns
  Returns the type of the object.

## ◆ baseTypeStr()

QLatin1String UMLObject::baseTypeStr | ( |  | ) | const

Returns
  The type used for rtti as string.

## ◆ clone()

UMLObject * UMLObject::clone | ( |  | ) | const
| virtual

Reimplemented in UMLActor, UMLArtifact, UMLAssociation, UMLAttribute, UMLCategory, UMLCheckConstraint, UMLClassifier, UMLComponent, UMLEntity, UMLEntityAttribute, UMLEnum, UMLEnumLiteral, UMLFolder, UMLForeignKeyConstraint, UMLNode, UMLOperation, UMLPackage, UMLPort, UMLStereotype, UMLTemplate, UMLRole, UMLUniqueConstraint, UMLUseCase, UMLClassifierListItem, and UMLEntityConstraint.

## ◆ copyInto()

void UMLObject::copyInto | ( | UMLObject * | lhs | ) | const
| virtual

Copy the internal presentation of this object into the new object.

Reimplemented in UMLAttribute, UMLCategory, UMLCheckConstraint, UMLClassifier, UMLClassifierListItem, UMLEntity, UMLEntityAttribute, UMLEntityConstraint, UMLEnum, UMLEnumLiteral, UMLForeignKeyConstraint, UMLOperation, UMLPackage, UMLStereotype, UMLTemplate, UMLCanvasObject, and UMLUniqueConstraint.

## ◆ doc()

QString UMLObject::doc | ( |  | ) | const

Returns the documentation for the object.

Returns
  Returns the documentation for the object.

## ◆ emitModified

void UMLObject::emitModified | ( |  | ) |
| slot

Forces the emission of the modified signal. Useful when updating several attributes at a time: you can block the signals, update all atts, and then force the signal.

## ◆ fullyQualifiedName()

QString UMLObject::fullyQualifiedName | ( | const QString & | separator = `QString()`,
|  | bool | includeRoot = `false`
| ) |  | const
| virtual

Returns the fully qualified name, i.e. all package prefixes and then m_name.

Parameters

  separator | The separator string to use (optional.) If not given then the separator is chosen according to the currently selected active programming language of import and code generation.
  includeRoot | Whether to prefix the root folder name to the FQN. See UMLDoc::getRootFolder(). Default: false.

Returns
  The fully qualified name of this UMLObject.

## ◆ hasDoc()

bool UMLObject::hasDoc | ( |  | ) | const

Returns state of documentation for the object.

Returns
  false if documentation is empty

## ◆ id()

ID::Type UMLObject::id | ( |  | ) | const
| virtual

Returns the ID of the object.

Returns
  Returns the ID of the object.

## ◆ init()

void UMLObject::init | ( |  | ) |
| protected

Initializes key variables of the class.

## ◆ isAbstract()

bool UMLObject::isAbstract | ( |  | ) | const

Returns the abstract state of the object.

## ◆ isStatic()

bool UMLObject::isStatic | ( |  | ) | const

Returns true if this UMLObject has classifier scope, otherwise false (the default).

## ◆ isUMLActor()

bool UMLObject::isUMLActor | ( |  | ) | const
| inline

## ◆ isUMLArtifact()

bool UMLObject::isUMLArtifact | ( |  | ) | const
| inline

## ◆ isUMLAssociation()

bool UMLObject::isUMLAssociation | ( |  | ) | const
| inline

## ◆ isUMLAttribute()

bool UMLObject::isUMLAttribute | ( |  | ) | const
| inline

## ◆ isUMLCategory()

bool UMLObject::isUMLCategory | ( |  | ) | const
| inline

## ◆ isUMLCheckConstraint()

bool UMLObject::isUMLCheckConstraint | ( |  | ) | const
| inline

## ◆ isUMLClassifier()

bool UMLObject::isUMLClassifier | ( |  | ) | const
| inline

## ◆ isUMLComponent()

bool UMLObject::isUMLComponent | ( |  | ) | const
| inline

## ◆ isUMLDatatype()

bool UMLObject::isUMLDatatype | ( |  | ) | const
| inline

## ◆ isUMLEntity()

bool UMLObject::isUMLEntity | ( |  | ) | const
| inline

## ◆ isUMLEntityAttribute()

bool UMLObject::isUMLEntityAttribute | ( |  | ) | const
| inline

## ◆ isUMLEntityConstraint()

bool UMLObject::isUMLEntityConstraint | ( |  | ) | const
| inline

## ◆ isUMLEnum()

bool UMLObject::isUMLEnum | ( |  | ) | const
| inline

## ◆ isUMLEnumLiteral()

bool UMLObject::isUMLEnumLiteral | ( |  | ) | const
| inline

## ◆ isUMLFolder()

bool UMLObject::isUMLFolder | ( |  | ) | const
| inline

## ◆ isUMLForeignKeyConstraint()

bool UMLObject::isUMLForeignKeyConstraint | ( |  | ) | const
| inline

## ◆ isUMLInstance()

bool UMLObject::isUMLInstance | ( |  | ) | const
| inline

## ◆ isUMLInstanceAttribute()

bool UMLObject::isUMLInstanceAttribute | ( |  | ) | const
| inline

## ◆ isUMLNode()

bool UMLObject::isUMLNode | ( |  | ) | const
| inline

## ◆ isUMLObject()

bool UMLObject::isUMLObject | ( |  | ) | const
| inline

## ◆ isUMLOperation()

bool UMLObject::isUMLOperation | ( |  | ) | const
| inline

## ◆ isUMLPackage()

bool UMLObject::isUMLPackage | ( |  | ) | const
| inline

## ◆ isUMLPort()

bool UMLObject::isUMLPort | ( |  | ) | const
| inline

## ◆ isUMLRole()

bool UMLObject::isUMLRole | ( |  | ) | const
| inline

## ◆ isUMLStereotype()

bool UMLObject::isUMLStereotype | ( |  | ) | const
| inline

## ◆ isUMLTemplate()

bool UMLObject::isUMLTemplate | ( |  | ) | const
| inline

## ◆ isUMLUniqueConstraint()

bool UMLObject::isUMLUniqueConstraint | ( |  | ) | const
| inline

## ◆ isUMLUseCase()

bool UMLObject::isUMLUseCase | ( |  | ) | const
| inline

## ◆ load1()

bool UMLObject::load1 | ( | QDomElement & | element | ) |
| protectedvirtual

Auxiliary to loadFromXMI. This method is usually overridden by child classes. It is responsible for loading the specific XMI structure of the child class.

Reimplemented in UMLActor, UMLArtifact, UMLAssociation, UMLAttribute, UMLCategory, UMLCheckConstraint, UMLClassifier, UMLComponent, UMLDatatype, UMLEntity, UMLEntityAttribute, UMLEnum, UMLEnumLiteral, UMLFolder, UMLForeignKeyConstraint, UMLInstance, UMLInstanceAttribute, UMLNode, UMLOperation, UMLPackage, UMLPort, UMLStereotype, UMLTemplate, UMLRole, UMLUniqueConstraint, and UMLUseCase.

## ◆ loadFromXMI()

bool UMLObject::loadFromXMI | ( | QDomElement & | element | ) |
| virtual

This method loads the generic parts of the XMI common to most model classes. It is not usually reimplemented by child classes. Instead, it invokes the load() method which implements the loading of the specifics of each child class.

Parameters

  element | The QDomElement from which to load.

## ◆ loadStereotype()

bool UMLObject::loadStereotype | ( | QDomElement & | element | ) |

Analyzes the given QDomElement for a reference to a stereotype.

Parameters

  element | QDomElement to analyze.

Returns
  True if a stereotype reference was found, else false.

## ◆ maybeSignalObjectCreated()

void UMLObject::maybeSignalObjectCreated | ( |  | ) |
| protected

Calls UMLDoc::signalUMLObjectCreated() if m_BaseType affords doing so.

## ◆ modified

void UMLObject::modified | ( |  | ) |
| signal

## ◆ name()

QString UMLObject::name | ( |  | ) | const

Returns a copy of m_name

## ◆ operator==()

bool UMLObject::operator== | ( | const UMLObject & | rhs | ) | const

Overloaded '==' operator

## ◆ package()

QString UMLObject::package | ( | const QString & | separator = `QString()`,
|  | bool | includeRoot = `false`
| ) |  | const

Return the package(s) in which this UMLObject is contained as a text.

Parameters

  separator | Separator string for joining together the individual package prefixes (optional.) If no separator is given then the separator of the currently selected language is used.
  includeRoot | Whether to prefix the root folder name. Default: false.

Returns
  The UMLObject's enclosing package(s) as a text.

## ◆ packages()

UMLPackageList UMLObject::packages | ( | bool | includeRoot = `false` | ) | const

Return a list of the packages in which this class is embedded. The outermost package is first in the list.

Parameters

  includeRoot | Whether to prefix the root folder name. Default: false.

Returns
  UMLPackageList of the containing packages.

## ◆ resolveRef()

bool UMLObject::resolveRef | ( |  | ) |
| virtual

Resolve referenced objects (if any.) Needs to be called after all UML objects are loaded from file. This needs to be done after all model objects are loaded because some of the xmi.id's might be forward references, i.e. they may identify model objects which were not yet loaded at the point of reference. The default implementation attempts resolution of the m_SecondaryId.

Returns
  True for success.

Reimplemented in UMLAssociation, UMLClassifier, UMLEntity, UMLForeignKeyConstraint, UMLInstance, UMLOperation, UMLPackage, and UMLCanvasObject.

## ◆ save1()

void UMLObject::save1 | ( | QXmlStreamWriter & | writer,
|  | const QString & | type,
|  | const QString & | tag = `QString()`
| ) |  |

Auxiliary to saveToXMI. Create an XML element with the given tag, and save the XMI attributes that are common to all child classes to the newly created element. This method does not need to be overridden by child classes. It is public because UMLOperation::saveToXMI invokes it for its <Parameter>s (cannot be done with protected access).

Parameters

  writer | The QXmlStreamWriter into which to write.
  type | In UML1 mode, it is used as the XML tag. In UML2 mode, it is used as the xmi:type attribute.
  tag | In UML2 mode, it is used as the XML tag. When given the special value "<use_type_as_tag>", the `type` is used as the XML tag just as in UML1 mode. In this case, no xmi:type attribute is generated.

## ◆ save1end()

void UMLObject::save1end | ( | QXmlStreamWriter & | writer | ) |
| protected

Auxiliary to saveToXMI. Save possible stereotype tagged values stored in m_TaggedValues and write the XML end element created in save1().

## ◆ saveToXMI()

void UMLObject::saveToXMI | ( | QXmlStreamWriter & | writer | ) |
| virtual

Reimplemented in UMLActor, UMLArtifact, UMLAssociation, UMLAttribute, UMLCategory, UMLCheckConstraint, UMLClassifier, UMLComponent, UMLDatatype, UMLEntity, UMLEntityAttribute, UMLEnum, UMLEnumLiteral, UMLFolder, UMLForeignKeyConstraint, UMLInstance, UMLInstanceAttribute, UMLNode, UMLOperation, UMLPackage, UMLPort, UMLStereotype, UMLTemplate, UMLRole, UMLUniqueConstraint, and UMLUseCase.

## ◆ secondaryFallback()

QString UMLObject::secondaryFallback | ( |  | ) | const

Return secondary ID fallback. Required by resolveRef() for imported model files.

## ◆ secondaryId()

QString UMLObject::secondaryId | ( |  | ) | const

Return secondary ID. Required by resolveRef().

## ◆ setAbstract()

void UMLObject::setAbstract | ( | bool | bAbstract | ) |

Sets the paste state of the object.

## ◆ setBaseType()

void UMLObject::setBaseType | ( | ObjectType | ot | ) |
| virtual

Set the type of the object.

Parameters

  ot | The ObjectType to set.

Reimplemented in UMLClassifier.

## ◆ setDoc()

void UMLObject::setDoc | ( | const QString & | d | ) |

Sets the documentation for the object.

Parameters

  d | The documentation for the object.

## ◆ setID()

void UMLObject::setID | ( | Uml::ID::Type | NewID | ) |
| virtual

Assigns a new Id to the object

## ◆ setName()

void UMLObject::setName | ( | const QString & | strName | ) |
| virtual

Set the UMLObject's name

Reimplemented in UMLAttribute.

## ◆ setNameCmd()

void UMLObject::setNameCmd | ( | const QString & | strName | ) |
| virtual

Method used by setName: it is called by cmdSetName, Don't use it!

Reimplemented in UMLClassifier.

## ◆ setSecondaryFallback()

void UMLObject::setSecondaryFallback | ( | const QString & | id | ) |

Set the secondary ID fallback. Currently only used by petalTree2Uml().

## ◆ setSecondaryId()

void UMLObject::setSecondaryId | ( | const QString & | id | ) |

Set the secondary ID. Currently only required by petalTree2Uml(); all other setting of the m_SecondaryID is internal to the UMLObject class hierarchy.

## ◆ setStatic()

void UMLObject::setStatic | ( | bool | bStatic | ) |

Sets the value for m_bStatic.

## ◆ setStereotype()

void UMLObject::setStereotype | ( | const QString & | name | ) |

Sets the classes stereotype name. Internally uses setUMLStereotype().

Parameters

  name | Sets the classes stereotype name.

## ◆ setStereotypeCmd()

void UMLObject::setStereotypeCmd | ( | const QString & | _name | ) |

## ◆ setUMLPackage()

bool UMLObject::setUMLPackage | ( | UMLPackage * | pPkg | ) |

Sets the UMLPackage in which this class is located.

Parameters

  pPkg | Pointer to the class' UMLPackage.

## ◆ setUMLParent()

void UMLObject::setUMLParent | ( | UMLObject * | parent | ) |

Set UML model parent.

Parameters

  parent | object to set as parent

TODO prevent setting parent to myself

## ◆ setUMLStereotype()

void UMLObject::setUMLStereotype | ( | UMLStereotype * | stereo | ) |

Sets the class' UMLStereotype. Adjusts the reference counts at the previously set stereotype and at the new stereotype. If the previously set UMLStereotype's reference count drops to zero then the UMLStereotype is removed at the UMLDoc and it is then physically deleted.

Parameters

  stereo | Sets the classes UMLStereotype.

## ◆ setVisibility()

void UMLObject::setVisibility | ( | Uml::Visibility::Enum | visibility | ) |

Sets the visibility of the object.

Parameters

  visibility | The visibility of the object.

## ◆ setVisibilityCmd()

void UMLObject::setVisibilityCmd | ( | Uml::Visibility::Enum | visibility | ) |

Method used by setVisibility: it is called by cmdSetVisibility, Don't use it!

## ◆ showPropertiesDialog()

bool UMLObject::showPropertiesDialog | ( | QWidget * | parent = `0` | ) |
| virtual

Display the properties configuration dialog for the object.

Parameters

  parent | The parent widget.

Returns
  True for success of this operation.

Reimplemented in UMLFolder, UMLInstance, UMLStereotype, UMLTemplate, UMLAssociation, UMLAttribute, UMLCheckConstraint, UMLEntityAttribute, UMLEnumLiteral, UMLForeignKeyConstraint, UMLInstanceAttribute, UMLOperation, UMLRole, and UMLUniqueConstraint.

## ◆ stereotype()

QString UMLObject::stereotype | ( | bool | includeAdornments = `false` | ) | const

Returns the stereotype.

## ◆ tags()

QStringList & UMLObject::tags | ( |  | ) |

Returns the concrete values of stereotype attributes.

## ◆ toI18nString()

QString UMLObject::toI18nString | ( | ObjectType | t | ) |
| static

Returns the given object type value as localized string.

Parameters

  t | ObjectType of which a string representation is wanted

Returns
  the ObjectType as localized string

## ◆ toIcon()

Icon_Utils::IconType UMLObject::toIcon | ( | ObjectType | t | ) |
| static

Returns the given object type value as icon type.

Parameters

  t | ObjectType of which an icon type is wanted

Returns
  the ObjectType as icon type

## ◆ toString()

QString UMLObject::toString | ( | ObjectType | ot | ) |
| static

Helper function for debug output. Returns the given enum value as string.

Parameters

  ot | ObjectType of which a string representation is wanted

Returns
  the ObjectType as string

## ◆ umlPackage()

UMLPackage * UMLObject::umlPackage | ( |  | ) | const

Returns the UMLPackage that this class is located in.

This method is a shortcut for calling umlParent()->asUMLPackage().

Returns
  Pointer to the UMLPackage of this class.

## ◆ umlParent()

UMLObject * UMLObject::umlParent | ( |  | ) | const

Return UML model parent.

Model classes of type UMLClassifierListItem and below uses QObject::parent to hold the model parent

Returns
  parent of uml object

## ◆ umlStereotype()

UMLStereotype * UMLObject::umlStereotype | ( |  | ) | const

Returns the classes UMLStereotype object.

Returns
  Returns the classes UMLStereotype object.

## ◆ visibility()

Visibility::Enum UMLObject::visibility | ( |  | ) | const

Returns the visibility of the object.

Returns
  Returns the visibility of the object.

## Friends And Related Function Documentation

## ◆ ObjectsModel

friend class ObjectsModel
| friend

## ◆ operator<<

QDebug operator<< | ( | QDebug | out,
|  | const UMLObject & | obj
| ) |  |
| friend

Print UML Object to debug output stream, so it can be used like uDebug() << "This object shouldn't be here: " << illegalObject;

## Member Data Documentation

## ◆ m_bAbstract

bool UMLObject::m_bAbstract
| protected

state of whether the object is abstract or not

## ◆ m_BaseType

ObjectType UMLObject::m_BaseType
| protected

objects type

## ◆ m_bCreationWasSignalled

bool UMLObject::m_bCreationWasSignalled
| protected

auxiliary to maybeSignalObjectCreated()

## ◆ m_bStatic

bool UMLObject::m_bStatic
| protected

flag for instance scope

## ◆ m_d

UMLObjectPrivate* UMLObject::m_d
| protected

private data

## ◆ m_Doc

QString UMLObject::m_Doc
| protected

object's documentation

## ◆ m_name

QString UMLObject::m_name
| protected

objects name

## ◆ m_nId

Uml::ID::Type UMLObject::m_nId
| protected

object's id

## ◆ m_pSecondary

QPointer<UMLObject> UMLObject::m_pSecondary
| protected

pointer to an associated object Only a few of the classes inheriting from UMLObject use this. However, it needs to be here because of inheritance graph disjunctness.

## ◆ m_pStereotype

QPointer<UMLStereotype> UMLObject::m_pStereotype
| protected

stereotype of the object if applicable

## ◆ m_SecondaryFallback

QString UMLObject::m_SecondaryFallback
| protected

Last-chance backup for when m_SecondaryId is not found. Used by Rose import: MDL files specify both a "quidu" (which corresponds to m_SecondaryId) and the human readable fully qualified target name of a reference. In case the quidu is not found, the human readable name is used which we store in m_SecondaryFallback.

## ◆ m_SecondaryId

QString UMLObject::m_SecondaryId
| protected

xmi.id of the secondary object for intermediate use during loading. The secondary ID is resolved to the m_pSecondary in the course of resolveRef() at the end of loading.

## ◆ m_TaggedValues

QStringList UMLObject::m_TaggedValues
| protected

Concrete values of UMLStereotype::AttributeDefs if a stereotype is applied and has attributes. The order of elements is the same as in UMLStereotype::AttributeDefs. At most N_STEREOATTRS are used (see dialogs/n_stereoattrs.h)

## ◆ m_visibility

Uml::Visibility::Enum UMLObject::m_visibility
| protected

objects visibility

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

- umbrello/umlmodel/umlobject.h
- umbrello/umlmodel/umlobject.cpp