#include <advancedcodegenerator.h>
|
enum | GenerationState { Generated
, Failed
, Skipped
} |
|
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) |
|
QHash< QString, CodeDocument * > | m_codeDocumentDictionary |
|
bool | m_applyToAllRemaining |
|
UMLDoc * | m_document |
|
AdvancedCodeGenerator is the base class for advanced cocde generators like CPPCodeGenerator, JavaCodeGenerator and so on.
◆ AdvancedCodeGenerator()
AdvancedCodeGenerator::AdvancedCodeGenerator |
( |
| ) |
|
◆ ~AdvancedCodeGenerator()
AdvancedCodeGenerator::~AdvancedCodeGenerator |
( |
| ) |
|
|
virtual |
◆ checkAddUMLObject
void AdvancedCodeGenerator::checkAddUMLObject |
( |
UMLObject * |
obj | ) |
|
|
virtualslot |
This function checks for adding objects to the UMLDocument.
◆ checkRemoveUMLObject
void AdvancedCodeGenerator::checkRemoveUMLObject |
( |
UMLObject * |
obj | ) |
|
|
virtualslot |
This function checks for removing objects from the UMLDocument.
◆ connectSlots()
void AdvancedCodeGenerator::connectSlots |
( |
| ) |
|
|
protected |
Connect additional slots. To be called after constructing the code generator.
◆ getCodeViewerDialog()
◆ initFromParentDocument()
void AdvancedCodeGenerator::initFromParentDocument |
( |
| ) |
|
|
protectedvirtual |
Initialize this code generator from its parent UMLDoc. When this is called, it will (re-)generate the list of code documents for this project (generator) by checking for new objects/attributes which have been added or changed in the document. One or more CodeDocuments will be created/overwritten/amended as is appropriate for the given language.
ClassifierCodeDocument In this 'generic' version a ClassifierCodeDocument will exist for each and every classifier that exists in our UMLDoc. IF when this is called, a code document doesn't exist for the given classifier, then we will created and add a new code document to our generator.
IF you want to add non-classifier related code documents at this step, you will need to overload this method in the appropriate code generatator (see JavaCodeGenerator for an example of this).
Implements CodeGenerator.
Reimplemented in CPPCodeGenerator.
◆ newClassifierCodeDocument()
The documentation for this class was generated from the following files: