umbrello/umbrello
codegenerator.h
Go to the documentation of this file.
81 // * other document OR was added(no prior document existed..only when addIfPriorDocumentNotPresent is true).
84 // bool replaceCodeDocument(CodeDocument * replace_doc = 0, bool addIfPriorDocumentNotPresent = true,
125 static QString formatDoc(const QString& text, const QString& linePrefix = " *", 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:502
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:33
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:586
static QString formatDoc(const QString &text, const QString &linePrefix=" *", int lineWidth=80)
Format documentation for output in source files.
Definition: codegenerator.cpp:772
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:873
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:458
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:482
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
virtual Uml::ProgrammingLanguage::Enum language() const =0
Return the unique language enum that identifies this type of code generator.
virtual QStringList reservedKeywords() const
Get list of reserved keywords.
Definition: codegenerator.cpp:882
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:860
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:803
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:682
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 overwriteDialogue to know if the apply to all remaining files checkbox should be checked (is ...
Definition: codegenerator.h:184
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:891
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:419
CodeDocument * findCodeDocumentByClassifier(UMLClassifier *classifier)
Find a code document by the given classifier.
Definition: codegenerator.cpp:380
QHash< QString, CodeDocument * > m_codeDocumentDictionary
Definition: codegenerator.h:178
This class collects together all of the code documents which form this project, and generates code fo...
Definition: codegenerator.h:68
bool removeCodeDocument(CodeDocument *remove_object)
Replace (or possibly add a new) CodeDocument object to the m_codedocumentVector List.
Definition: codegenerator.cpp:152
static QString cleanName(const QString &name)
Replaces spaces with underscores and capitalises as defined in m_modname.
Definition: codegenerator.cpp:609
QString findFileName(CodeDocument *codeDocument)
Finds an appropriate file name for the given CodeDocument, taking into account the Overwrite Policy a...
Definition: codegenerator.cpp:625
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
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-2014 The KDE developers.
Generated on Tue Oct 14 2014 23:05:59 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 23:05:59 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.