#include <valawriter.h>
|
| void | writeRealizationsRecursive (UMLClassifier *currentClass, UMLAssociationList *realizations, QTextStream &cs) |
| void | writeOperations (UMLClassifier *c, QTextStream &cs) |
| void | writeOperations (UMLOperationList opList, QTextStream &cs, bool interface=false, bool isOverride=false, bool generateErrorStub=false) |
| void | writeOverridesRecursive (UMLClassifierList *superclasses, QTextStream &cs) |
| void | writeAttributes (UMLClassifier *c, QTextStream &cs) |
| void | writeAttributes (UMLAttributeList &atList, QTextStream &cs) |
| void | writeAssociatedAttributes (UMLAssociationList &associated, UMLClassifier *c, QTextStream &cs) |
| void | writeAttribute (const QString &doc, Uml::Visibility::Enum visibility, bool isStatic, const QString &typeName, const QString &name, const QString &initialValue, bool asProperty, QTextStream &cs) |
| QString | makeLocalTypeName (UMLClassifierListItem *cl) |
|
| enum | GenerationState { Generated
, Failed
, Skipped
} |
| virtual void | syncCodeToDocument () |
| virtual void | syncCodeToDocument () |
| void | codeGenerated (UMLClassifier *classifier, bool generated) |
| void | codeGenerated (UMLClassifier *classifier, CodeGenerator::GenerationState result) |
| void | showGeneratedFile (const QString &filename) |
| static QString | cleanName (const QString &name) |
| static QString | formatDoc (const QString &text, const QString &linePrefix=QStringLiteral(" *"), int lineWidth=80) |
| static QString | formatFullDocBlock (const QString &text, const QString &blockHeader=QStringLiteral("/* "), const QString &blockFooter=QStringLiteral(" */"), const QString &linePrefix=QStringLiteral(" *"), int lineWidth=80) |
| static QString | formatSourceCode (const QString &code, const QString &indentation) |
| static void | findObjectsRelated (UMLClassifier *c, UMLPackageList &cList) |
| QString | findFileName (UMLPackage *classifier, const QString &ext) |
| QString | overwritableName (UMLPackage *classifier, 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 ValaWriter is a Vala code generator for UMLClassifier objects Just call writeClass and feed it a UMLClassifier;
◆ ValaWriter()
| ValaWriter::ValaWriter |
( |
| ) |
|
◆ ~ValaWriter()
| ValaWriter::~ValaWriter |
( |
| ) |
|
|
virtual |
◆ defaultDatatypes()
| QStringList ValaWriter::defaultDatatypes |
( |
| ) |
const |
|
virtual |
Get list of predefined data types.
- Returns
- the list of default data types
Reimplemented from CodeGenerator.
◆ language()
Returns "Vala".
- Returns
- programming language id
Implements CodeGenerator.
◆ makeLocalTypeName()
Find the type in used namespaces, if namespace found return short name, complete otherwise.
- Parameters
-
| cl | Operation or Attribute to check type |
- Returns
- the local type name
◆ reservedKeywords()
| QStringList ValaWriter::reservedKeywords |
( |
| ) |
const |
|
virtual |
Get list of reserved keywords.
- Returns
- list of reserved keywords
Reimplemented from CodeGenerator.
◆ writeAssociatedAttributes()
Write attributes from associated objects (compositions, aggregations).
- Parameters
-
| associated | list of associated objects |
| c | currently written class, to see association direction |
| cs | output stream |
◆ writeAttribute()
| void ValaWriter::writeAttribute |
( |
const QString & | doc, |
|
|
Uml::Visibility::Enum | visibility, |
|
|
bool | isStatic, |
|
|
const QString & | typeName, |
|
|
const QString & | name, |
|
|
const QString & | initialValue, |
|
|
bool | asProperty, |
|
|
QTextStream & | cs ) |
|
private |
Write a single attribute to the output stream.
- Parameters
-
| doc | attribute documentation |
| visibility | attribute visibility |
| isStatic | static attribute |
| typeName | class/type of the attribute |
| name | name of the attribute |
| initialValue | initial value given to the attribute at declaration |
| asProperty | true writes as property (get/set), false writes single line variable |
| cs | output stream |
◆ writeAttributes() [1/2]
| void ValaWriter::writeAttributes |
( |
UMLAttributeList & | atList, |
|
|
QTextStream & | cs ) |
|
private |
Write a list of class attributes.
- Parameters
-
| atList | the list of attributes |
| cs | output stream |
◆ writeAttributes() [2/2]
| void ValaWriter::writeAttributes |
( |
UMLClassifier * | c, |
|
|
QTextStream & | cs ) |
|
private |
Write all the attributes of a class.
- Parameters
-
| c | the class we are generating code for |
| cs | output stream |
◆ writeClass()
◆ writeOperations() [1/2]
| void ValaWriter::writeOperations |
( |
UMLClassifier * | c, |
|
|
QTextStream & | cs ) |
|
private |
Write all operations for a given class.
- Parameters
-
| c | the classifier we are generating code for |
| cs | output stream |
◆ writeOperations() [2/2]
| void ValaWriter::writeOperations |
( |
UMLOperationList | opList, |
|
|
QTextStream & | cs, |
|
|
bool | isInterface = false, |
|
|
bool | isOverride = false, |
|
|
bool | generateErrorStub = false ) |
|
private |
Write a list of class operations.
- Parameters
-
| opList | the list of operations |
| cs | output stream |
| isInterface | indicates if the operation is an interface member |
| isOverride | implementation of an inherited abstract function |
| generateErrorStub | true generates a comment "The method or operation is not implemented" |
◆ writeOverridesRecursive()
| void ValaWriter::writeOverridesRecursive |
( |
UMLClassifierList * | superclasses, |
|
|
QTextStream & | cs ) |
|
private |
Write superclasses' abstract methods.
- Parameters
-
| superclasses | List of superclasses to start recursing on |
| cs | output stream |
◆ writeRealizationsRecursive()
Write realizations of a class and recurse to parent classes.
- Parameters
-
| currentClass | class to start with |
| realizations | realizations of this class |
| cs | output stream |
◆ m_container_indent
| QString ValaWriter::m_container_indent |
|
private |
Adds extra indenting if the class is in a container (namespace).
◆ m_seenIncludes
Collection of included namespaces, to skip them from variable types.
◆ m_unnamedRoles
| int ValaWriter::m_unnamedRoles |
|
private |
Counts associations without a role name for giving a default name.
The documentation for this class was generated from the following files: