umbrello: umbrello/codegenerators/ruby/rubywriter.h Source File

umbrello 2.32.0 Umbrello UML Modeller is a Unified Modelling Language (UML) diagram program based on KDE Technology

rubywriter.h
Go to the documentation of this file.
1 /***************************************************************************
2 * This program is free software; you can redistribute it and/or modify *
3 * it under the terms of the GNU General Public License as published by *
4 * the Free Software Foundation; either version 2 of the License, or *
5 * (at your option) any later version. *
6 * *
7 * copyright (C) 2005 *
8 * Richard Dale <Richard_Dale@tipitina.demon.co.uk> *
9 * copyright (C) 2006-2020 *
10 * Umbrello UML Modeller Authors <umbrello-devel@kde.org> *
11 ***************************************************************************/
12
13 #ifndef RUBYWRITER_H
14 #define RUBYWRITER_H
15
16 #include "simplecodegenerator.h"
17 #include "umlattributelist.h"
18 #include "umloperationlist.h"
19
20 #include <QStringList>
21
26 class RubyWriter : public SimpleCodeGenerator
27 {
28 Q_OBJECT
29 public:
30
31 RubyWriter();
32 virtual ~RubyWriter();
33
34 virtual void writeClass(UMLClassifier *c);
35
36 virtual Uml::ProgrammingLanguage::Enum language() const;
37
38 virtual QStringList reservedKeywords() const;
39
40 private:
41
42 QString cppToRubyType(const QString &cppType);
43 QString cppToRubyName(const QString &cppName);
44
45 void writeAttributeMethods(UMLAttributeList attribs,
46 Uml::Visibility::Enum visibility, QTextStream &stream);
47
48 void writeSingleAttributeAccessorMethods(const QString &fieldName,
49 const QString &descr,
50 QTextStream &h);
51
52 void writeOperations(UMLClassifier *c, QTextStream &h);
53 void writeOperations(const QString &classname, const UMLOperationList &opList,
54 Uml::Visibility::Enum permitScope, QTextStream &h);
55
56 };
57
58 #endif //RUBYWRITER
RubyWriter
Definition: rubywriter.h:27
RubyWriter::language
virtual Uml::ProgrammingLanguage::Enum language() const
Definition: rubywriter.cpp:421
RubyWriter::RubyWriter
RubyWriter()
Definition: rubywriter.cpp:30
RubyWriter::writeClass
virtual void writeClass(UMLClassifier *c)
Definition: rubywriter.cpp:42
RubyWriter::cppToRubyType
QString cppToRubyType(const QString &cppType)
Definition: rubywriter.cpp:143
RubyWriter::writeOperations
void writeOperations(UMLClassifier *c, QTextStream &h)
Definition: rubywriter.cpp:179
RubyWriter::cppToRubyName
QString cppToRubyName(const QString &cppName)
Definition: rubywriter.cpp:165
RubyWriter::reservedKeywords
virtual QStringList reservedKeywords() const
Definition: rubywriter.cpp:430
RubyWriter::writeSingleAttributeAccessorMethods
void writeSingleAttributeAccessorMethods(const QString &fieldName, const QString &descr, QTextStream &h)
Definition: rubywriter.cpp:398
RubyWriter::~RubyWriter
virtual ~RubyWriter()
Definition: rubywriter.cpp:34
RubyWriter::writeAttributeMethods
void writeAttributeMethods(UMLAttributeList attribs, Uml::Visibility::Enum visibility, QTextStream &stream)
Definition: rubywriter.cpp:374
SimpleCodeGenerator
Definition: simplecodegenerator.h:34
UMLAttributeList
Definition: umlattributelist.h:27
UMLClassifier
Information for a non-graphical Concept/Class.
Definition: classifier.h:40
Uml::ProgrammingLanguage::Enum
Enum
Definition: basictypes.h:305
Uml::Visibility::Enum
Enum
Definition: basictypes.h:59
visibility
Definition: visibility.py:1
simplecodegenerator.h
umlattributelist.h
umloperationlist.h
UMLOperationList
QList< UMLOperation * > UMLOperationList
Definition: umloperationlist.h:18