umbrello 2.32.3 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
Import_Rose::methodName
void methodName(const QString &m)
Definition: import_rose.cpp:53
umlattributelist.h
UMLClassifier::getOpList
UMLOperationList getOpList(bool includeInherited=false, UMLClassifierSet *alreadyTraversed=0)
Definition: classifier.cpp:939
SimpleCodeGenerator::m_indentation
QString m_indentation
Definition: simplecodegenerator.h:76
Uml::ProgrammingLanguage::Enum
Enum
Definition: basictypes.h:271
UMLCanvasObject::getSuperClasses
UMLClassifierList getSuperClasses(bool withRealizations=true)
Definition: umlcanvasobject.cpp:349
UMLAttributeList
Definition: umlattributelist.h:27
UMLObject::name
QString name() const
Definition: umlobject.cpp:211
umloperationlist.h
CodeGenerator::getHeadingFile
virtual QString getHeadingFile(const QString &file)
Definition: codegenerator.cpp:407
rubywriter.h
UMLOperation::getParmList
UMLAttributeList getParmList() const
Definition: operation.cpp:178
CodeGenerator::cleanName
static QString cleanName(const QString &name)
Definition: codegenerator.cpp:549
operation.h
UMLAttribute::getInitialValue
QString getInitialValue() const
Definition: attribute.cpp:99
UMLClassifierListItem::getTypeName
virtual QString getTypeName() const
Definition: classifierlistitem.cpp:112
association.h
SimpleCodeGenerator::fileName_
QString fileName_
Definition: simplecodegenerator.h:52
RubyWriter::writeClass
virtual void writeClass(UMLClassifier *c)
Definition: rubywriter.cpp:42
UMLClassifierList
QList< UMLClassifier * > UMLClassifierList
Definition: umlclassifierlist.h:17
Uml::ProgrammingLanguage::Ruby
@ Ruby
Definition: basictypes.h:287
RubyWriter::writeOperations
void writeOperations(UMLClassifier *c, QTextStream &h)
Definition: rubywriter.cpp:179
RubyWriter::writeSingleAttributeAccessorMethods
void writeSingleAttributeAccessorMethods(const QString &fieldName, const QString &descr, QTextStream &h)
Definition: rubywriter.cpp:398
RubyWriter
Definition: rubywriter.h:27
CodeGenerator::forceDoc
bool forceDoc() const
Definition: codegenerator.cpp:765
CodeGenerator::formatSourceCode
static QString formatSourceCode(const QString &code, const QString &indentation)
Definition: codegenerator.cpp:743
Uml::Visibility::Public
@ Public
Definition: basictypes.h:60
RubyWriter::~RubyWriter
virtual ~RubyWriter()
Definition: rubywriter.cpp:34
UMLObject::visibility
Uml::Visibility::Enum visibility() const
Definition: umlobject.cpp:466
attribute.h
SimpleCodeGenerator::className_
QString className_
Definition: simplecodegenerator.h:51
RubyWriter::language
virtual Uml::ProgrammingLanguage::Enum language() const
Definition: rubywriter.cpp:421
SimpleCodeGenerator::m_endl
QString m_endl
Definition: simplecodegenerator.h:78
RubyWriter::writeAttributeMethods
void writeAttributeMethods(UMLAttributeList attribs, Uml::Visibility::Enum visibility, QTextStream &stream)
Definition: rubywriter.cpp:374
uDebug
#define uDebug()
Definition: debug_utils.h:122
SimpleCodeGenerator
Definition: simplecodegenerator.h:34
RubyWriter::RubyWriter
RubyWriter()
Definition: rubywriter.cpp:30
UMLObject::doc
QString doc() const
Definition: umlobject.cpp:435
visibility
Definition: visibility.py:1
UMLAttribute
Sets up attribute information.
Definition: attribute.h:28
UMLClassifier::getAttributeList
UMLAttributeList getAttributeList() const
Definition: classifier.cpp:436
UMLCanvasObject::getAggregations
UMLAssociationList getAggregations()
Definition: umlcanvasobject.cpp:412
Uml::Visibility::Enum
Enum
Definition: basictypes.h:59
RubyWriter::cppToRubyName
QString cppToRubyName(const QString &cppName)
Definition: rubywriter.cpp:165
CodeGenerator::codeGenerated
void codeGenerated(UMLClassifier *concept, bool generated)
Definition: moc_codegenerator.cpp:154
classifier.h
UMLOperation
Definition: operation.h:25
UMLClassifier::hasAccessorMethods
bool hasAccessorMethods()
Definition: classifier.cpp:1289
UMLClassifier
Information for a non-graphical Concept/Class.
Definition: classifier.h:40
debug_utils.h
UMLCanvasObject::getCompositions
UMLAssociationList getCompositions()
Definition: umlcanvasobject.cpp:422
simplecodegenerator.h
Uml::Visibility::Private
@ Private
Definition: basictypes.h:61
RubyWriter::cppToRubyType
QString cppToRubyType(const QString &cppType)
Definition: rubywriter.cpp:143
CodeGenerator::forceSections
bool forceSections() const
Definition: codegenerator.cpp:775
Uml::Visibility::Protected
@ Protected
Definition: basictypes.h:62
UMLOperationList
QList< UMLOperation * > UMLOperationList
Definition: umloperationlist.h:18
UMLAssociationList
QList< UMLAssociation * > UMLAssociationList
Definition: umlassociationlist.h:18
SimpleCodeGenerator::findFileName
QString findFileName(UMLPackage *concept, const QString &ext)
Definition: simplecodegenerator.cpp:91
umldoc.h
RubyWriter::reservedKeywords
virtual QStringList reservedKeywords() const
Definition: rubywriter.cpp:430
CodeGenerator::openFile
bool openFile(QFile &file, const QString &name)
Definition: codegenerator.cpp:523
UMLOperation::getSourceCode
QString getSourceCode() const
Definition: operation.cpp:507
description
static const char description[]
Definition: main.cpp:37