UMLPackage Class Reference
This class contains the non-graphical information required for a UML Package. Non-graphical information for a Package. More...
#include <package.h>
Inheritance diagram for UMLPackage:

Public Member Functions | |
| UMLPackage (const QString &name="", Uml::IDType id=Uml::id_None) | |
| Sets up a Package. | |
| virtual | ~UMLPackage () |
| Empty deconstructor. | |
| virtual void | copyInto (UMLPackage *rhs) const |
| Copy the internal presentation of this object into the new object. | |
| virtual UMLObject * | clone () const |
| Make a clone of this object. | |
| void | init () |
| Initializes key variables of the class. | |
| bool | addObject (UMLObject *pObject) |
| Adds an object in this package. | |
| void | removeObject (UMLObject *pObject) |
| Removes an object from this package. | |
| virtual void | removeAllObjects () |
| Removes all objects from this package. | |
| UMLObjectList | containedObjects () |
| Returns the list of objects contained in this package. | |
| void | addAssocToConcepts (UMLAssociation *assoc) |
| Adds an existing association to the matching concept in the list of concepts. | |
| void | removeAssocFromConcepts (UMLAssociation *assoc) |
| Remove the association from the participating concepts. | |
| UMLObject * | findObject (const QString &name) |
| Find the object of the given name in the list of contained objects. | |
| UMLObject * | findObjectById (Uml::IDType id) |
| Find the object of the given ID in the list of contained objects. | |
| void | appendClassifiers (UMLClassifierList &classifiers, bool includeNested=true) |
| Append all classifiers from this package (and those from nested packages) to the given UMLClassifierList. | |
| void | appendClasses (UMLClassifierList &classes, bool includeNested=true) |
| Append all classes from this package (and those from nested packages) to the given UMLClassifierList. | |
| void | appendClassesAndInterfaces (UMLClassifierList &classifiers, bool includeNested=true) |
| Append all classes and interfaces from this package (and those from nested packages) to the given UMLClassifierList. | |
| void | appendInterfaces (UMLClassifierList &interfaces, bool includeNested=true) |
| Append all interfaces from this package (and those from nested packages) to the given UMLClassifierList. | |
| virtual bool | resolveRef () |
| Resolve types. | |
| virtual void | saveToXMI (QDomDocument &qDoc, QDomElement &qElement) |
| Creates the <UML:Package> XMI element. | |
Protected Member Functions | |
| virtual bool | load (QDomElement &element) |
| Loads the <UML:Package> XMI element. | |
Protected Attributes | |
| UMLObjectList | m_objects |
| References to the objects contained in this package. | |
Detailed Description
This class contains the non-graphical information required for a UML Package. Non-graphical information for a Package.This class inherits from UMLCanvasObject which contains most of the information.
- Author:
- Jonathan Riddell
- See also:
- UMLCanvasObject Bugs and comments to uml-devel@lists.sf.net or http://bugs.kde.org
Definition at line 34 of file package.h.
Constructor & Destructor Documentation
|
||||||||||||
|
Sets up a Package.
Definition at line 31 of file package.cpp. References init(). Referenced by clone(). |
|
|
Empty deconstructor.
Definition at line 36 of file package.cpp. |
Member Function Documentation
|
|
Copy the internal presentation of this object into the new object.
Definition at line 43 of file package.cpp. References UMLObjectList::copyInto(), UMLCanvasObject::copyInto(), and m_objects. Referenced by clone(). |
|
|
Make a clone of this object.
Implements UMLObject. Reimplemented in UMLClassifier, UMLComponent, UMLEntity, UMLEnum, and UMLFolder. Definition at line 50 of file package.cpp. References clone(), copyInto(), and UMLPackage(). Referenced by clone(). |
|
|
Initializes key variables of the class.
Reimplemented from UMLCanvasObject. Reimplemented in UMLComponent, and UMLFolder. Definition at line 39 of file package.cpp. Referenced by UMLClassifier::UMLClassifier(), UMLEntity::UMLEntity(), UMLEnum::UMLEnum(), and UMLPackage(). |
|
|
Adds an object in this package.
Definition at line 97 of file package.cpp. References addAssocToConcepts(), UMLObject::getName(), UMLAssociation::getObject(), UMLObject::getUMLPackage(), and m_objects. Referenced by UMLDoc::addAssociation(), UMLListView::addAtContainer(), UMLDoc::addUMLObject(), UMLDoc::closeDocument(), UMLListView::createUMLObject(), UMLDoc::init(), UMLComponent::load(), UMLObject::loadFromXMI(), UMLDoc::loadUMLObjectsFromXMI(), and UMLListView::moveObject(). |
|
|
Removes an object from this package. Does not physically delete the object.
Definition at line 126 of file package.cpp. References m_objects, and removeAssocFromConcepts(). Referenced by Import_Utils::createUMLObject(), load(), UMLFolder::load(), UMLClassifier::load(), UMLListView::moveObject(), removeAllObjects(), UMLDoc::removeAssociation(), and UMLDoc::removeUMLObject(). |
|
|
Removes all objects from this package. Inner containers (e.g. nested packages) are removed recursively. Definition at line 139 of file package.cpp. References m_objects, and removeObject(). Referenced by UMLDoc::closeDocument(). |
|
|
Returns the list of objects contained in this package.
Definition at line 153 of file package.cpp. References m_objects. Referenced by UMLView::createAutoAssociations(), UMLDoc::createDatatype(), UMLListView::deleteItem(), UMLDoc::findUMLObject(), Model_Utils::findUMLObject(), and UMLDoc::getDatatypes(). |
|
|
Adds an existing association to the matching concept in the list of concepts. The selection of the matching concept depends on the association type: For generalizations, the assoc is added to the concept that matches role A. For aggregations and compositions , the assoc is added to the concept that matches role B.
Definition at line 58 of file package.cpp. References UMLCanvasObject::addAssociationEnd(), UMLObject::getID(), UMLObject::getName(), UMLCanvasObject::hasAssociation(), and m_objects. Referenced by addObject(), and UMLAssociation::resolveRef(). |
|
|
Remove the association from the participating concepts.
Definition at line 82 of file package.cpp. References UMLCanvasObject::hasAssociation(), m_objects, and UMLCanvasObject::removeAssociationEnd(). Referenced by removeObject(). |
|
|
Find the object of the given name in the list of contained objects.
Definition at line 157 of file package.cpp. References UMLApp::activeLanguageIsCaseSensitive(), UMLObject::getName(), and m_objects. Referenced by UMLDoc::findUMLObject(), and UMLListView::isUnique(). |
|
|
Find the object of the given ID in the list of contained objects.
Definition at line 171 of file package.cpp. References Model_Utils::findObjectInList(), and m_objects. Referenced by UMLDoc::findObjectById(). |
|
||||||||||||
|
Append all classifiers from this package (and those from nested packages) to the given UMLClassifierList.
Definition at line 175 of file package.cpp. References UMLObject::getBaseType(), and m_objects. Referenced by UMLDoc::getConcepts(). |
|
||||||||||||
|
Append all classes from this package (and those from nested packages) to the given UMLClassifierList.
Definition at line 190 of file package.cpp. References UMLObject::getBaseType(), and m_objects. Referenced by UMLDoc::getClasses(). |
|
||||||||||||
|
Append all classes and interfaces from this package (and those from nested packages) to the given UMLClassifierList.
Definition at line 205 of file package.cpp. References UMLObject::getBaseType(), and m_objects. Referenced by UMLDoc::getClassesAndInterfaces(). |
|
||||||||||||
|
Append all interfaces from this package (and those from nested packages) to the given UMLClassifierList.
Definition at line 220 of file package.cpp. References UMLObject::getBaseType(), and m_objects. Referenced by UMLDoc::getInterfaces(). |
|
|
Resolve types. Required when dealing with foreign XMI files. Needs to be called after all UML objects are loaded from file. Overrides the method from UMLObject. Calls resolveRef() on each contained object.
Reimplemented from UMLCanvasObject. Reimplemented in UMLClassifier, and UMLEntity. Definition at line 235 of file package.cpp. References UMLObject::getBaseType(), m_objects, UMLObject::resolveRef(), and UMLCanvasObject::resolveRef(). Referenced by UMLClassifier::resolveRef(), and UMLDoc::resolveTypes(). |
|
||||||||||||
|
Creates the <UML:Package> XMI element.
Implements UMLObject. Reimplemented in UMLClassifier, UMLComponent, UMLEntity, UMLEnum, and UMLFolder. Definition at line 249 of file package.cpp. References m_objects, UMLObject::save(), and UMLObject::saveToXMI(). Referenced by UMLDoc::saveToXMI(). |
|
|
Loads the <UML:Package> XMI element. Auxiliary to UMLObject::loadFromXMI. Reimplemented from UMLObject. Reimplemented in UMLClassifier, UMLComponent, UMLEntity, UMLEnum, and UMLFolder. Definition at line 264 of file package.cpp. References UMLObject::loadFromXMI(), removeObject(), UMLObject::setUMLPackage(), and Uml::tagEq(). |
Member Data Documentation
|
|
References to the objects contained in this package. The UMLPackage is the owner of the objects. Definition at line 194 of file package.h. Referenced by addAssocToConcepts(), addObject(), appendClasses(), appendClassesAndInterfaces(), appendClassifiers(), appendInterfaces(), containedObjects(), copyInto(), findObject(), findObjectById(), removeAllObjects(), removeAssocFromConcepts(), removeObject(), resolveRef(), and saveToXMI(). |
The documentation for this class was generated from the following files:
