umbrello: umbrello/uml1model/package.h Source File

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
UMLAssociation
Sets up association information.
Definition: association.h:33
UMLCanvasObject
Non-graphical information for a UMLCanvasObject.
Definition: umlcanvasobject.h:34
UMLObjectList
Definition: umlobjectlist.h:29
UMLObject
The base class for UML objects.
Definition: umlobject.h:74
UMLObject::name
QString name() const
Definition: umlobject.cpp:211
UMLObject::packages
UMLPackageList packages(bool includeRoot=false) const
Definition: umlobject.cpp:598
UMLPackage
Non-graphical information for a Package.
Definition: package.h:33
UMLPackage::UMLPackage
UMLPackage(const QString &name=QString(), Uml::ID::Type id=Uml::ID::None)
Definition: package.cpp:40
UMLPackage::findObject
UMLObject * findObject(const QString &name)
Definition: package.cpp:292
UMLPackage::removeAllObjects
virtual void removeAllObjects()
Definition: package.cpp:249
UMLPackage::copyInto
virtual void copyInto(UMLObject *lhs) const
Definition: package.cpp:56
UMLPackage::clone
virtual UMLObject * clone() const
Definition: package.cpp:68
UMLPackage::appendPackages
void appendPackages(UMLPackageList &packages, bool includeNested=true)
Definition: package.cpp:327
UMLPackage::findObjectById
UMLObject * findObjectById(Uml::ID::Type id)
Definition: package.cpp:314
UMLPackage::saveToXMI1
virtual void saveToXMI1(QDomDocument &qDoc, QDomElement &qElement)
Definition: package.cpp:440
UMLPackage::containedObjects
UMLObjectList containedObjects(bool includeInactive=false)
Definition: package.cpp:266
UMLPackage::removeObject
void removeObject(UMLObject *pObject)
Definition: package.cpp:210
UMLPackage::appendClassifiers
void appendClassifiers(UMLClassifierList &classifiers, bool includeNested=true)
Definition: package.cpp:350
UMLPackage::appendClassesAndInterfaces
void appendClassesAndInterfaces(UMLClassifierList &classifiers, bool includeNested=true)
Definition: package.cpp:398
UMLPackage::addObject
bool addObject(UMLObject *pObject, bool interactOnConflict=true)
Definition: package.cpp:135
UMLPackage::load1
virtual bool load1(QDomElement &element)
Definition: package.cpp:462
UMLPackage::m_objects
UMLObjectList m_objects
Definition: package.h:75
UMLPackage::~UMLPackage
virtual ~UMLPackage()
Definition: package.cpp:49
UMLPackage::resolveRef
virtual bool resolveRef()
Definition: package.cpp:422
UMLPackage::removeAssocFromConcepts
void removeAssocFromConcepts(UMLAssociation *assoc)
Definition: package.cpp:110
UMLPackage::addAssocToConcepts
void addAssocToConcepts(UMLAssociation *assoc)
Definition: package.cpp:84
UMLPackage::appendEntities
void appendEntities(UMLEntityList &entities, bool includeNested=true)
Definition: package.cpp:374
Uml::ID::None
const Type None
special value for uninitialized ID
Definition: basictypes.h:353
Uml::ID::Type
std::string Type
Definition: basictypes.h:351
umlcanvasobject.h
umlclassifierlist.h
UMLClassifierList
QList< UMLClassifier * > UMLClassifierList
Definition: umlclassifierlist.h:17
umlentitylist.h
UMLEntityList
QList< UMLEntity * > UMLEntityList
Definition: umlentitylist.h:17
UMLPackageList
QList< UMLPackage * > UMLPackageList
Definition: umlpackagelist.h:17