umbrello/umbrello
codegenerator.h
Go to the documentation of this file.
80 // * other document OR was added(no prior document existed..only when addIfPriorDocumentNotPresent is true).
83 // bool replaceCodeDocument(CodeDocument * replace_doc = 0, bool addIfPriorDocumentNotPresent = true,
124 static QString formatDoc(const QString& text, const QString& linePrefix = QLatin1String(" *"), int lineWidth = 80);
This class defines the non-graphical information required for a UML Classifier (ie a class or interfa...
Definition: classifier.h:39
QString overwritableName(const QString &name, const QString &extension)
Remove (and possibly delete) all AutoGenerated content type CodeDocuments but leave the UserGenerated...
Definition: codegenerator.cpp:517
virtual CodeViewerDialog * getCodeViewerDialog(QWidget *parent, CodeDocument *doc, Settings::CodeViewerState state)
Get the editing dialog for this code document.
Definition: codegenerator.cpp:181
virtual void loadFromXMI(QDomElement &element)
Load codegenerator data from xmi.
Definition: codegenerator.cpp:191
class ClassifierCodeDocument A CodeDocument which represents a UMLClassifier (e.g.
Definition: classifiercodedocument.h:32
bool addCodeDocument(CodeDocument *add_object)
Add a CodeDocument object to the m_codedocumentVector List.
Definition: codegenerator.cpp:127
bool openFile(QFile &file, const QString &name)
Opens a file named "name" for writing in the outputDirectory.
Definition: codegenerator.cpp:601
virtual bool isReservedKeyword(const QString &keyword)
Check whether the given string is a reserved word for the language of this code generator.
Definition: codegenerator.cpp:891
virtual void writeCodeToFile()
This method is here to provide class wizard the ability to write out only those classes which are sel...
Definition: codegenerator.cpp:390
QString headingFileDir() const
virtual CodeDocument * newCodeDocument()
Create a new Code document belonging to this package.
Definition: codegenerator.cpp:473
virtual QString getHeadingFile(const QString &file)
Gets the heading file (as a string) to be inserted at the beginning of the generated file...
Definition: codegenerator.cpp:497
CodeDocument * findCodeDocumentByID(const QString &id)
Find a code document by the given id string.
Definition: codegenerator.cpp:112
CodeGenerationPolicy::ModifyNamePolicy modifyNamePolicy() const
virtual void checkAddUMLObject(UMLObject *obj)
This function checks for adding objects to the UMLDocument.
Definition: codegenerator.cpp:343
const char * name() const
virtual Uml::ProgrammingLanguage::Enum language() const =0
Return the unique language enum that identifies this type of code generator.
virtual void finalizeRun()
A single call to writeCodeToFile() usually entails processing many items (e.g.
Definition: codegenerator.cpp:465
virtual QStringList reservedKeywords() const
Get list of reserved keywords.
Definition: codegenerator.cpp:900
bool includeHeadings() const
void codeGenerated(UMLClassifier *concept, bool generated)
virtual QStringList defaultDatatypes()
Return the default datatypes for your language (bool, int etc).
Definition: codegenerator.cpp:878
QString getUniqueID(CodeDocument *codeDoc)
Get a unique id for this codedocument.
Definition: codegenerator.cpp:80
virtual void saveToXMI(QDomDocument &doc, QDomElement &root)
Save the XMI representation of this object.
Definition: codegenerator.cpp:258
static QString formatSourceCode(const QString &code, const QString &indentation)
Format source code for output in source files by adding the correct indentation to every line of code...
Definition: codegenerator.cpp:821
static void findObjectsRelated(UMLClassifier *c, UMLPackageList &cList)
Finds all classes in the current document to which objects of class c are in some way related...
Definition: codegenerator.cpp:700
This class is sooo ugly I don't know where to begin.
Definition: codeviewerdialog.h:27
CodeDocumentList * getCodeDocumentList()
Get the list of CodeDocument objects held by m_codedocumentVector.
Definition: codegenerator.cpp:171
void setHeadingFileDir(const QString &)
void setIncludeHeadings(bool i)
bool m_applyToAllRemaining
Used by OverwriteDialog to know if the apply to all remaining files checkbox should be checked (is by...
Definition: codegenerator.h:185
configurable params for the code viewer tool
Definition: codeviewerstate.h:20
virtual void createDefaultStereotypes()
Create the default stereotypes for your language (constructor, int etc).
Definition: codegenerator.cpp:909
virtual void checkRemoveUMLObject(UMLObject *obj)
This function checks for removing objects from the UMLDocument.
Definition: codegenerator.cpp:359
virtual CodeDocument * newClassifierCodeDocument(UMLClassifier *classifier)=0
A series of accessor method constructors that we need to define for any particular language...
void writeListedCodeDocsToFile(CodeDocumentList *docs)
The actual internal routine which writes code documents.
Definition: codegenerator.cpp:421
CodeDocument * findCodeDocumentByClassifier(UMLClassifier *classifier)
Find a code document by the given classifier.
Definition: codegenerator.cpp:380
QHash< QString, CodeDocument * > m_codeDocumentDictionary
Definition: codegenerator.h:179
This class collects together all of the code documents which form this project, and generates code fo...
Definition: codegenerator.h:67
bool removeCodeDocument(CodeDocument *remove_object)
Replace (or possibly add a new) CodeDocument object to the m_codedocumentVector List.
Definition: codegenerator.cpp:152
static QString formatDoc(const QString &text, const QString &linePrefix=QLatin1String(" *"), int lineWidth=80)
Format documentation for output in source files.
Definition: codegenerator.cpp:790
static QString cleanName(const QString &name)
Replaces spaces with underscores and capitalises as defined in m_modname.
Definition: codegenerator.cpp:627
QString findFileName(CodeDocument *codeDocument)
Finds an appropriate file name for the given CodeDocument, taking into account the Overwrite Policy a...
Definition: codegenerator.cpp:643
void showGeneratedFile(const QString &filename)
virtual void syncCodeToDocument()
Force a synchronize of this code generator, and its present contents, to that of the parent UMLDocume...
Definition: codegenerator.cpp:328
QObject * parent() const
void setModifyNamePolicy(CodeGenerationPolicy::ModifyNamePolicy p)
virtual void initFromParentDocument()
Initialize this code generator from its parent UMLDoc.
Definition: codegenerator.cpp:308
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:40:25 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:40:25 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.