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 SPDX-License-Identifier: GPL-2.0-or-later
3 SPDX-FileCopyrightText: 2003-2021 Umbrello UML Modeller Authors <umbrello-devel@kde.org>
4*/
5
6#ifndef PACKAGE_H
7#define PACKAGE_H
8
9#include "umlcanvasobject.h"
10#include "umlclassifierlist.h"
11#include "umlentitylist.h"
12
13// forward declarations
14class UMLAssociation;
15
27 class UMLPackage : public UMLCanvasObject
28{
29 Q_OBJECT
30public:
31 explicit UMLPackage(const QString & name = QString(), Uml::ID::Type id = Uml::ID::None);
32 virtual ~UMLPackage();
33
34 virtual void copyInto(UMLObject *lhs) const;
35
36 virtual UMLObject* clone() const;
37
38 bool addObject(UMLObject *pObject, bool interactOnConflict = true);
39 void removeObject(UMLObject *pObject);
40
41 virtual void removeAllObjects();
42
43 UMLObjectList containedObjects(bool includeInactive = false) const;
44
45 void addAssocToConcepts(UMLAssociation* assoc);
46 void removeAssocFromConcepts(UMLAssociation *assoc);
47
48 UMLObject * findObject(const QString &name) const;
49 UMLObject * findObjectById(Uml::ID::Type id) const;
50
51 void appendPackages(UMLPackageList& packages, bool includeNested = true) const;
52 void appendClassifiers(UMLClassifierList& classifiers,
53 bool includeNested = true) const;
54 void appendClassesAndInterfaces(UMLClassifierList& classifiers,
55 bool includeNested = true) const;
56 void appendEntities(UMLEntityList& entities,
57 bool includeNested = true) const;
58
59 virtual bool resolveRef();
60
61 virtual void saveToXMI1(QXmlStreamWriter& writer);
62
63protected:
64 virtual bool load1(QDomElement& element);
65
78 UMLObjectList m_objects;
79
80};
81
82#endif
UMLAssociation
Sets up association information.
Definition: association.h:29
UMLCanvasObject
Non-graphical information for a UMLCanvasObject.
Definition: umlcanvasobject.h:32
UMLObjectList
Definition: umlobjectlist.h:25
UMLObject
The base class for UML objects.
Definition: umlobject.h:70
UMLObject::name
QString name() const
Definition: umlobject.cpp:206
UMLObject::packages
UMLPackageList packages(bool includeRoot=false) const
Definition: umlobject.cpp:601
UMLPackage
Non-graphical information for a Package.
Definition: package.h:28
UMLPackage::appendEntities
void appendEntities(UMLEntityList &entities, bool includeNested=true) const
Definition: package.cpp:369
UMLPackage::UMLPackage
UMLPackage(const QString &name=QString(), Uml::ID::Type id=Uml::ID::None)
Definition: package.cpp:35
UMLPackage::findObject
UMLObject * findObject(const QString &name) const
Definition: package.cpp:287
UMLPackage::removeAllObjects
virtual void removeAllObjects()
Definition: package.cpp:244
UMLPackage::containedObjects
UMLObjectList containedObjects(bool includeInactive=false) const
Definition: package.cpp:261
UMLPackage::copyInto
virtual void copyInto(UMLObject *lhs) const
Definition: package.cpp:51
UMLPackage::appendClassesAndInterfaces
void appendClassesAndInterfaces(UMLClassifierList &classifiers, bool includeNested=true) const
Definition: package.cpp:393
UMLPackage::clone
virtual UMLObject * clone() const
Definition: package.cpp:63
UMLPackage::appendClassifiers
void appendClassifiers(UMLClassifierList &classifiers, bool includeNested=true) const
Definition: package.cpp:345
UMLPackage::saveToXMI1
virtual void saveToXMI1(QXmlStreamWriter &writer)
Definition: package.cpp:435
UMLPackage::removeObject
void removeObject(UMLObject *pObject)
Definition: package.cpp:205
UMLPackage::appendPackages
void appendPackages(UMLPackageList &packages, bool includeNested=true) const
Definition: package.cpp:322
UMLPackage::findObjectById
UMLObject * findObjectById(Uml::ID::Type id) const
Definition: package.cpp:309
UMLPackage::addObject
bool addObject(UMLObject *pObject, bool interactOnConflict=true)
Definition: package.cpp:130
UMLPackage::load1
virtual bool load1(QDomElement &element)
Definition: package.cpp:457
UMLPackage::m_objects
UMLObjectList m_objects
Definition: package.h:78
UMLPackage::~UMLPackage
virtual ~UMLPackage()
Definition: package.cpp:44
UMLPackage::resolveRef
virtual bool resolveRef()
Definition: package.cpp:417
UMLPackage::removeAssocFromConcepts
void removeAssocFromConcepts(UMLAssociation *assoc)
Definition: package.cpp:105
UMLPackage::addAssocToConcepts
void addAssocToConcepts(UMLAssociation *assoc)
Definition: package.cpp:79
Uml::ID::None
const Type None
special value for uninitialized ID
Definition: basictypes.h:373
Uml::ID::Type
std::string Type
Definition: basictypes.h:371
umlcanvasobject.h
umlclassifierlist.h
UMLClassifierList
QList< UMLClassifier * > UMLClassifierList
Definition: umlclassifierlist.h:12
umlentitylist.h
UMLEntityList
QList< UMLEntity * > UMLEntityList
Definition: umlentitylist.h:12
UMLPackageList
QList< UMLPackage * > UMLPackageList
Definition: umlpackagelist.h:11