[Uml-devel] kdesdk/umbrello/umbrello
Oliver Kellogg
okellogg at users.sourceforge.net
Sun Nov 9 08:00:07 UTC 2003
CVS commit by okellogg:
isEnumeration(): Support <<enum>>.
Document that UMLEnum is now the preferred construct for enums.
M +6 -1 class.cpp 1.21
M +4 -1 class.h 1.17
--- kdesdk/umbrello/umbrello/class.cpp #1.20:1.21
@@ -249,5 +249,10 @@ UMLObject* UMLClass::findChildObject(int
bool UMLClass::isEnumeration() {
QString st = getStereotype();
- return st == "Enumeration" || st == "enumeration" || st == "CORBAEnum";
+ if (st == "CORBAEnum")
+ return true;
+ if (st.isEmpty() || st.at(0).upper() != 'E')
+ return false;
+ QString tail = st.right(st.length() - 1);
+ return (tail == "num" || tail == "numeration");
}
////////////////////////////////////////////////////////////////////////////////////////////////////
--- kdesdk/umbrello/umbrello/class.h #1.16:1.17
@@ -210,6 +210,9 @@ public:
/**
* Return true if this class has an enumeration stereotype.
+ * Notice that since Umbrello now has a proper Enum construct,
+ * it is no longer necessary to use stereotypes to produce
+ * enumerations.
* Currently the following stereotypes are supported:
- * <<Enumeration>> <<enumeration>> <<CORBAEnum>>
+ * <<enum>> <<Enumeration>> <<enumeration>> <<CORBAEnum>>
*
* @return True if this class has an enumeration stereotype.
More information about the umbrello-devel
mailing list