[Uml-devel] kdesdk/umbrello/umbrello/codegenerators
Sebastian Stein
seb.kde at hpfsc.de
Thu May 15 09:42:09 UTC 2003
CVS commit by sstein:
some more small changes
M +16 -3 cswriter.cpp 1.2
--- kdesdk/umbrello/umbrello/codegenerators/cswriter.cpp #1.1:1.2
@@ -66,5 +66,5 @@ CsWriter::CsWriter( QObject *parent, con
INLINE_ATTRIBUTE_METHODS = true;
INLINE_ASSOCIATION_METHODS = true;
- WRITE_EMPTY_CONSTRUCTOR = false;
+ WRITE_EMPTY_CONSTRUCTOR = true;
WRITE_EMPTY_DESTRUCTOR = false;
WRITE_VIRTUAL_DESTRUCTORS = false;
@@ -435,4 +435,17 @@ void CsWriter::writeSourceFile (UMLClass
writeOperations(c,cs);
+ // write the attributes
+ cs<<scopeToCPPDecl(Uml::Public)<<":"<<endl<<endl; // print visibility decl.
+ writeAttributeDecls(Uml::Public, true, cs); // write static attributes first
+ writeAttributeDecls(Uml::Public, false, cs);
+
+ cs<<scopeToCPPDecl(Uml::Protected)<<":"<<endl<<endl; // print visibility decl.
+ writeAttributeDecls(Uml::Protected, true, cs); // write static attributes first
+ writeAttributeDecls(Uml::Protected, false, cs);
+
+ cs<<scopeToCPPDecl(Uml::Private)<<":"<<endl<<endl; // print visibility decl.
+ writeAttributeDecls(Uml::Private, true, cs); // write static attributes first
+ writeAttributeDecls(Uml::Private, false, cs);
+
// Yep, bringing up the back of the bus, our initialization method for attributes
writeInitAttibuteMethod (cs);
@@ -962,5 +975,5 @@ void CsWriter::writeInitAttibuteMethod (
QString indent = getIndent();
- stream<<indent<<"void "<<className<<"::"<<" initAttributes ( ) {"<<endl;
+ stream<<indent<<"void "<<" initAttributes ( ) {"<<endl;
QPtrList<UMLAttribute> *atl = classifierInfo->getAttList();
@@ -993,5 +1006,5 @@ void CsWriter::writeConstructorMethods(Q
{
QString indent = getIndent();
- stream<<indent<<className<<"::"<<className<<" ( ) {"<<endl;
+ stream<<indent<<"public "<<className<<" ( ) {"<<endl;
if(classifierInfo->hasAttributes)
stream<<indent<<INDENT<<"initAttributes();"<<endl;
More information about the umbrello-devel
mailing list