[Uml-devel] branches/KDE/3.5/kdesdk/umbrello/umbrello

Oliver Kellogg okellogg at users.sourceforge.net
Mon Aug 21 16:58:17 UTC 2006


SVN commit 575546 by okellogg:

cosmetics

 M  +0 -3      actor.h  
 M  +1 -2      classifier.cpp  
 M  +1 -6      classifier.h  
 M  +0 -5      component.h  
 M  +0 -5      datatype.h  
 M  +1 -6      entity.h  
 M  +0 -5      node.h  
 M  +2 -9      stereotype.cpp  
 M  +10 -12    stereotype.h  


--- branches/KDE/3.5/kdesdk/umbrello/umbrello/actor.h #575545:575546
@@ -22,9 +22,6 @@
  * This class inherits from @ref UMLCanvasObject which contains most of the
  * information.
  * The @ref UMLDoc class creates instances of this type.
- * All Actors will need a unique id.  This will be given by the @ref UMLDoc
- * class.  If you don't leave it up to the @ref UMLDoc class then call the
- * method @ref UMLDoc::getUniqueID to get a unique id.
  *
  * @short Information for a non-graphical UML Actor.
  * @author Paul Hensgen <phensgen at techie.com>
--- branches/KDE/3.5/kdesdk/umbrello/umbrello/classifier.cpp #575545:575546
@@ -476,7 +476,7 @@
     return false; //shutup compiler warning
 }
 
-UMLObject* UMLClassifier::createAttribute(const QString &name /*=null*/) {
+UMLAttribute* UMLClassifier::createAttribute(const QString &name /*=null*/) {
     UMLDoc *umldoc = UMLApp::app()->getDocument();
     Uml::IDType id = umldoc->getUniqueID();
     QString currentName;
@@ -524,7 +524,6 @@
         if (obj->getBaseType() == Uml::ot_Attribute && obj->getName() == name)
             return static_cast<UMLAttribute*>(obj);
     }
-    UMLApp *app = UMLApp::app();
     Uml::Visibility scope = Settings::getOptionState().classState.defaultAttributeScope;
     UMLAttribute *a = new UMLAttribute(this, name, id, scope);
     m_List.append(a);
--- branches/KDE/3.5/kdesdk/umbrello/umbrello/classifier.h #575545:575546
@@ -30,11 +30,6 @@
  * This class inherits from @ref UMLPackage which allows classifiers
  * to also act as namespaces, i.e. it allows classifiers to nest.
  *
- * The @ref UMLDoc class creates instances of this type.  All Classifiers
- * need a unique id.  This will be given by the @ref UMLDoc class.  If you
- * don't leave it up to the @ref UMLDoc class then call the method @ref
- * UMLDoc::getUniqueID to get a unique id.
- *
  * @short Information for a non-graphical Concept/Class.
  * @author Paul Hensgen <phensgen at techie.com>
  * Bugs and comments to uml-devel at lists.sf.net or http://bugs.kde.org
@@ -87,7 +82,7 @@
      * @param name  An optional name, used by when creating through UMLListView
      * @return  The UMLAttribute created
      */
-    virtual UMLObject* createAttribute(const QString &name = QString::null);
+    virtual UMLAttribute* createAttribute(const QString &name = QString::null);
 
     /**
      * Adds an attribute to the class.
--- branches/KDE/3.5/kdesdk/umbrello/umbrello/component.h #575545:575546
@@ -22,11 +22,6 @@
  * This class inherits from @ref UMLPackage which contains most
  * of the information.
  *
- * The @ref UMLDoc class creates instances of this type.
- * All Components will need a unique id.  This will be given by the
- * @ref UMLDoc class.  If you don't leave it up to the @ref UMLDoc
- * class then call the method @ref UMLDoc::getUniqueID to get a unique id.
- *
  * @short Non-graphical information for a Component.
  * @author Jonathan Riddell
  * @see UMLCanvasObject
--- branches/KDE/3.5/kdesdk/umbrello/umbrello/datatype.h #575545:575546
@@ -25,11 +25,6 @@
  * This class inherits from @ref UMLClassifier which contains most of the
  * information.
  *
- * The @ref UMLDoc class creates instances of this type.  All Datatypes
- * will need a unique id.  This will be given by the @ref UMLDoc class.
- * If you don't leave it up to the @ref UMLDoc class then call the method
- * @ref UMLDoc::getUniqueID to get a unique id.
- *
  * @short Information for a non-graphical Datatype.
  * @author Jonathan Riddell
  * Bugs and comments to uml-devel at lists.sf.net or http://bugs.kde.org
--- branches/KDE/3.5/kdesdk/umbrello/umbrello/entity.h #575545:575546
@@ -22,11 +22,6 @@
  * This class inherits from @ref UMLClassifier which contains most of the
  * information.
  *
- * The @ref UMLDoc class creates instances of this type.  All Entitys
- * will need a unique id.  This will be given by the @ref UMLDoc class.
- * If you don't leave it up to the @ref UMLDoc class then call the method
- * @ref UMLDoc::getUniqueID to get a unique id.
- *
  * @short Non-graphical Information for an Entity.
  * @author Jonathan Riddell
  * Bugs and comments to uml-devel at lists.sf.net or http://bugs.kde.org
@@ -71,7 +66,7 @@
      * @param name  An optional name, used by when creating through UMLListView
      * @return  The UMLEntityAttribute created
      */
-    UMLObject* createAttribute(const QString &name = QString::null);
+    UMLAttribute* createAttribute(const QString &name = QString::null);
 
     /**
          * Adds an entityAttribute to the entity.
--- branches/KDE/3.5/kdesdk/umbrello/umbrello/node.h #575545:575546
@@ -24,11 +24,6 @@
  * This class inherits from @ref UMLCanvasObject which contains most of the
  * information.
  *
- * The @ref UMLDoc class creates instances of this type.  All Nodes will
- * need a unique id.  This will be given by the @ref UMLDoc class.
- * If you don't leave it up to the @ref UMLDoc class then call the method
- * @ref UMLDoc::getUniqueID to get a unique id.
- *
  * @short Non-graphical information for a Node.
  * @author Jonathan Riddell
  * @see UMLCanvasObject
--- branches/KDE/3.5/kdesdk/umbrello/umbrello/stereotype.cpp #575545:575546
@@ -1,8 +1,3 @@
-/*
- *  copyright (C) 2003-2004
- *  Umbrello UML Modeller Authors <uml-devel@ uml.sf.net>
- */
-
 /***************************************************************************
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
@@ -10,6 +5,8 @@
  *   the Free Software Foundation; either version 2 of the License, or     *
  *   (at your option) any later version.                                   *
  *                                                                         *
+ *   copyright (C) 2003-2006                                               *
+ *   Umbrello UML Modeller Authors <uml-devel@ uml.sf.net>                 *
  ***************************************************************************/
 
 
@@ -66,10 +63,6 @@
     qElement.appendChild( stereotypeElement );
 }
 
