umbrello 2.34.70-5524f40e1
Umbrello UML Modeller is a Unified Modelling Language (UML) diagram program based on KDE Technology
|
#include <advancedcodegenerator.h>
Public Slots | |
virtual void | checkAddUMLObject (UMLObject *obj) |
virtual void | checkRemoveUMLObject (UMLObject *obj) |
![]() | |
virtual void | syncCodeToDocument () |
Public Member Functions | |
AdvancedCodeGenerator () | |
virtual | ~AdvancedCodeGenerator () |
virtual CodeDocument * | newClassifierCodeDocument (UMLClassifier *classifier)=0 |
virtual CodeViewerDialog * | getCodeViewerDialog (QWidget *parent, CodeDocument *doc, Settings::CodeViewerState &state) |
![]() | |
CodeGenerator () | |
virtual | ~CodeGenerator () |
bool | addCodeDocument (CodeDocument *add_object) |
bool | removeCodeDocument (CodeDocument *remove_object) |
CodeDocumentList * | getCodeDocumentList () |
QString | getUniqueID (CodeDocument *codeDoc) |
virtual void | saveToXMI (QXmlStreamWriter &writer) |
CodeDocument * | findCodeDocumentByID (const QString &id) |
virtual void | writeCodeToFile () |
virtual void | writeCodeToFile (UMLClassifierList &list) |
void | setIncludeHeadings (bool i) |
bool | includeHeadings () const |
void | setHeadingFileDir (const QString &) |
QString | headingFileDir () const |
void | setForceDoc (bool f) |
bool | forceDoc () const |
void | setForceSections (bool f) |
bool | forceSections () const |
virtual QString | getHeadingFile (const QString &file) |
QString | findFileName (CodeDocument *codeDocument) |
virtual void | loadFromXMI (QDomElement &element) |
virtual Uml::ProgrammingLanguage::Enum | language () const =0 |
CodeDocument * | findCodeDocumentByClassifier (UMLClassifier *classifier) |
virtual QStringList | defaultDatatypes () const |
virtual bool | isReservedKeyword (const QString &keyword) |
virtual QStringList | reservedKeywords () const |
virtual void | createDefaultStereotypes () |
Protected Member Functions | |
virtual void | initFromParentDocument () |
void | connectSlots () |
![]() | |
QString | overwritableName (const QString &name, const QString &extension) |
bool | openFile (QFile &file, const QString &name) |
void | writeListedCodeDocsToFile (CodeDocumentList *docs) |
virtual void | finalizeRun () |
Additional Inherited Members | |
![]() | |
enum | GenerationState { Generated , Failed , Skipped } |
![]() | |
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) |
![]() | |
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 | ( | ) |
Constructor
|
virtual |
Destructor
|
virtualslot |
This function checks for adding objects to the UMLDocument.
|
virtualslot |
This function checks for removing objects from the UMLDocument.
|
protected |
Connect additional slots. To be called after constructing the code generator.
|
virtual |
Get the editing dialog for this code document.
Reimplemented in CPPCodeGenerator, DCodeGenerator, JavaCodeGenerator, and RubyCodeGenerator.
|
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.
|
pure virtual |
Implemented in CPPCodeGenerator, DCodeGenerator, JavaCodeGenerator, and RubyCodeGenerator.