umbrello: umbrello/uml1model/package.h Source File

umbrello 2.31.1 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);
44 void removeObject(UMLObject *pObject);
45
46 virtual void removeAllObjects();
47
48 UMLObjectList &containedObjects();
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:211
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:82
UMLPackage::clone
virtual UMLObject * clone() const
Definition: package.cpp:66
UMLObject::asUMLClassifier
UMLClassifier * asUMLClassifier()
Definition: umlobject.cpp:1308
UMLObject::ObjectType
ObjectType
Definition: umlobject.h:80
UMLCanvasObject::copyInto
virtual void copyInto(UMLObject *lhs) const
Definition: umlcanvasobject.cpp:298
UMLObject::name
QString name() const
Definition: umlobject.cpp:211
UMLApp::activeLanguageIsCaseSensitive
bool activeLanguageIsCaseSensitive()
Definition: uml.cpp:2517
UMLPackage::load1
virtual bool load1(QDomElement &element)
Definition: package.cpp:409
Uml::AssociationType::hasUMLRepresentation
bool hasUMLRepresentation(Enum item)
Definition: basictypes.cpp:477
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
entity.h
UMLPackage::copyInto
virtual void copyInto(UMLObject *lhs) const
Definition: package.cpp:54
UMLObject::resolveRef
virtual bool resolveRef()
Definition: umlobject.cpp:738
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:370
Uml::RoleType::A
@ A
Definition: basictypes.h:256
UMLPackage::saveToXMI1
virtual void saveToXMI1(QDomDocument &qDoc, QDomElement &qElement)
Definition: package.cpp:387
object_factory.h
UMLObject::ot_Interface
@ ot_Interface
Definition: umlobject.h:86
Uml::ID::toString
QString toString(const ID::Type &id)
Definition: basictypes.cpp:1280
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:645
UMLClassifierList
QList< UMLClassifier * > UMLClassifierList
Definition: umlclassifierlist.h:17
UMLObject::asUMLAssociation
UMLAssociation * asUMLAssociation()
Definition: umlobject.cpp:1303
Dialog_Utils::askName
bool askName(const QString &title, const QString &prompt, QString &name)
Definition: dialog_utils.cpp:96
UMLPackage::containedObjects
UMLObjectList & containedObjects()
Definition: package.cpp:228
UMLObject::ot_Package
@ ot_Package
Definition: umlobject.h:85
Uml::ID::Type
std::string Type
Definition: basictypes.h:368
UMLPackage::appendClassifiers
void appendClassifiers(UMLClassifierList &classifiers, bool includeNested=true)
Definition: package.cpp:297
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
UMLPackage::appendPackages
void appendPackages(UMLPackageList &packages, bool includeNested=true)
Definition: package.cpp:274
UMLObject::asUMLEntity
UMLEntity * asUMLEntity()
Definition: umlobject.cpp:1312
UMLObject::m_BaseType
ObjectType m_BaseType
objects type
Definition: umlobject.h:276
UMLPackage::appendEntities
void appendEntities(UMLEntityList &entities, bool includeNested=true)
Definition: package.cpp:321
UMLCanvasObject::hasAssociation
bool hasAssociation(UMLAssociation *assoc)
Definition: umlcanvasobject.cpp:101
umlentitylist.h
UMLObject::asUMLCanvasObject
UMLCanvasObject * asUMLCanvasObject()
Definition: umlobject.cpp:1305
Model_Utils::uniqObjectName
QString uniqObjectName(UMLObject::ObjectType type, UMLPackage *parentPkg, QString prefix)
Definition: model_utils.cpp:527
uWarning
#define uWarning()
Definition: debug_utils.h:124
UMLPackage::appendClassesAndInterfaces
void appendClassesAndInterfaces(UMLClassifierList &classifiers, bool includeNested=true)
Definition: package.cpp:345
UMLPackage::findObjectById
UMLObject * findObjectById(Uml::ID::Type id)
Definition: package.cpp:261
UMLCanvasObject::removeAssociationEnd
int removeAssociationEnd(UMLAssociation *assoc)
Definition: umlcanvasobject.cpp:114
UMLObject::saveToXMI1
virtual void saveToXMI1(QDomDocument &qDoc, QDomElement &qElement)
Definition: umlobject.cpp:833
Model_Utils::findObjectInList
UMLObject * findObjectInList(Uml::ID::Type id, const UMLObjectList &inList)
Definition: model_utils.cpp:92
UMLObject::save1
QDomElement save1(const QString &tag, QDomDocument &qDoc)
Definition: umlobject.cpp:844
i18n
#define i18n
Definition: main.cpp:39
UMLPackage::removeObject
void removeObject(UMLObject *pObject)
Definition: package.cpp:190
umlclassifierlist.h
UMLObjectList::copyInto
virtual void copyInto(UMLObjectList *rhs) const
Definition: umlobjectlist.cpp:26
UMLPackage::resolveRef
virtual bool resolveRef()
Definition: package.cpp:369
UMLObject::ot_Datatype
@ ot_Datatype
Definition: umlobject.h:87
Model_Utils::isCommonXMI1Attribute
bool isCommonXMI1Attribute(const QString &tag)
Definition: model_utils.cpp:762
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:597
uDebug
#define uDebug()
Definition: debug_utils.h:122
Uml::RoleType::B
@ B
Definition: basictypes.h:257
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:239
UMLApp::app
static UMLApp * app()
Definition: uml.cpp:269
UMLCanvasObject::subordinates
UMLObjectList & subordinates() const
Definition: umlcanvasobject.h:88
UMLPackage::UMLPackage
UMLPackage(const QString &name=QString(), Uml::ID::Type id=Uml::ID::None)
Definition: package.cpp:38
UMLPackage::~UMLPackage
virtual ~UMLPackage()
Definition: package.cpp:47
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:3548
UMLPackage::addObject
bool addObject(UMLObject *pObject)
Definition: package.cpp:128
classifier.h
uError
#define uError()
Definition: debug_utils.h:123
UMLObject::loadFromXMI1
virtual bool loadFromXMI1(QDomElement &element)
Definition: umlobject.cpp:954
UMLObject::ot_Enum
@ ot_Enum
Definition: umlobject.h:88
uml.h
UMLObject::setUMLPackage
bool setUMLPackage(UMLPackage *pPkg)
Definition: umlobject.cpp:615
Object_Factory::makeObjectFromXMI
UMLObject * makeObjectFromXMI(const QString &xmiTag, const QString &stereoID)
Definition: object_factory.cpp:382
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
UMLAssociation::getAssocType
Uml::AssociationType::Enum getAssocType() const
Definition: association.cpp:105
UMLPackage::removeAssocFromConcepts
void removeAssocFromConcepts(UMLAssociation *assoc)
Definition: package.cpp:108
UMLObject::asUMLPackage
UMLPackage * asUMLPackage()
Definition: umlobject.cpp:1324
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