umbrello 2.38.4
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:
Collaboration 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 UMLObjectclone () 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)
 
UMLStereotypeumlStereotype () const
 
QStringList & tags ()
 
QString package (const QString &separator=QString(), bool includeRoot=false) const
 
UMLPackageList packages (bool includeRoot=false) const
 
bool setUMLPackage (UMLPackage *pPkg)
 
UMLPackageumlPackage () const
 
void setUMLParent (UMLObject *parent)
 
UMLObjectumlParent () 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
 
UMLActorasUMLActor ()
 
UMLArtifactasUMLArtifact ()
 
UMLAssociationasUMLAssociation ()
 
UMLAttributeasUMLAttribute ()
 
UMLCanvasObjectasUMLCanvasObject ()
 
UMLCategoryasUMLCategory ()
 
UMLCheckConstraintasUMLCheckConstraint ()
 
UMLClassifierasUMLClassifier ()
 
UMLClassifierListItemasUMLClassifierListItem ()
 
UMLClassifierSetasUMLClassifierSet ()
 
UMLComponentasUMLComponent ()
 
UMLDatatypeasUMLDatatype ()
 
UMLEntityasUMLEntity ()
 
UMLEntityAttributeasUMLEntityAttribute ()
 
UMLEntityConstraintasUMLEntityConstraint ()
 
UMLEnumasUMLEnum ()
 
UMLEnumLiteralasUMLEnumLiteral ()
 
UMLFolderasUMLFolder ()
 
UMLForeignKeyConstraintasUMLForeignKeyConstraint ()
 
UMLInstanceasUMLInstance ()
 
UMLInstanceAttributeasUMLInstanceAttribute ()
 
UMLNodeasUMLNode ()
 
UMLObjectasUMLObject ()
 
UMLOperationasUMLOperation ()
 
UMLPackageasUMLPackage ()
 
UMLPortasUMLPort ()
 
UMLRoleasUMLRole ()
 
UMLStereotypeasUMLStereotype ()
 
UMLTemplateasUMLTemplate ()
 
UMLUniqueConstraintasUMLUniqueConstraint ()
 
UMLUseCaseasUMLUseCase ()
 
const UMLActorasUMLActor () const
 
const UMLArtifactasUMLArtifact () const
 
const UMLAssociationasUMLAssociation () const
 
const UMLAttributeasUMLAttribute () const
 
const UMLCanvasObjectasUMLCanvasObject () const
 
const UMLCategoryasUMLCategory () const
 
const UMLCheckConstraintasUMLCheckConstraint () const
 
const UMLClassifierasUMLClassifier () const
 
const UMLClassifierListItemasUMLClassifierListItem () const
 
const UMLClassifierSetasUMLClassifierSet () const
 
const UMLComponentasUMLComponent () const
 
const UMLDatatypeasUMLDatatype () const
 
const UMLEntityasUMLEntity () const
 
const UMLEntityAttributeasUMLEntityAttribute () const
 
const UMLEntityConstraintasUMLEntityConstraint () const
 
const UMLEnumasUMLEnum () const
 
const UMLEnumLiteralasUMLEnumLiteral () const
 
const UMLFolderasUMLFolder () const
 
const UMLForeignKeyConstraintasUMLForeignKeyConstraint () const
 
const UMLInstanceasUMLInstance () const
 
const UMLInstanceAttributeasUMLInstanceAttribute () const
 
const UMLNodeasUMLNode () const
 
const UMLObjectasUMLObject () const
 
const UMLOperationasUMLOperation () const
 
const UMLPackageasUMLPackage () const
 
const UMLPortasUMLPort () const
 
const UMLRoleasUMLRole () const
 
const UMLStereotypeasUMLStereotype () const
 
const UMLTemplateasUMLTemplate () const
 
const UMLUniqueConstraintasUMLUniqueConstraint () const
 
const UMLUseCaseasUMLUseCase () 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
 
QString m_Doc
 object's documentation
 
QPointer< UMLStereotypem_pStereotype
 stereotype of the object if applicable
 
QString m_name
 objects name
 
ObjectType m_BaseType
 objects type
 
Uml::Visibility::Enum m_visibility
 objects visibility
 
bool m_bAbstract
 state of whether the object is abstract or not
 
bool m_bStatic
 flag for instance scope
 
bool m_bCreationWasSignalled
 auxiliary to maybeSignalObjectCreated()
 
QPointer< UMLObjectm_pSecondary
 
