umbrello 2.39.0
Umbrello UML Modeller is a Unified Modelling Language (UML) diagram program based on KDE Technology
|
#include <rubywriter.h>
Private Member Functions | |
QString | cppToRubyType (const QString &typeStr) |
QString | cppToRubyName (const QString &nameStr) |
void | writeAttributeMethods (UMLAttributeList attribs, Uml::Visibility::Enum visibility, QTextStream &stream) |
void | writeSingleAttributeAccessorMethods (const QString &fieldName, const QString &descr, QTextStream &h) |
void | writeOperations (UMLClassifier *c, QTextStream &h) |
void | writeOperations (const QString &classname, const UMLOperationList &opList, Uml::Visibility::Enum permitScope, QTextStream &h) |
Class RubyWriter is a ruby code generator for UMLClassifier objects. Just call writeClass and feed it a UMLClassifier.
RubyWriter::RubyWriter | ( | ) |
|
virtual |
Convert C++ names such as 'm_foobar' or pFoobar to just 'foobar' for ruby.
nameStr | the C++ name to be converted |
Convert a C++ type such as 'int' or 'QWidget' to ruby types Integer and Qt::Widget.
typeStr | the C++ type to be converted |
|
virtual |
|
virtual |
Get list of reserved keywords.
Reimplemented from CodeGenerator.
|
private |
Calls writeSingleAttributeAccessorMethods() on each of the attributes in attribs list.
attribs | the attribute |
visibility | the visibility of the attribute |
stream | output stream to the generated file |
|
virtual |
Call this method to generate C++ code for a UMLClassifier.
c | the class you want to generate code for. |
Implements SimpleCodeGenerator.
|
private |
Write a list of class operations.
classname | the name of the class |
opList | the list of operations |
permitScope | the visibility enum |
h | output stream for the header file |
|
private |
Write all operations for a given class.
c | the classifier we are generating code for |
h | output stream for the header file |
|
private |
Write all method declarations, for attributes and associations for the given permitted scope.
fieldName | the field name |
descr | the description |
h | output stream to the generated file |