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

Public Member Functions | |
| UMLPackage (const QString &name=QString(), Uml::IDType id=Uml::id_None) | |
| virtual | ~UMLPackage () |
| void | addAssocToConcepts (UMLAssociation *assoc) |
| bool | addObject (UMLObject *pObject) |
| void | appendClasses (UMLClassifierList &classes, bool includeNested=true) |
| void | appendClassesAndInterfaces (UMLClassifierList &classifiers, bool includeNested=true) |
| void | appendClassifiers (UMLClassifierList &classifiers, bool includeNested=true) |
| void | appendEntities (UMLEntityList &entities, bool includeNested=true) |
| void | appendInterfaces (UMLClassifierList &interfaces, bool includeNested=true) |
| void | appendPackages (UMLPackageList &packages, bool includeNested=true) |
| virtual UMLObject * | clone () const |
| UMLObjectList | containedObjects () |
| virtual void | copyInto (UMLObject *lhs) const |
| UMLObject * | findObject (const QString &name) |
| UMLObject * | findObjectById (Uml::IDType id) |
| virtual void | removeAllObjects () |
| void | removeAssocFromConcepts (UMLAssociation *assoc) |
| void | removeObject (UMLObject *pObject) |
| virtual bool | resolveRef () |
| virtual void | saveToXMI (QDomDocument &qDoc, QDomElement &qElement) |
Protected Member Functions | |
| virtual bool | load (QDomElement &element) |
Protected Attributes | |
| UMLObjectList | m_objects |
Detailed Description
This class contains the non-graphical information required for a UML Package.
This class inherits from UMLCanvasObject which contains most of the information.
Non-graphical information for a Package.
- See also:
- UMLCanvasObject Bugs and comments to uml-devel@lists.sf.net or http://bugs.kde.org
Definition at line 32 of file package.h.
Constructor & Destructor Documentation
| UMLPackage::UMLPackage | ( | const QString & | name = QString(), |
|
| Uml::IDType | id = Uml::id_None | |||
| ) | [explicit] |
Sets up a Package.
- Parameters:
-
name The name of the Concept. id The unique id of the Concept.
Definition at line 36 of file package.cpp.
| UMLPackage::~UMLPackage | ( | ) | [virtual] |
Destructor.
Definition at line 45 of file package.cpp.
Member Function Documentation
| void UMLPackage::addAssocToConcepts | ( | UMLAssociation * | assoc | ) |
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.
- Parameters:
-
assoc the association to add
Definition at line 80 of file package.cpp.
| bool UMLPackage::addObject | ( | UMLObject * | pObject | ) |
Adds an object in this package.
- Parameters:
-
pObject Pointer to the UMLObject to add.
- Returns:
- True if the object was actually added.
Definition at line 130 of file package.cpp.
| void UMLPackage::appendClasses | ( | UMLClassifierList & | classes, | |
| bool | includeNested = true | |||
| ) |
Append all classes from this package (and those from nested packages) to the given UMLClassifierList.
- Parameters:
-
classes The list to append to. includeNested Whether to include the classes from nested packages (default: true.)
Definition at line 316 of file package.cpp.
| void UMLPackage::appendClassesAndInterfaces | ( | UMLClassifierList & | classifiers, | |
| bool | includeNested = true | |||
| ) |
Append all classes and interfaces from this package (and those from nested packages) to the given UMLClassifierList.
- Parameters:
-
classifiers The list to append to. includeNested Whether to include the classifiers from nested packages (default: true.)
Definition at line 364 of file package.cpp.
| void UMLPackage::appendClassifiers | ( | UMLClassifierList & | classifiers, | |
| bool | includeNested = true | |||
| ) |
Append all classifiers from this package (and those from nested packages) to the given UMLClassifierList.
- Parameters:
-
classifiers The list to append to. includeNested Whether to include the classifiers from nested packages (default: true.)
Definition at line 292 of file package.cpp.
| void UMLPackage::appendEntities | ( | UMLEntityList & | entities, | |
| bool | includeNested = true | |||
| ) |
Append all entities from this package (and those from nested packages) to the given UMLEntityList.
- Parameters:
-
entities The list to append to. includeNested Whether to include the entities from nested packages (default: true.)
Definition at line 340 of file package.cpp.
| void UMLPackage::appendInterfaces | ( | UMLClassifierList & | interfaces, | |
| bool | includeNested = true | |||
| ) |
Append all interfaces from this package (and those from nested packages) to the given UMLClassifierList.
- Parameters:
-
interfaces The list to append to. includeNested Whether to include the interfaces from nested packages (default: true.)
Definition at line 388 of file package.cpp.
| void UMLPackage::appendPackages | ( | UMLPackageList & | packages, | |
| bool | includeNested = true | |||
| ) |
Append all packages from this packaed ( and those from nested packeges) to the given UMLPackageList.
- Parameters:
-
packages The list to append to includeNested Whether to include the packages from nested packages (default:true)
Definition at line 269 of file package.cpp.
| UMLObject * UMLPackage::clone | ( | ) | const [virtual] |
Make a clone of this object.
Implements UMLObject.
Reimplemented in UMLClassifier, UMLComponent, UMLEntity, UMLEnum, and UMLFolder.
Definition at line 64 of file package.cpp.
| UMLObjectList UMLPackage::containedObjects | ( | ) |
Returns the list of objects contained in this package.
Definition at line 224 of file package.cpp.
| void UMLPackage::copyInto | ( | UMLObject * | lhs | ) | const [virtual] |
Copy the internal presentation of this object into the new object.
Reimplemented from UMLCanvasObject.
Reimplemented in UMLClassifier, UMLEntity, and UMLEnum.
Definition at line 52 of file package.cpp.
Find the object of the given name in the list of contained objects.
- Parameters:
-
name The name to seek.
- Returns:
- Pointer to the UMLObject found or NULL if not found.
Definition at line 235 of file package.cpp.
| UMLObject * UMLPackage::findObjectById | ( | Uml::IDType | id | ) |
Find the object of the given ID in the list of contained objects.
- Parameters:
-
id The ID to seek.
- Returns:
- Pointer to the UMLObject found or NULL if not found.
Definition at line 256 of file package.cpp.
| bool UMLPackage::load | ( | QDomElement & | element | ) | [protected, virtual] |
Loads the <UML:Package> XMI element.
Auxiliary to UMLObject::loadFromXMI.
Reimplemented from UMLObject.
Reimplemented in UMLClassifier, UMLComponent, UMLEntity, UMLEnum, and UMLFolder.
Definition at line 454 of file package.cpp.
| void UMLPackage::removeAllObjects | ( | ) | [virtual] |
Removes all objects from this package.
Inner containers (e.g. nested packages) are removed recursively.
Definition at line 205 of file package.cpp.
| void UMLPackage::removeAssocFromConcepts | ( | UMLAssociation * | assoc | ) |
Remove the association from the participating concepts.
- Parameters:
-
assoc the association to remove
Definition at line 108 of file package.cpp.
| void UMLPackage::removeObject | ( | UMLObject * | pObject | ) |
Removes an object from this package.
Does not physically delete the object.
- Parameters:
-
pObject Pointer to the UMLObject to be removed.
Definition at line 187 of file package.cpp.
| bool UMLPackage::resolveRef | ( | ) | [virtual] |
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.
- Returns:
- True for overall success.
Reimplemented from UMLCanvasObject.
Reimplemented in UMLClassifier, and UMLEntity.
Definition at line 412 of file package.cpp.
| void UMLPackage::saveToXMI | ( | QDomDocument & | qDoc, | |
| QDomElement & | qElement | |||
| ) | [virtual] |
Creates the <UML:Package> XMI element.
Implements UMLObject.
Reimplemented in UMLClassifier, UMLComponent, UMLEntity, UMLEnum, and UMLFolder.
Definition at line 430 of file package.cpp.
Member Data Documentation
UMLObjectList UMLPackage::m_objects [protected] |
References to the objects contained in this package.
The UMLPackage is the owner of the objects.
The documentation for this class was generated from the following files:
KDE 4.4 API Reference