umbrello/umbrello
codedocument.cpp
Go to the documentation of this file.
369 docElement.setAttribute(QLatin1String("writeOutCode"), getWriteOutCode() ? QLatin1String("true")
virtual void updateContent()
Update the content of this code document.
Definition: codedocument.cpp:451
This class contains the non-graphical information required for a UML Package.
Definition: package.h:32
virtual CodeBlockWithComments * newCodeBlockWithComments()
Create a new CodeBlockWithComments object belonging to this CodeDocument.
Definition: codedocument.cpp:469
virtual CodeBlock * newCodeBlock()
Create a new CodeBlock object belonging to this CodeDocument.
Definition: codedocument.cpp:460
QString & append(QChar ch)
virtual void synchronize()
Cause this code document to synchronize to current generator policy.
Definition: codedocument.cpp:329
bool contains(const Key &key) const
virtual void setAttributesOnNode(QDomDocument &doc, QDomElement &elem)
Set attributes of the node that represents this class in the XMI document.
Definition: codegenobjectwithtextblocks.cpp:406
QDomNode appendChild(const QDomNode &newChild)
virtual void loadFromXMI(QDomElement &root)
Load params from the appropriate XMI element node.
Definition: codecomment.cpp:42
QString attribute(const QString &name, const QString &defValue) const
void setText(const QString &text)
Set the value of m_text The actual text of this code block.
Definition: textblock.cpp:80
void updateHeader()
Update the header text of this codedocument (text and status of the head comment).
Definition: codedocument.cpp:279
bool insertTextBlock(TextBlock *newBlock, TextBlock *existingBlock, bool after=true)
Insert a new text block after the existing text block.
Definition: codedocument.cpp:216
virtual void loadFromXMI(QDomElement &root)
Load params from the appropriate XMI element node.
Definition: codedocument.cpp:348
QString simplified() const
QDebug & nospace()
virtual HierarchicalCodeBlock * newHierarchicalCodeBlock()
Create a new HierarchicalCodeBlock object belonging to this CodeDocument.
Definition: codedocument.cpp:478
virtual void resetTextBlocks()
Reset/clear the inventory text blocks held by this object.
Definition: codegenobjectwithtextblocks.cpp:333
void clear()
UMLDoc * document() const
Returns a pointer to the current document connected to the KMainWindow instance.
Definition: uml.cpp:910
virtual QString getPath()
Get the value of the path to this code document.
Definition: codedocument.cpp:100
TextBlockList m_textblockVector
Definition: codegenobjectwithtextblocks.h:96
QDomNode nextSibling() const
int indexOf(const T &value, int from) const
QDomElement toElement() const
bool insertTextBlock(TextBlock *newBlock, TextBlock *existingBlock, bool after=true)
Insert a new text block before/after the existing text block.
Definition: hierarchicalcodeblock.cpp:107
class CodeBlockWithComments A very common type of text block in any type of code. ...
Definition: codeblockwithcomments.h:23
QString number(int n, int base)
virtual void saveToXMI(QDomDocument &doc, QDomElement &root)
Save the XMI representation of this object.
Definition: codedocument.cpp:437
void setAttribute(const QString &name, const QString &value)
bool isEmpty() const
void resetTextBlocks()
Reset/clear our inventory of textblocks in this document.
Definition: codedocument.cpp:338
bool isEmpty() const
virtual void setAttributesOnNode(QDomDocument &doc, QDomElement &blockElement)
Set attributes of the node that represents this class in the XMI document.
Definition: codedocument.cpp:357
void setWriteOutText(bool write)
Set the value of m_writeOutText Whether or not to include the text of this TextBlock into a file...
Definition: textblock.cpp:131
virtual void saveToXMI(QDomDocument &doc, QDomElement &root)
Save the XMI representation of this object.
Definition: codecomment.cpp:31
void addChildTagToMap(const QString &tag, TextBlock *tb)
Definition: codedocument.cpp:490
virtual QString getUniqueTag(const QString &prefix=QString())
Return a unique and currently unallocated text block tag for this document.
Definition: codedocument.cpp:193
virtual void setAttributesFromNode(QDomElement &element)
Set the class attributes of this object from the passed element node.
Definition: codedocument.cpp:388
This abstract class is for code generator objects which 'own' text blocks.
Definition: codegenobjectwithtextblocks.h:31
virtual void setAttributesFromNode(QDomElement &element)
Set the class attributes of this object from the passed element node.
Definition: codegenobjectwithtextblocks.cpp:424
CodeGenerationPolicy * commonPolicy() const
Returns the default code generation policy.
Definition: uml.cpp:2219
QString cleanName(const QString &name)
A little utility method which calls CodeGenerator::cleanName.
Definition: codedocument.cpp:270
virtual QString toString()
Create the string representation of this object.
Definition: codedocument.cpp:302
TextBlockList * getTextBlockList() const
Get the list of TextBlock objects held by m_textblockVector.
Definition: codegenobjectwithtextblocks.cpp:46
QDebug & space()
TextBlock * findTextBlockByTag(const QString &tag, bool descendIntoChildren=false)
Lookup a certain textblock by its tag value, returns NULL if it cannot find the TextBlock with such a...
Definition: codedocument.cpp:503
void setFileName(const QString &new_var)
Set the complete value (name plus any extension) of m_filename.
Definition: codedocument.cpp:53
bool isNull() const
QTime currentTime()
UMLObject * findObjectById(Uml::ID::Type id)
Used to find a reference to a UMLObject by its ID.
Definition: umldoc.cpp:782
QString & replace(int position, int n, QChar after)
Definition: hierarchicalcodeblock.h:22
The fundemental unit of text within an output file containing code.
Definition: textblock.h:24
QDomNode firstChild() const
T takeFirst()
void insert(int i, const T &value)
virtual TextBlock * findCodeClassFieldTextBlockByTag(const QString &tag)
Have to implement this for CodeObjectWithTextBlocks.
Definition: codedocument.cpp:520
QDate currentDate()
iterator insert(const Key &key, const T &value)
static QString cleanName(const QString &name)
Replaces spaces with underscores and capitalises as defined in m_modname.
Definition: codegenerator.cpp:627
QString tagName() const
bool getWriteOutText() const
Get the value of m_writeOutText Whether or not to include the text of this TextBlock into a file...
Definition: textblock.cpp:141
QDomElement createElement(const QString &tagName)
void removeChildTagFromMap(const QString &tag)
Definition: codedocument.cpp:485
QString getHeadingFile(const QString &str)
Gets the heading file (as a string) to be inserted at the beginning of the generated file...
Definition: codegenerationpolicy.cpp:540
void setFileExtension(const QString &new_var)
Set the value of m_fileExtension.
Definition: codedocument.cpp:72
UMLObject * findUMLObject(const QString &name, UMLObject::ObjectType type=UMLObject::ot_UMLObject, UMLObject *currentObj=0)
Used to find a UMLObject by its type and name.
Definition: umldoc.cpp:825
QString getPackage() const
Get the value of the package of this code document.
Definition: codedocument.cpp:123
QMap< QString, TextBlock * > m_textBlockTagMap
Definition: codegenobjectwithtextblocks.h:95
int remove(const Key &key)
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.