| Summary: | add tcl code generator | ||
|---|---|---|---|
| Product: | [Applications] umbrello | Reporter: | Rene Meyer <rene.meyer> |
| Component: | general | Assignee: | Umbrello Development Group <umbrello-devel> |
| Status: | RESOLVED FIXED | ||
| Severity: | wishlist | ||
| Priority: | NOR | ||
| Version First Reported In: | unspecified | ||
| Target Milestone: | --- | ||
| Platform: | unspecified | ||
| OS: | Linux | ||
| Latest Commit: | Version Fixed/Implemented In: | ||
| Sentry Crash Report: | |||
| Attachments: | New TclWriter class | ||
|
Description
Rene Meyer
2005-07-26 10:57:07 UTC
Please consider contributing your proposed implementation. Created attachment 11978 [details]
New TclWriter class
The tclwriter.tgz contain a dir tclwriter/ with tclwriter.h and tclwriter.cpp
source files and patches for the Makefile.in and codegenfactory.cpp files.
Please add to the project codegenerators/ dir. Tell me if there are needed
documentation tasks.
SVN commit 440108 by okellogg: Add Tcl code generator by Rene Meyer (with minor touchups by me.) BUG:109636 M +2 -1 ChangeLog M +1 -0 THANKS M +27 -27 umbrello/codegenerators/Makefile.am M +7 -2 umbrello/codegenerators/codegenfactory.cpp A umbrello/codegenerators/tclwriter.cpp [License: GPL (v2+)] A umbrello/codegenerators/tclwriter.h [License: GPL (v2+)] --- branches/KDE/3.5/kdesdk/umbrello/ChangeLog #440107:440108 @@ -2,11 +2,12 @@ * Association classes * Advanced code generator for Ruby +* Code generator for Tcl * Externalization of folders (i.e. submodel files) * Change interface into class and vice versa (if abstract and no attributes) * Bugs fixed / wishes implemented (see http://bugs.kde.org) -57588 67719 72016 79433 87252 88117 97162 105564 108223 109591 +57588 67719 72016 79433 87252 88117 97162 105564 108223 109591 109636 Version 1.4.2 (maintenance release) --- branches/KDE/3.5/kdesdk/umbrello/THANKS #440107:440108 @@ -43,6 +43,7 @@ Thorsten Kunz <tk @bytecrash.net> Gustavo Madrigal <gmadrigal @nextphere.com> martin <mv123q3 @hotmail.com> +Rene Meyer <Rene.Meyer @sturmit.de> Laurent Montel <montel @kde.org> Lutz Mueller <lutz.mueller @gmx.de> Heiko Nardmann <heiko.nardmann @onlinehome.de> --- branches/KDE/3.5/kdesdk/umbrello/umbrello/codegenerators/Makefile.am #440107:440108 @@ -5,33 +5,33 @@ libcodegenerator_la_LDFLAGS = $(all_libraries) libcodegenerator_la_METASOURCES = AUTO libcodegenerator_la_SOURCES = codegenfactory.cpp classifierinfo.cpp \ - javacodegenerator.cpp javaantcodedocument.cpp javacodeclassfield.cpp \ - javaclassifiercodedocument.cpp javacodecomment.cpp javacodedocumentation.cpp \ - javacodeoperation.cpp javacodeaccessormethod.cpp \ - javaclassdeclarationblock.cpp javacodeclassfielddeclarationblock.cpp \ - javacodegenerationpolicy.cpp javacodegenerationpolicypage.cpp \ - javacodegenerationformbase.ui \ - cppcodegenerator.cpp cppcodedocumentation.cpp cppcodeclassfield.cpp \ - cppcodecomment.cpp cppmakecodedocument.cpp \ - cppsourcecodedocument.cpp cppsourcecodeoperation.cpp cppsourcecodeaccessormethod.cpp \ - cppsourcecodeclassfielddeclarationblock.cpp \ - cppheadercodedocument.cpp cppheaderclassdeclarationblock.cpp \ - cppheadercodeoperation.cpp cppheadercodeaccessormethod.cpp \ - cppheadercodeclassfielddeclarationblock.cpp \ - cppcodegenerationpolicy.cpp cppcodegenerationpolicypage.cpp \ - cppcodegenerationformbase.ui cppcodegenerationform.cpp \ - rubycodegenerator.cpp rubycodeclassfield.cpp \ - rubyclassifiercodedocument.cpp rubycodecomment.cpp rubycodedocumentation.cpp \ - rubycodeoperation.cpp rubycodeaccessormethod.cpp \ - rubyclassdeclarationblock.cpp rubycodeclassfielddeclarationblock.cpp \ - rubycodegenerationpolicy.cpp rubycodegenerationpolicypage.cpp \ - rubycodegenerationformbase.ui \ - simplecodegenerator.cpp \ - adawriter.cpp aswriter.cpp cppwriter.cpp javawriter.cpp jswriter.cpp \ - idlwriter.cpp perlwriter.cpp rubywriter.cpp \ - phpwriter.cpp php5writer.cpp pythonwriter.cpp sqlwriter.cpp xmlschemawriter.cpp \ - xmlelementcodeblock.cpp xmlcodecomment.cpp \ - codegen_utils.cpp + javacodegenerator.cpp javaantcodedocument.cpp javacodeclassfield.cpp \ + javaclassifiercodedocument.cpp javacodecomment.cpp javacodedocumentation.cpp \ + javacodeoperation.cpp javacodeaccessormethod.cpp \ + javaclassdeclarationblock.cpp javacodeclassfielddeclarationblock.cpp \ + javacodegenerationpolicy.cpp javacodegenerationpolicypage.cpp \ + javacodegenerationformbase.ui \ + cppcodegenerator.cpp cppcodedocumentation.cpp cppcodeclassfield.cpp \ + cppcodecomment.cpp cppmakecodedocument.cpp \ + cppsourcecodedocument.cpp cppsourcecodeoperation.cpp cppsourcecodeaccessormethod.cpp \ + cppsourcecodeclassfielddeclarationblock.cpp \ + cppheadercodedocument.cpp cppheaderclassdeclarationblock.cpp \ + cppheadercodeoperation.cpp cppheadercodeaccessormethod.cpp \ + cppheadercodeclassfielddeclarationblock.cpp \ + cppcodegenerationpolicy.cpp cppcodegenerationpolicypage.cpp \ + cppcodegenerationformbase.ui cppcodegenerationform.cpp \ + rubycodegenerator.cpp rubycodeclassfield.cpp \ + rubyclassifiercodedocument.cpp rubycodecomment.cpp rubycodedocumentation.cpp \ + rubycodeoperation.cpp rubycodeaccessormethod.cpp \ + rubyclassdeclarationblock.cpp rubycodeclassfielddeclarationblock.cpp \ + rubycodegenerationpolicy.cpp rubycodegenerationpolicypage.cpp \ + rubycodegenerationformbase.ui \ + simplecodegenerator.cpp \ + adawriter.cpp aswriter.cpp cppwriter.cpp javawriter.cpp jswriter.cpp \ + idlwriter.cpp perlwriter.cpp phpwriter.cpp php5writer.cpp pythonwriter.cpp \ + rubywriter.cpp sqlwriter.cpp tclwriter.cpp xmlschemawriter.cpp \ + xmlelementcodeblock.cpp xmlcodecomment.cpp \ + codegen_utils.cpp libcodegenerator_la_COMPILE_FIRST = ../dialogs/codegenerationpolicybase.h KDE_OPTIONS = nofinal --- branches/KDE/3.5/kdesdk/umbrello/umbrello/codegenerators/codegenfactory.cpp #440107:440108 @@ -26,7 +26,6 @@ #include "rubycodegenerator.h" #include "xmlschemawriter.h" -// the old #include "adawriter.h" #include "cppwriter.h" // #include "cswriter.h" // missing in action?!? @@ -40,6 +39,7 @@ #include "sqlwriter.h" #include "aswriter.h" #include "jswriter.h" +#include "tclwriter.h" #include "qstringlist.h" #include <kdebug.h> @@ -55,8 +55,8 @@ kdDebug()<<"Querying languages available"<<endl; QStringList l; + l.append("ActionScript"); l.append("Ada"); - l.append("ActionScript"); l.append("Cpp"); // l.append("C#"); l.append("IDL"); @@ -68,6 +68,7 @@ l.append("Python"); l.append("Ruby"); l.append("SQL"); + l.append("Tcl"); l.append("XMLSchema"); return l; } @@ -102,6 +103,8 @@ return "RubyWriter"; if (l == "SQL") return "SQLWriter"; + if (l == "Tcl") + return "TclWriter"; if (l == "XMLSchema") return "XMLSchemaWriter"; //else... @@ -150,6 +153,8 @@ obj = new RubyWriter(doc, name); } else if (cname == "SQLWriter") { obj = new SQLWriter( doc, name); + } else if (cname == "TclWriter") { + obj = new TclWriter( doc, name); } else if (cname == "XMLSchemaWriter") { obj = new XMLSchemaWriter( doc, name); } else { SVN commit 603939 by okellogg:
writeHeaderFile(): Call template_params.next(), else we spin to death.
writeAssociationIncl(): TODO: classifier is always NULL in the else case.
CCBUG:109636
M +5 -1 tclwriter.cpp
--- branches/KDE/3.5/kdesdk/umbrello/umbrello/codegenerators/tclwriter.cpp #603938:603939
@@ -230,7 +230,8 @@
UMLTemplateList template_params = c->getTemplateList();
if (template_params.count()) {
writeCode("#TODO template<");
- for (UMLTemplate * t = template_params.first(); t;) {
+ for (UMLTemplate * t = template_params.first(); t;
+ t = template_params.next()) {
QString formalName = t->getName();
QString typeName = t->getTypeName();
writeCode(typeName + "# " + formalName);
@@ -409,8 +410,11 @@
writeCode("namespace eval " + cleanName(classifier->getName()) +
" {}");
} else {
+ // CHECK: This crashes (classifier still NULL from above)
+ /*
writeCode("namespace eval " + cleanName(classifier->getPackage()) +
"::" + cleanName(classifier->getName()) + " {}");
+ */
}
}
}
|