[Uml-devel] kdesdk/umbrello/umbrello

Sebastian Stein seb.kde at hpfsc.de
Sun May 4 11:57:08 UTC 2003


CVS commit by sstein: 

patch by Oliver Kellogg:

The stereotypes <<Enumeration>>, <<enumeration>>, and <<CORBAEnum>> are commonly used for denoting enumeration types.

I have added logic to AdaWriter and CppWriter to evaluate the stereotype and generate the corresponding programming language enumeration type.


  M +6 -0      class.cpp   1.4
  M +7 -0      class.h   1.3


--- kdesdk/umbrello/umbrello/class.h  #1.2:1.3
@@ -149,4 +149,11 @@ public:
 
         /**
+         * Return true if this class has an enumeration stereotype.
+         * Currently the following stereotypes are supported:
+         * <<Enumeration>>  <<enumeration>>  <<CORBAEnum>>
+         */
+        bool isEnumeration();
+
+        /**
          * Use to save or load this classes information
          *

--- kdesdk/umbrello/umbrello/class.cpp  #1.3:1.4
@@ -172,4 +172,10 @@ UMLObject* UMLClass::findChildObject(int
 
 ////////////////////////////////////////////////////////////////////////////////////////////////////
+bool UMLClass::isEnumeration() {
+        QString st = getStereotype();
+        return st == "Enumeration" || st == "enumeration" || st == "CORBAEnum";
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
 bool UMLClass::serialize(QDataStream *s, bool archive, int fileversion) {
         bool status = UMLObject::serialize(s, archive, fileversion);






More information about the umbrello-devel mailing list