umbrello/umbrello
package.h
Go to the documentation of this file.00001 /*************************************************************************** 00002 * * 00003 * This program is free software; you can redistribute it and/or modify * 00004 * it under the terms of the GNU General Public License as published by * 00005 * the Free Software Foundation; either version 2 of the License, or * 00006 * (at your option) any later version. * 00007 * * 00008 * copyright (C) 2003-2006 * 00009 * Umbrello UML Modeller Authors <uml-devel@uml.sf.net> * 00010 ***************************************************************************/ 00011 00012 #ifndef PACKAGE_H 00013 #define PACKAGE_H 00014 00015 #include "umlcanvasobject.h" 00016 #include "umlclassifierlist.h" 00017 #include "umlentitylist.h" 00018 00019 // forward declarations 00020 class UMLAssociation; 00021 00022 00035 class UMLPackage : public UMLCanvasObject 00036 { 00037 Q_OBJECT 00038 public: 00045 explicit UMLPackage(const QString & name = QString(), Uml::IDType id = Uml::id_None); 00046 00050 virtual ~UMLPackage(); 00051 00056 virtual void copyInto(UMLObject *lhs) const; 00057 00061 virtual UMLObject* clone() const; 00062 00069 bool addObject(UMLObject *pObject); 00070 00077 void removeObject(UMLObject *pObject); 00078 00083 virtual void removeAllObjects(); 00084 00088 UMLObjectList containedObjects(); 00089 00099 void addAssocToConcepts(UMLAssociation* assoc); 00100 00104 void removeAssocFromConcepts(UMLAssociation *assoc); 00105 00112 UMLObject * findObject(const QString &name); 00113 00120 UMLObject * findObjectById(Uml::IDType id); 00121 00122 00131 void appendPackages(UMLPackageList& packages, bool includeNested = true); 00132 00141 void appendClassifiers( UMLClassifierList& classifiers, 00142 bool includeNested = true ); 00143 00152 void appendClasses( UMLClassifierList& classes, bool includeNested = true ); 00153 00162 void appendClassesAndInterfaces(UMLClassifierList& classifiers, 00163 bool includeNested = true); 00164 00173 void appendEntities(UMLEntityList& entities, 00174 bool includeNested = true); 00175 00184 void appendInterfaces(UMLClassifierList& interfaces, 00185 bool includeNested = true ); 00186 00195 virtual bool resolveRef(); 00196 00200 virtual void saveToXMI(QDomDocument& qDoc, QDomElement& qElement); 00201 00202 protected: 00207 virtual bool load(QDomElement& element); 00208 00213 UMLObjectList m_objects; 00214 00215 }; 00216 00217 #endif
KDE 4.0 API Reference