umbrello API Documentation

csharpwriter.h

00001 /***************************************************************************
00002  *                                                                         *
00003  *   This program is free software; you can redistribute it and/or modify  *
00004  *   it under the terms of the GNU General Public License as published by  *
00005  *   the Free Software Foundation; either version 2 of the License, or     *
00006  *   (at your option) any later version.                                   *
00007  *                                                                         *
00008  *   copyright (C) 2007                                                    *
00009  *   Umbrello UML Modeller Authors <uml-devel@uml.sf.net>                  *
00010  ***************************************************************************/
00011 
00012 //
00013 // C++ Interface: csharpwriter
00014 //
00015 // @author Ferenc Veres
00016 //
00017 #ifndef CSHARPWRITER_H
00018 #define CSHARPWRITER_H
00019 
00020 #include "simplecodegenerator.h"
00021 #include "../umlattributelist.h"
00022 #include "../umloperationlist.h"
00023 #include "../classifierlistitem.h"
00024 #include "../umlassociationlist.h"
00025 
00026 
00031 class CSharpWriter : public SimpleCodeGenerator
00032 {
00033     Q_OBJECT
00034 public:
00035     CSharpWriter();
00036 
00037     virtual ~CSharpWriter();
00042     virtual void writeClass(UMLClassifier *c);
00043 
00047     virtual Uml::Programming_Language getLanguage();
00048 
00052     virtual const QStringList reservedKeywords() const;
00053 
00057     QStringList defaultDatatypes();
00058 
00059 private:
00060 
00064     bool bPrivateSectionCommentIsWritten;
00065 
00069     QString m_container_indent;
00070 
00074     UMLPackageList m_seenIncludes;
00075 
00079     int m_unnamedRoles;
00080 
00088     void writeRealizationsRecursive(UMLClassifier *currentClass,
00089                                     UMLAssociationList *realizations,
00090                                     QTextStream &cs);
00091 
00098     void writeOperations(UMLClassifier *c, QTextStream &cs);
00099 
00108     void writeOperations(UMLOperationList opList,
00109                          QTextStream &cs,
00110                          bool interface = false,
00111                          bool isOverride = false,
00112                          bool generateErrorStub = false);
00113 
00120     void writeOverridesRecursive(UMLClassifierList *superclasses, QTextStream &cs);
00121 
00126     void writeAttributes(UMLClassifier *c, QTextStream &cs);
00127 
00132     void writeAttributes(UMLAttributeList &atList, QTextStream &cs);
00133 
00140     void writeAssociatedAttributes(UMLAssociationList &associated, UMLClassifier *c, QTextStream &cs);
00141 
00153     void writeAttribute(QString doc, Uml::Visibility visibility, bool isStatic, QString typeName, QString name, QString initialValue, bool asProperty, QTextStream &cs);
00154 
00159     QString makeLocalTypeName(UMLClassifierListItem *cl);
00160 
00161 };
00162 
00163 #endif
KDE Logo
This file is part of the documentation for umbrello Version 3.1.0.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Tue Jun 26 08:07:56 2007 by doxygen 1.4.1 written by Dimitri van Heesch, © 1997-2003