umbrello API Documentation

tclwriter.h

00001 /***************************************************************************
00002                           tclwriter.h  -  description
00003                              -------------------
00004     begin               : Thu Jul 26 2005
00005     copyright           : (C) 2005 by Rene Meyer
00006     email               : rene.meyer@sturmit.de
00007 
00008  ***************************************************************************/
00009 
00010 /***************************************************************************
00011  *                                                                         *
00012  *   This program is free software; you can redistribute it and/or modify  *
00013  *   it under the terms of the GNU General Public License as published by  *
00014  *   the Free Software Foundation; either version 2 of the License, or     *
00015  *   (at your option) any later version.                                   *
00016  *                                                                         *
00017  ***************************************************************************/
00018 
00019 #ifndef TCLWRITER_H
00020 #define TCLWRITER_H
00021 
00022 #include <qstringlist.h>
00023 #include "simplecodegenerator.h"
00024 #include "../umloperationlist.h"
00025 #include "../umlattributelist.h"
00026 #include "../umlassociationlist.h"
00027 
00028 class           QFile;
00029 class           QTextStream;
00030 class           ClassifierInfo;
00031 
00038 class TclWriter : public SimpleCodeGenerator
00039 {
00040 public:
00041 
00045     TclWriter();
00046 
00050     virtual ~ TclWriter();
00051 
00056     virtual void    writeClass(UMLClassifier * c);
00057 
00061     virtual Uml::Programming_Language getLanguage();
00062 
00066     virtual const QStringList reservedKeywords() const;
00067 
00068 private:
00072     QTextStream * mStream;
00076     void            writeHeaderFile(UMLClassifier * c, QFile & file);
00077 
00081     void            writeSourceFile(UMLClassifier * c, QFile & file);
00082 
00086     void            writeCode(const QString &text);
00087 
00091     void            writeComm(const QString &text);
00092 
00096     void            writeDocu(const QString &text);
00097 
00098     void            writeConstructorDecl();
00099 
00100     void            writeDestructorDecl();
00101 
00105     ClassifierInfo *classifierInfo;
00106     QString         mNamespace;
00107     QString         mClass;
00108     QString         mClassGlobal;
00109 
00116     void            writeAttributeDecl(Uml::Visibility visibility, bool writeStatic);
00117 
00118     void            writeAssociationIncl(UMLAssociationList list,
00119             Uml::IDType myId, const QString &type);
00123     void            writeAssociationDecl(UMLAssociationList associations,
00124                                          Uml::Visibility permit, Uml::IDType id,
00125                                          const QString &type);
00126 
00130     void            writeAssociationRoleDecl(const QString &fieldClassName,
00131             const QString &roleName, const QString &multi, const QString &doc, const QString &docname);
00132 
00136     void            writeInitAttributeHeader();
00137     void            writeInitAttributeSource();
00138 
00139     void            writeConstructorHeader();
00140     void            writeConstructorSource();
00141     void            writeDestructorHeader();
00142     void            writeDestructorSource();
00143     void            writeOperationHeader(UMLClassifier * c,
00144                                          Uml::Visibility permitScope);
00145     void            writeOperationSource(UMLClassifier * c,
00146                                          Uml::Visibility permitScope);
00147     void            writeAttributeSource();
00148     void            writeAssociationSource(UMLAssociationList associations,
00149                                            Uml::IDType id);
00150     void            writeAssociationRoleSource(const QString &fieldClassName,
00151                                                const QString &roleName,
00152                                                const QString &multi);
00153     void            writeUse(UMLClassifier * c);
00154 
00155 
00156 
00160     QString         getUMLObjectName(UMLObject * obj);
00161 
00165     QString         fixTypeName(const QString &string);
00166 
00167     QStringList     ObjectFieldVariables;
00168     QStringList     VectorFieldVariables;
00169 
00170 };
00171 
00172 
00173 
00174 #endif // TCLWRITER_H
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:08:00 2007 by doxygen 1.4.1 written by Dimitri van Heesch, © 1997-2003