[Uml-devel] kdesdk/umbrello/umbrello/codegenerators
Oliver Kellogg
Oliver.Kellogg at t-online.de
Thu May 8 11:52:43 UTC 2003
CVS commit by okellogg:
Use the new method CodeGenerator::overwritableName().
M +17 -19 adawriter.cpp 1.8
--- kdesdk/umbrello/umbrello/codegenerators/adawriter.cpp #1.7:1.8
@@ -84,5 +84,5 @@ bool AdaWriter::isOOClass(UMLClassifier
return true;
UMLClass *cl = dynamic_cast<UMLClass *>(c);
- if (cl->isEnumeration())
+ if (cl && cl->isEnumeration())
return false;
@@ -147,9 +147,9 @@ void AdaWriter::writeClass(UMLClassifier
UMLClass * myClass = dynamic_cast<UMLClass*>(c);
QString classname = cleanName(c->getName());
- QString fileName = c->getName().lower();
- fileName.replace(QRegExp("."), "-");
+ QString fileName = qualifiedName(c).lower();
+ fileName.replace('.', '-');
//find an appropriate name for our file
- fileName = findFileName(c, ".ads");
+ fileName = overwritableName(c, fileName, ".ads");
if (!fileName) {
emit codeGenerated(c, false);
@@ -191,6 +191,5 @@ void AdaWriter::writeClass(UMLClassifier
if (stype == "CORBAConstant") {
ada << spc() << "-- " << stype << " is Not Yet Implemented\n\n";
- } else if(stype == "CORBAEnum") {
- if(myClass) {
+ } else if (myClass && myClass->isEnumeration()) {
QPtrList<UMLAttribute> *atl = myClass->getAttList();
UMLAttribute *at;
@@ -206,5 +205,4 @@ void AdaWriter::writeClass(UMLClassifier
indentlevel--;
ada << ");\n\n";
- }
} else if(stype == "CORBAStruct") {
if(myClass) {
More information about the umbrello-devel
mailing list