-bool UMLStereotype::load(QDomElement& /*element*/) {
-    return true;
-}
-
 bool UMLStereotype::showPropertiesDialogue(QWidget* parent) {
     bool ok;
     QString name = KInputDialog::getText(i18n("Stereotype"), i18n("Enter name:"), getName(),&ok, parent);
--- branches/KDE/3.5/kdesdk/umbrello/umbrello/stereotype.h #575545:575546
@@ -1,8 +1,3 @@
-/*
- *  copyright (C) 2003-2004
- *  Umbrello UML Modeller Authors <uml-devel@ uml.sf.net>
- */
-
 /***************************************************************************
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
@@ -10,6 +5,8 @@
  *   the Free Software Foundation; either version 2 of the License, or     *
  *   (at your option) any later version.                                   *
  *                                                                         *
+ *   copyright (C) 2003-2006                                               *
+ *   Umbrello UML Modeller Authors <uml-devel@ uml.sf.net>                 *
  ***************************************************************************/
 
 #ifndef STEREOTYPE_H
@@ -24,6 +21,7 @@
  *
  * @short Sets up stereotype information.
  * @author Jonathan Riddell
+ * @author Oliver Kellogg
  * Bugs and comments to uml-devel at lists.sf.net or http://bugs.kde.org
  */
 
@@ -34,15 +32,11 @@
      *
      * @param name              The name of this UMLStereotype.
      * @param id                The unique id given to this UMLStereotype.
-     * @param listType  The list which this stereotype is part of
-     *                  (attribute, operation etc)
      */
     UMLStereotype(const QString &name, Uml::IDType id = Uml::id_None);
 
     /**
      * Sets up a stereotype.
-     *
-     * @param parent    The parent of this UMLStereotype.
      */
     UMLStereotype();
 
@@ -95,10 +89,14 @@
 
 protected:
     /**
-     * Loads a <UML:StereoType> XMI element.
+     * Each stereotype object is reference counted, i.e. client code
+     * manages it such that it comes into existence as soon as there is
+     * at least one user, and ceases existing when the number of users
+     * drops to 0.
+     * m_refCount reflects the number of users.  It is externally managed,
+     * i.e. client code must take care to call incrRefCount() and
+     * decrRefCount() as appropriate.
      */
-    bool load(QDomElement& element);
-
     int m_refCount;
 };
 




More information about the umbrello-devel mailing list