umbrello API Documentation

rubycodegenerator.h

00001 /***************************************************************************
00002                           rubycodegenerator.cpp
00003                           Derived from the Java code generator by thomas
00004 
00005     begin                : Thur Jul 21 2005
00006     author               : Richard Dale
00007  ***************************************************************************/
00008 
00009 /***************************************************************************
00010  *                                                                         *
00011  *   This program is free software; you can redistribute it and/or modify  *
00012  *   it under the terms of the GNU General Public License as published by  *
00013  *   the Free Software Foundation; either version 2 of the License, or     *
00014  *   (at your option) any later version.                                   *
00015  *                                                                         *
00016  *   copyright (C) 2006-2007                                               *
00017  *   Umbrello UML Modeller Authors <uml-devel@uml.sf.net>                  *
00018  ***************************************************************************/
00019 
00020 #ifndef RUBYCODEGENERATOR_H
00021 #define RUBYCODEGENERATOR_H
00022 
00023 #include <qstring.h>
00024 #include "../codeviewerstate.h"
00025 #include "../codegenerator.h"
00026 #include "../codeblockwithcomments.h"
00027 #include "../umldoc.h"
00028 
00029 #include "classifierinfo.h"
00030 #include "rubyclassifiercodedocument.h"
00031 
00032 #include "rubycodegenerationpolicy.h"
00033 
00034 class CodeViewerDialog;
00035 
00036 class RubyCodeGenerator : public CodeGenerator
00037 {
00038     Q_OBJECT
00039 public:
00040 
00041     // Constructors/Destructors
00042     //
00043 
00047     RubyCodeGenerator ();
00048     RubyCodeGenerator (QDomElement & element);
00049 
00053     virtual ~RubyCodeGenerator ( );
00054 
00055     // Public attributes
00056     //
00057 
00058 
00059     // Public attribute accessor methods
00060     //
00061 
00065     bool getAutoGenerateAttribAccessors( );
00066 
00070     bool getAutoGenerateAssocAccessors( );
00071 
00075     static QString getListFieldClassName();
00076 
00079     virtual CodeViewerDialog * getCodeViewerDialog( QWidget* parent, CodeDocument * doc,
00080             Settings::CodeViewerState state);
00081 
00082     // Other methods
00083     //
00084 
00085     // general purpose function we may reuse for all types of Ruby code documents
00086     QString capitalizeFirstLetter(const QString &string);
00087 
00091     RubyCodeGenerationPolicy * getRubyPolicy();
00092 
00097     CodeDocument * newClassifierCodeDocument (UMLClassifier * classifier);
00098 
00099     // return "Ruby"
00100     Uml::Programming_Language getLanguage();
00101 
00108     static QString cppToRubyType(const QString &cppType);
00109 
00116     static QString cppToRubyName(const QString &cppName);
00117 
00121     virtual const QStringList reservedKeywords() const;
00122 
00123 protected:
00124 
00128     CodeBlockWithComments * createClassDecl ( UMLClassifier *c, ClassifierInfo *info, RubyClassifierCodeDocument * doc);
00129 
00130 };
00131 
00132 #endif // RUBYCODEGENERATOR_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