umbrello API Documentation

rubywriter.h

00001 /***************************************************************************
00002                           rubywriter.h  -  description
00003                              -------------------
00004     begin                : Mon Jul 18 2005
00005     author               : Richard Dale
00006  ***************************************************************************/
00007 
00008 /***************************************************************************
00009  *                                                                         *
00010  *   This program is free software; you can redistribute it and/or modify  *
00011  *   it under the terms of the GNU General Public License as published by  *
00012  *   the Free Software Foundation; either version 2 of the License, or     *
00013  *   (at your option) any later version.                                   *
00014  *                                                                         *
00015  *   copyright (C) 2006-2007                                               *
00016  *   Umbrello UML Modeller Authors <uml-devel@uml.sf.net>                  *
00017  ***************************************************************************/
00018 
00019 #ifndef RUBYWRITER_H
00020 #define RUBYWRITER_H
00021 
00022 #include "simplecodegenerator.h"
00023 #include "../umloperationlist.h"
00024 #include "../umlattributelist.h"
00025 
00026 #include <qstringlist.h>
00027 
00028 class ClassifierInfo;
00029 
00034 class RubyWriter : public SimpleCodeGenerator {
00035     Q_OBJECT
00036 public:
00037 
00038     RubyWriter();
00039     virtual ~RubyWriter();
00040 
00045     virtual void writeClass(UMLClassifier *c);
00046 
00050     virtual Uml::Programming_Language getLanguage();
00051 
00055     virtual const QStringList reservedKeywords() const;
00056 
00057 private:
00064     QString cppToRubyType(const QString &cppType);
00065 
00072     QString cppToRubyName(const QString &cppName);
00073 
00077     void writeAttributeMethods(UMLAttributeList *attribs,
00078                                Uml::Visibility visibility, QTextStream &stream);
00079 
00080 
00085     void writeSingleAttributeAccessorMethods(const QString &fieldName,
00086                                              const QString &description,
00087                                              QTextStream &h);
00088 
00095     void writeOperations(UMLClassifier *c, QTextStream &h);
00096 
00104     void writeOperations(const QString &classname, UMLOperationList &opList,
00105                          Uml::Visibility permitScope, QTextStream &h);
00106 
00110     ClassifierInfo * classifierInfo;
00111 };
00112 
00113 #endif //RUBYWRITER
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