#include <rubywriter.h>
|
enum | GenerationState { Generated
, Failed
, Skipped
} |
|
virtual void | syncCodeToDocument () |
|
virtual void | syncCodeToDocument () |
|
void | codeGenerated (UMLClassifier *concept, bool generated) |
|
void | codeGenerated (UMLClassifier *concept, CodeGenerator::GenerationState result) |
|
void | showGeneratedFile (const QString &filename) |
|
static QString | cleanName (const QString &name) |
|
static QString | formatDoc (const QString &text, const QString &linePrefix=QLatin1String(" *"), int lineWidth=80) |
|
static QString | formatSourceCode (const QString &code, const QString &indentation) |
|
static void | findObjectsRelated (UMLClassifier *c, UMLPackageList &cList) |
|
QString | findFileName (UMLPackage *concept, const QString &ext) |
|
QString | overwritableName (UMLPackage *concept, const QString &name, const QString &ext) |
|
bool | hasDefaultValueAttr (UMLClassifier *c) |
|
bool | hasAbstractOps (UMLClassifier *c) |
|
QString | indent () |
|
virtual void | initFromParentDocument () |
|
QString | overwritableName (const QString &name, const QString &extension) |
|
bool | openFile (QFile &file, const QString &name) |
|
void | writeListedCodeDocsToFile (CodeDocumentList *docs) |
|
virtual void | finalizeRun () |
|
QString | className_ |
|
QString | fileName_ |
|
QMap< UMLPackage *, QString > | m_fileMap |
|
bool | m_createDirHierarchyForPackages |
|
QString | m_indentation |
|
int | m_indentLevel |
|
QString | m_endl |
|
QHash< QString, CodeDocument * > | m_codeDocumentDictionary |
|
bool | m_applyToAllRemaining |
|
UMLDoc * | m_document |
|
Class RubyWriter is a ruby code generator for UMLClassifier objects. Just call writeClass and feed it a UMLClassifier.
◆ RubyWriter()
RubyWriter::RubyWriter |
( |
| ) |
|
◆ ~RubyWriter()
RubyWriter::~RubyWriter |
( |
| ) |
|
|
virtual |
◆ cppToRubyName()
QString RubyWriter::cppToRubyName |
( |
const QString & |
nameStr | ) |
|
|
private |
Convert C++ names such as 'm_foobar' or pFoobar to just 'foobar' for ruby.
- Parameters
-
nameStr | the C++ name to be converted |
◆ cppToRubyType()
QString RubyWriter::cppToRubyType |
( |
const QString & |
typeStr | ) |
|
|
private |
Convert a C++ type such as 'int' or 'QWidget' to ruby types Integer and Qt::Widget.
- Parameters
-
typeStr | the C++ type to be converted |
◆ language()
Returns "Ruby".
- Returns
- the programming language identifier
Implements CodeGenerator.
◆ reservedKeywords()
QStringList RubyWriter::reservedKeywords |
( |
| ) |
const |
|
virtual |
Get list of reserved keywords.
- Returns
- the list of reserved keywords
Reimplemented from CodeGenerator.
◆ writeAttributeMethods()
Calls writeSingleAttributeAccessorMethods() on each of the attributes in attribs list.
- Parameters
-
attribs | the attribute |
visibility | the visibility of the attribute |
stream | output stream to the generated file |
◆ writeClass()
◆ writeOperations() [1/2]
Write a list of class operations.
- Parameters
-
classname | the name of the class |
opList | the list of operations |
permitScope | the visibility enum |
h | output stream for the header file |
◆ writeOperations() [2/2]
void RubyWriter::writeOperations |
( |
UMLClassifier * |
c, |
|
|
QTextStream & |
h |
|
) |
| |
|
private |
Write all operations for a given class.
- Parameters
-
c | the concept we are generating code for |
h | output stream for the header file |
◆ writeSingleAttributeAccessorMethods()
void RubyWriter::writeSingleAttributeAccessorMethods |
( |
const QString & |
fieldName, |
|
|
const QString & |
descr, |
|
|
QTextStream & |
h |
|
) |
| |
|
private |
Write all method declarations, for attributes and associations for the given permitted scope.
- Parameters
-
fieldName | the field name |
descr | the description |
h | output stream to the generated file |
The documentation for this class was generated from the following files: