umbrello API Documentation

rubyclassifiercodedocument.h

00001 /***************************************************************************
00002                           rubyclassdeclarationblock.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 
00021 #ifndef RUBYCLASSIFIERCODEDOCUMENT_H
00022 #define RUBYCLASSIFIERCODEDOCUMENT_H
00023 
00024 #include <qstring.h>
00025 #include "../codeclassfieldlist.h"
00026 #include "../classifiercodedocument.h"
00027 #include "../classifier.h"
00028 #include "../hierarchicalcodeblock.h"
00029 #include "classifierinfo.h"
00030 #include "rubycodeclassfield.h"
00031 #include "rubycodeoperation.h"
00032 
00033 class RubyClassDeclarationBlock;
00034 class RubyCodeGenerationPolicy;
00035 
00041 class RubyClassifierCodeDocument : public ClassifierCodeDocument
00042 {
00043     Q_OBJECT
00044 public:
00045 
00046     // Constructors/Destructors
00047     //
00048 
00049 
00053     RubyClassifierCodeDocument (UMLClassifier * classifier);
00054 
00058     virtual ~RubyClassifierCodeDocument ( );
00059 
00064     //CodeDocumentDialog getDialog ( );
00065 
00066     QString scopeToRubyDecl(Uml::Visibility scope);
00067     QString capitalizeFirstLetter(const QString &string);
00068 
00069     // Make it easier on ourselves
00070     RubyCodeGenerationPolicy * getRubyPolicy();
00071 
00072     QString getRubyClassName (const QString &name);
00073 
00074     QString getPath();
00075 
00079     bool addCodeOperation (CodeOperation * op );
00080 
00081 protected:
00082 
00083     // reset/clear our inventory of textblocks in this document
00084     void resetTextBlocks();
00085 
00090     virtual void loadChildTextBlocksFromNode ( QDomElement & root);
00091 
00092     void addOrUpdateCodeClassFieldMethodsInCodeBlock(CodeClassFieldList &list, RubyClassDeclarationBlock * codeBlock);
00093 
00094     bool forceDoc ();
00095 
00096     void updateContent();
00097 
00098 private:
00099 
00100     RubyClassDeclarationBlock * classDeclCodeBlock;
00101     HierarchicalCodeBlock * constructorBlock;
00102     HierarchicalCodeBlock * operationsBlock;
00103 
00104     HierarchicalCodeBlock * publicBlock;
00105     HierarchicalCodeBlock * privateBlock;
00106     HierarchicalCodeBlock * protectedBlock;
00107 
00108 //    HierarchicalCodeBlock * namespaceBlock;
00109 
00110     HierarchicalCodeBlock * pubConstructorBlock;
00111     HierarchicalCodeBlock * protConstructorBlock;
00112     HierarchicalCodeBlock * privConstructorBlock;
00113 
00114     HierarchicalCodeBlock * pubOperationsBlock;
00115     HierarchicalCodeBlock * privOperationsBlock;
00116     HierarchicalCodeBlock * protOperationsBlock;
00117 
00118     ClassifierInfo * info;
00119     QString fileName; // Just for our convience in creating code
00120     QString endLine; // characters for ending line. Just for our convience in creating code
00121     QString RubyClassName;
00122 
00123     void init ( );
00124     RubyClassDeclarationBlock * getClassDecl();
00125 
00126 
00127 };
00128 
00129 #endif // RUBYCLASSIFIERCODEDOCUMENT_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:07:59 2007 by doxygen 1.4.1 written by Dimitri van Heesch, © 1997-2003