QString m_SecondaryId
 
QString m_SecondaryFallback
 
QStringList m_TaggedValues
 
UMLObjectPrivatem_d
 private data
 

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

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
otherobject to created from
Here is the call graph for this function:

◆ UMLObject() [2/4]

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

Creates a UMLObject.

Parameters
parentThe parent of the object.
nameThe name of the object.
idThe ID of the object (optional.) If omitted then a new ID will be assigned internally.
Here is the call graph for this function:

◆ UMLObject() [3/4]

UMLObject::UMLObject ( UMLObject parent)
explicit

Creates a UMLObject.

Parameters
parentThe parent of the object.
Here is the call graph for this function:

◆ UMLObject() [4/4]

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

Creates a UMLObject.

Parameters
nameThe name of the object.
idThe ID of the object (optional.) If omitted then a new ID will be assigned internally.
Here is the call graph for this function:

◆ ~UMLObject()

UMLObject::~UMLObject ( )
virtual

Standard destructor.

Here is the call graph for this function:

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.

Here is the call graph for this function:

◆ 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.

Here is the call graph for this function:

◆ 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.

Here is the call graph for this function:

◆ 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
separatorThe 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.
includeRootWhether to prefix the root folder name to the FQN. See UMLDoc::getRootFolder(). Default: false.
Returns
The fully qualified name of this UMLObject.
Here is the call graph for this function:

◆ 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
Here is the call graph for this function:

◆ isUMLArtifact()

bool UMLObject::isUMLArtifact ( ) const
inline
Here is the call graph for this function:

◆ isUMLAssociation()

bool UMLObject::isUMLAssociation ( ) const
inline
Here is the call graph for this function:

◆ isUMLAttribute()

bool UMLObject::isUMLAttribute ( ) const
inline
Here is the call graph for this function:

◆ isUMLCategory()

bool UMLObject::isUMLCategory ( ) const
inline
Here is the call graph for this function:

◆ isUMLCheckConstraint()

bool UMLObject::isUMLCheckConstraint ( ) const
inline
Here is the call graph for this function:

◆ isUMLClassifier()

bool UMLObject::isUMLClassifier ( ) const
inline
Here is the call graph for this function:

◆ isUMLComponent()

bool UMLObject::isUMLComponent ( ) const
inline
Here is the call graph for this function:

◆ isUMLDatatype()

bool UMLObject::isUMLDatatype ( ) const
inline
Here is the call graph for this function:

◆ isUMLEntity()

bool UMLObject::isUMLEntity ( ) const
inline
Here is the call graph for this function:

◆ isUMLEntityAttribute()

bool UMLObject::isUMLEntityAttribute ( ) const
inline
Here is the call graph for this function:

◆ isUMLEntityConstraint()

bool UMLObject::isUMLEntityConstraint ( ) const
inline
Here is the call graph for this function:

◆ isUMLEnum()

bool UMLObject::isUMLEnum ( ) const
inline
Here is the call graph for this function:

◆ isUMLEnumLiteral()

bool UMLObject::isUMLEnumLiteral ( ) const
inline
Here is the call graph for this function:

◆ isUMLFolder()

bool UMLObject::isUMLFolder ( ) const
inline
Here is the call graph for this function:

◆ isUMLForeignKeyConstraint()

bool UMLObject::isUMLForeignKeyConstraint ( ) const
inline
Here is the call graph for this function:

◆ isUMLInstance()

bool UMLObject::isUMLInstance ( ) const
inline
Here is the call graph for this function:

◆ isUMLInstanceAttribute()

bool UMLObject::isUMLInstanceAttribute ( ) const
inline
Here is the call graph for this function:

◆ isUMLNode()

bool UMLObject::isUMLNode ( ) const
inline
Here is the call graph for this function:

◆ isUMLObject()

bool UMLObject::isUMLObject ( ) const
inline
Here is the call graph for this function:

◆ isUMLOperation()

bool UMLObject::isUMLOperation ( ) const
inline
Here is the call graph for this function:

◆ isUMLPackage()

bool UMLObject::isUMLPackage ( ) const
inline
Here is the call graph for this function:

◆ isUMLPort()

bool UMLObject::isUMLPort ( ) const
inline
Here is the call graph for this function:

◆ isUMLRole()

bool UMLObject::isUMLRole ( ) const
inline
Here is the call graph for this function:

◆ isUMLStereotype()

bool UMLObject::isUMLStereotype ( ) const
inline
Here is the call graph for this function:

