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

package.h
Go to the documentation of this file.
1 /***************************************************************************
2 * This program is free software; you can redistribute it and/or modify *
3 * it under the terms of the GNU General Public License as published by *
4 * the Free Software Foundation; either version 2 of the License, or *
5 * (at your option) any later version. *
6 * *
7 * copyright (C) 2003-2020 *
8 * Umbrello UML Modeller Authors <umbrello-devel@kde.org> *
9 ***************************************************************************/
10
11 #ifndef PACKAGE_H
12 #define PACKAGE_H
13
14 #include "umlcanvasobject.h"
15 #include "umlclassifierlist.h"
16 #include "umlentitylist.h"
17
18 // forward declarations
19 class UMLAssociation;
20
32 class UMLPackage : public UMLCanvasObject
33 {
34 Q_OBJECT
35 public:
36 explicit UMLPackage(const QString & name = QString(), Uml::ID::Type id = Uml::ID::None);
37 virtual ~UMLPackage();
38
39 virtual void copyInto(UMLObject *lhs) const;
40
41 virtual UMLObject* clone() const;
42
43 bool addObject(UMLObject *pObject, bool interactOnConflict = true);
44 void removeObject(UMLObject *pObject);
45
46 virtual void removeAllObjects();
47
48 UMLObjectList containedObjects(bool includeInactive = false);
49
50 void addAssocToConcepts(UMLAssociation* assoc);
51 void removeAssocFromConcepts(UMLAssociation *assoc);
52
53 UMLObject * findObject(const QString &name);
54 UMLObject * findObjectById(Uml::ID::Type id);
55
56 void appendPackages(UMLPackageList& packages, bool includeNested = true);
57 void appendClassifiers(UMLClassifierList& classifiers,
58 bool includeNested = true);
59 void appendClassesAndInterfaces(UMLClassifierList& classifiers,
60 bool includeNested = true);
61 void appendEntities(UMLEntityList& entities,
62 bool includeNested = true);
63
64 virtual bool resolveRef();
65
66 virtual void saveToXMI1(QDomDocument& qDoc, QDomElement& qElement);
67
68 protected:
69 virtual bool load1(QDomElement& element);
70
75 UMLObjectList m_objects;
76
77 };
78
79 #endif
UMLPackage::removeAllObjects
virtual void removeAllObjects()
Definition: package.cpp:249
UMLObject::id
virtual Uml::ID::Type id() const
Definition: umlobject.cpp:425
UMLEntity
Non-graphical Information for an Entity.
Definition: entity.h:35
UMLPackage::addAssocToConcepts
void addAssocToConcepts(UMLAssociation *assoc)
Definition: package.cpp:84
UMLPackage::clone
virtual UMLObject * clone() const
Definition: package.cpp:68
datatype.h
UMLObject::asUMLClassifier
UMLClassifier * asUMLClassifier()
Definition: umlobject.cpp:1309
UMLObject::ObjectType
ObjectType
Definition: umlobject.h:80
UMLCanvasObject::copyInto
virtual void copyInto(UMLObject *lhs) const
Definition: umlcanvasobject.cpp:298
UMLPackage::containedObjects
UMLObjectList containedObjects(bool includeInactive=false)
Definition: package.cpp:266
UMLObject::name
QString name() const
Definition: umlobject.cpp:211
UMLApp::activeLanguageIsCaseSensitive
bool activeLanguageIsCaseSensitive()
Definition: uml.cpp:2531
UMLPackage::load1
virtual bool load1(QDomElement &element)
Definition: package.cpp:462
UMLDatatype::isActive
bool isActive() const
Definition: datatype.cpp:82
Uml::AssociationType::hasUMLRepresentation
bool hasUMLRepresentation(Enum item)
Definition: basictypes.cpp:460
UMLCanvasObject
Non-graphical information for a UMLCanvasObject.
Definition: umlcanvasobject.h:34
UMLEntityList
QList< UMLEntity * > UMLEntityList
Definition: umlentitylist.h:17
UMLObject::ot_Association
@ ot_Association
Definition: umlobject.h:91
UMLDatatype::setActive
void setActive(bool active=true)
Definition: datatype.cpp:73
entity.h
UMLPackage::copyInto
virtual void copyInto(UMLObject *lhs) const
Definition: package.cpp:56
UMLDatatype
Non-graphical information for a Datatype.
Definition: datatype.h:26
UMLObject::resolveRef
virtual bool resolveRef()
Definition: umlobject.cpp:739
UMLObject::ot_Class
@ ot_Class
Definition: umlobject.h:89
UMLObject::ot_Entity
@ ot_Entity
Definition: umlobject.h:101
Uml::ID::None
const Type None
special value for uninitialized ID
Definition: basictypes.h:353
Uml::RoleType::A
@ A
Definition: basictypes.h:239
UMLPackage::saveToXMI1
virtual void saveToXMI1(QDomDocument &qDoc, QDomElement &qElement)
Definition: package.cpp:440
object_factory.h
UMLObject::ot_Interface
@ ot_Interface
Definition: umlobject.h:86
Uml::ID::toString
QString toString(const ID::Type &id)
Definition: basictypes.cpp:1263
UMLCanvasObject::removeAllChildObjects
virtual void removeAllChildObjects()
Definition: umlcanvasobject.cpp:161
umlcanvasobject.h
association.h
UMLObject::setName
virtual void setName(const QString &strName)
Definition: umlobject.cpp:192
UMLObject::umlPackage
UMLPackage * umlPackage() const
Definition: umlobject.cpp:646
UMLClassifierList
QList< UMLClassifier * > UMLClassifierList
Definition: umlclassifierlist.h:17
UMLObject::asUMLAssociation
UMLAssociation * asUMLAssociation()
Definition: umlobject.cpp:1304
Dialog_Utils::askName
bool askName(const QString &title, const QString &prompt, QString &name)
Definition: dialog_utils.cpp:97
UMLObject::ot_Package
@ ot_Package
Definition: umlobject.h:85
Uml::ID::Type
std::string Type
Definition: basictypes.h:351
UMLPackage::appendClassifiers
void appendClassifiers(UMLClassifierList &classifiers, bool includeNested=true)
Definition: package.cpp:350
model_utils.h
UMLObject
The base class for UML objects.
Definition: umlobject.h:74
UMLAssociation::getObject
UMLObject * getObject(Uml::RoleType::Enum role) const
Definition: association.cpp:496
UMLObject::baseType
ObjectType baseType() const
Definition: umlobject.cpp:397
UMLObject::asUMLDatatype
UMLDatatype * asUMLDatatype()
Definition: umlobject.cpp:1312
UMLPackage::appendPackages
void appendPackages(UMLPackageList &packages, bool includeNested=true)
Definition: package.cpp:327
UMLObject::asUMLEntity
UMLEntity * asUMLEntity()
Definition: umlobject.cpp:1313
UMLObject::m_BaseType
ObjectType m_BaseType
objects type
Definition: umlobject.h:276
UMLPackage::appendEntities
void appendEntities(UMLEntityList &entities, bool includeNested=true)
Definition: package.cpp:374
UMLCanvasObject::hasAssociation
bool hasAssociation(UMLAssociation *assoc)
Definition: umlcanvasobject.cpp:101
umlentitylist.h
UMLObject::asUMLCanvasObject
UMLCanvasObject * asUMLCanvasObject()
Definition: umlobject.cpp:1306
Model_Utils::uniqObjectName
QString uniqObjectName(UMLObject::ObjectType type, UMLPackage *parentPkg, QString prefix)
Definition: model_utils.cpp:526
uWarning
#define uWarning()
Definition: debug_utils.h:124
UMLPackage::appendClassesAndInterfaces
void appendClassesAndInterfaces(UMLClassifierList &classifiers, bool includeNested=true)
Definition: package.cpp:398
UMLPackage::findObjectById
UMLObject * findObjectById(Uml::ID::Type id)
Definition: package.cpp:314
UMLCanvasObject::removeAssociationEnd
int removeAssociationEnd(UMLAssociation *assoc)
Definition: umlcanvasobject.cpp:114
UMLObject::saveToXMI1
virtual void saveToXMI1(QDomDocument &qDoc, QDomElement &qElement)
Definition: umlobject.cpp:834
Model_Utils::findObjectInList
UMLObject * findObjectInList(Uml::ID::Type id, const UMLObjectList &inList)
Definition: model_utils.cpp:84
UMLObject::save1
QDomElement save1(const QString &tag, QDomDocument &qDoc)
Definition: umlobject.cpp:845
folder.h
i18n
#define i18n
Definition: main.cpp:39
UMLPackage::removeObject
void removeObject(UMLObject *pObject)
Definition: package.cpp:210
umlclassifierlist.h
UMLObjectList::copyInto
virtual void copyInto(UMLObjectList *rhs) const
Definition: umlobjectlist.cpp:26
UMLPackage::resolveRef
virtual bool resolveRef()
Definition: package.cpp:422
UMLObject::ot_Datatype
@ ot_Datatype
Definition: umlobject.h:87
Model_Utils::isCommonXMI1Attribute
bool isCommonXMI1Attribute(const QString &tag)
Definition: model_utils.cpp:761
UMLAssociation::getObjectId
Uml::ID::Type getObjectId(Uml::RoleType::Enum role) const
Definition: association.cpp:508
UMLObject::packages
UMLPackageList packages(bool includeRoot=false) const
Definition: umlobject.cpp:598
uDebug
#define uDebug()
Definition: debug_utils.h:122
Uml::RoleType::B
@ B
Definition: basictypes.h:240
UMLPackage::m_objects
UMLObjectList m_objects
Definition: package.h:75
UMLObject::ot_Instance
@ ot_Instance
Definition: umlobject.h:90
UMLPackage::findObject
UMLObject * findObject(const QString &name)
Definition: package.cpp:292
UMLApp::app
static UMLApp * app()
Definition: uml.cpp:278
UMLCanvasObject::subordinates
UMLObjectList & subordinates() const
Definition: umlcanvasobject.h:80
UMLPackage::UMLPackage
UMLPackage(const QString &name=QString(), Uml::ID::Type id=Uml::ID::None)
Definition: package.cpp:40
UMLPackage::~UMLPackage
virtual ~UMLPackage()
Definition: package.cpp:49
Uml
Definition: basictypes.cpp:37
UMLPackageList
QList< UMLPackage * > UMLPackageList
Definition: umlpackagelist.h:17
UMLCanvasObject::resolveRef
virtual bool resolveRef()
Definition: umlcanvasobject.cpp:440
UMLDoc::tagEq
static bool tagEq(const QString &tag, const QString &pattern)
Definition: umldoc.cpp:3582
classifier.h
uError
#define uError()
Definition: debug_utils.h:123
UMLObject::loadFromXMI1
virtual bool loadFromXMI1(QDomElement &element)
Definition: umlobject.cpp:955
UMLObject::ot_Enum
@ ot_Enum
Definition: umlobject.h:88
uml.h
UMLObject::baseTypeStr
QLatin1String baseTypeStr() const
Definition: umlobject.cpp:405
UMLObject::setUMLPackage
bool setUMLPackage(UMLPackage *pPkg)
Definition: umlobject.cpp:616
Object_Factory::makeObjectFromXMI
UMLObject * makeObjectFromXMI(const QString &xmiTag, const QString &stereoID)
Definition: object_factory.cpp:374
UMLClassifier
Information for a non-graphical Concept/Class.
Definition: classifier.h:40
debug_utils.h
UMLCanvasObject::addAssociationEnd
bool addAssociationEnd(UMLAssociation *assoc)
Definition: umlcanvasobject.cpp:80
UMLAssociation
Sets up association information.
Definition: association.h:33
UMLObject::isUMLDatatype
bool isUMLDatatype()
Definition: umlobject.h:206
UMLAssociation::getAssocType
Uml::AssociationType::Enum getAssocType() const
Definition: association.cpp:105
UMLPackage::removeAssocFromConcepts
void removeAssocFromConcepts(UMLAssociation *assoc)
Definition: package.cpp:110
UMLPackage::addObject
bool addObject(UMLObject *pObject, bool interactOnConflict=true)
Definition: package.cpp:135
UMLObject::asUMLPackage
UMLPackage * asUMLPackage()
Definition: umlobject.cpp:1325
uIgnoreZeroPointer
#define uIgnoreZeroPointer(a)
Definition: debug_utils.h:134
dialog_utils.h
package.h
UMLObject::ot_Folder
@ ot_Folder
Definition: umlobject.h:103
UMLObjectList
Definition: umlobjectlist.h:29
umldoc.h
UMLPackage
Non-graphical information for a Package.
Definition: package.h:33