umbrello: umbrello/umlmodel/package.h Source File

umbrello 25.08.0 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 virtual 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 saveToXMI(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::UMLCanvasObject
UMLCanvasObject(const QString &name=QString(), Uml::ID::Type id=Uml::ID::None)
Definition umlcanvasobject.cpp:32
UMLObjectList
Definition umlobjectlist.h:25
UMLObject::UMLObject
UMLObject(const UMLObject &other)
Definition umlobject.cpp:44
UMLObject::name
QString name() const
Definition umlobject.cpp:207
UMLObject::packages
UMLPackageList packages(bool includeRoot=false) const
Definition umlobject.cpp:602
UMLPackage::appendEntities
void appendEntities(UMLEntityList &entities, bool includeNested=true) const
Definition package.cpp:377
UMLPackage::saveToXMI
virtual void saveToXMI(QXmlStreamWriter &writer)
Definition package.cpp:443
UMLPackage::UMLPackage
UMLPackage(const QString &name=QString(), Uml::ID::Type id=Uml::ID::None)
Definition package.cpp:38
UMLPackage::findObject
UMLObject * findObject(const QString &name) const
Definition package.cpp:295
UMLPackage::removeAllObjects
virtual void removeAllObjects()
Definition package.cpp:250
UMLPackage::containedObjects
UMLObjectList containedObjects(bool includeInactive=false) const
Definition package.cpp:269
UMLPackage::copyInto
virtual void copyInto(UMLObject *lhs) const
Definition package.cpp:54
UMLPackage::appendClassesAndInterfaces
void appendClassesAndInterfaces(UMLClassifierList &classifiers, bool includeNested=true) const
Definition package.cpp:401
UMLPackage::clone
virtual UMLObject * clone() const
Definition package.cpp:66
UMLPackage::appendClassifiers
void appendClassifiers(UMLClassifierList &classifiers, bool includeNested=true) const
Definition package.cpp:353
UMLPackage::removeObject
virtual void removeObject(UMLObject *pObject)
Definition package.cpp:211
UMLPackage::appendPackages
void appendPackages(UMLPackageList &packages, bool includeNested=true) const
Definition package.cpp:330
UMLPackage::findObjectById
UMLObject * findObjectById(Uml::ID::Type id) const
Definition package.cpp:317
UMLPackage::addObject
bool addObject(UMLObject *pObject, bool interactOnConflict=true)
Definition package.cpp:135
UMLPackage::load1
virtual bool load1(QDomElement &element)
Definition package.cpp:468
UMLPackage::m_objects
UMLObjectList m_objects
Definition package.h:78
UMLPackage::~UMLPackage
virtual ~UMLPackage()
Definition package.cpp:47
UMLPackage::resolveRef
virtual bool resolveRef()
Definition package.cpp:425
UMLPackage::removeAssocFromConcepts
void removeAssocFromConcepts(UMLAssociation *assoc)
Definition package.cpp:110
UMLPackage::addAssocToConcepts
void addAssocToConcepts(UMLAssociation *assoc)
Definition package.cpp:82
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:14
umlentitylist.h
UMLEntityList
QList< UMLEntity * > UMLEntityList
Definition umlentitylist.h:14
UMLPackageList
QList< UMLPackage * > UMLPackageList
Definition umlpackagelist.h:13