◆ isUMLTemplate()

bool UMLObject::isUMLTemplate ( ) const
inline
Here is the call graph for this function:

◆ isUMLUniqueConstraint()

bool UMLObject::isUMLUniqueConstraint ( ) const
inline
Here is the call graph for this function:

◆ isUMLUseCase()

bool UMLObject::isUMLUseCase ( ) const
inline
Here is the call graph for this function:

◆ 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
elementThe QDomElement from which to load.
Here is the call graph for this function:

◆ loadStereotype()

bool UMLObject::loadStereotype ( QDomElement &  element)

Analyzes the given QDomElement for a reference to a stereotype.

Parameters
elementQDomElement to analyze.
Returns
True if a stereotype reference was found, else false.
Here is the call graph for this function:

◆ maybeSignalObjectCreated()

void UMLObject::maybeSignalObjectCreated ( )
protected

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

Here is the call graph for this function:

◆ 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

Here is the call graph for this function:

◆ 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
separatorSeparator string for joining together the individual package prefixes (optional.) If no separator is given then the separator of the currently selected language is used.
includeRootWhether to prefix the root folder name. Default: false.
Returns
The UMLObject's enclosing package(s) as a text.
Here is the call graph for this function:

◆ 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
includeRootWhether to prefix the root folder name. Default: false.
Returns
UMLPackageList of the containing packages.
Here is the call graph for this function:

◆ 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.

Here is the call graph for this function:

◆ 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
writerThe QXmlStreamWriter into which to write.
typeIn UML1 mode, it is used as the XML tag. In UML2 mode, it is used as the xmi:type attribute.
tagIn 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.
Here is the call graph for this function:

◆ 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().

Here is the call graph for this function:

◆ saveToXMI()

void UMLObject::saveToXMI ( QXmlStreamWriter &  writer)
virtual

◆ 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.

Here is the call graph for this function:

◆ setBaseType()

void UMLObject::setBaseType ( ObjectType  ot)
virtual

Set the type of the object.

Parameters
otThe ObjectType to set.

Reimplemented in UMLClassifier.

◆ setDoc()

void UMLObject::setDoc ( const QString &  d)

Sets the documentation for the object.

Parameters
dThe documentation for the object.

◆ setID()

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

Assigns a new Id to the object

Here is the call graph for this function:

◆ setName()

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

Set the UMLObject's name

Reimplemented in UMLAttribute.

Here is the call graph for this function:

◆ setNameCmd()

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

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

Reimplemented in UMLClassifier.

Here is the call graph for this function:

◆ setSecondaryFallback()

void UMLObject::setSecondaryFallback ( const QString &  id)

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

Here is the call graph for this function:

◆ 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.

Here is the call graph for this function:

◆ setStatic()

void UMLObject::setStatic ( bool  bStatic)

Sets the value for m_bStatic.

Here is the call graph for this function:

◆ setStereotype()

void UMLObject::setStereotype ( const QString &  name)

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

Parameters
nameSets the classes stereotype name.
Here is the call graph for this function:

◆ setStereotypeCmd()

void UMLObject::setStereotypeCmd ( const QString &  _name)
Here is the call graph for this function:

◆ setUMLPackage()

bool UMLObject::setUMLPackage ( UMLPackage pPkg)

Sets the UMLPackage in which this class is located.

Parameters
pPkgPointer to the class' UMLPackage.
Here is the call graph for this function:

◆ setUMLParent()

void UMLObject::setUMLParent ( UMLObject parent)

Set UML model parent.

Parameters
parentobject 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
stereoSets the classes UMLStereotype.
Here is the call graph for this function:

◆ setVisibility()

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

Sets the visibility of the object.

Parameters
visibilityThe visibility of the object.
Here is the call graph for this function:

◆ setVisibilityCmd()

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

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

Here is the call graph for this function:

◆ showPropertiesDialog()

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

Display the properties configuration dialog for the object.

Parameters
parentThe 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.

Here is the call graph for this function:

◆ 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
tObjectType of which a string representation is wanted
Returns
the ObjectType as localized string
Here is the call graph for this function:

◆ toIcon()

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

Returns the given object type value as icon type.

Parameters
tObjectType of which an icon type is wanted
Returns
the ObjectType as icon type
Here is the call graph for this function:

◆ toString()

QString UMLObject::toString ( ObjectType  ot)
static

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

Parameters
otObjectType 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 Symbol 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

◆ 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: