umbrello/umbrello
hierarchicalcodeblock.cpp
Go to the documentation of this file.
27 HierarchicalCodeBlock::HierarchicalCodeBlock(CodeDocument * doc, const QString &start, const QString &endString, const QString &comment)
107 bool HierarchicalCodeBlock::insertTextBlock(TextBlock * newBlock, TextBlock * existingBlock, bool after)
368 uError() << "HierarchicalCodeBlock: findCodeClassFieldTextBlockByTag() finds NO parent document! Badly constructed textblock?!?";
virtual CodeBlockWithComments * newCodeBlockWithComments()
Definition: hierarchicalcodeblock.cpp:78
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 release()
causes the text block to release all of its connections and any other text blocks that it 'owns'...
Definition: hierarchicalcodeblock.cpp:386
TextBlock * findCodeClassFieldTextBlockByTag(const QString &tag)
Find a specific textblock held by any code class field in this document by its tag.
Definition: classifiercodedocument.cpp:766
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
void setAttributesFromObject(CodeGenObjectWithTextBlocks *obj)
Empty method.
Definition: codegenobjectwithtextblocks.cpp:390
class ClassifierCodeDocument A CodeDocument which represents a UMLClassifier (e.g.
Definition: classifiercodedocument.h:32
QDomNode appendChild(const QDomNode &newChild)
virtual void setAttributesFromObject(TextBlock *obj)
Set the class attributes from a passed object.
Definition: codeblockwithcomments.cpp:83
QString attribute(const QString &name, const QString &defValue) const
virtual void setAttributesOnNode(QDomDocument &doc, QDomElement &blockElement)
Set attributes of the node that represents this class in the XMI document.
Definition: codeblockwithcomments.cpp:68
the content was generated by code generation itself
Definition: codeblock.h:28
QString getNewLineEndingChars() const
Utility function to get the actual characters.
Definition: codegenerationpolicy.cpp:248
void removeAt(int i)
virtual CodeBlock * newCodeBlock()
Virtual methods that return a new code document objects.
Definition: hierarchicalcodeblock.cpp:73
void setEndText(const QString &new_var)
Set the value of m_endText.
Definition: hierarchicalcodeblock.cpp:43
virtual void resetTextBlocks()
Reset/clear the inventory text blocks held by this object.
Definition: codegenobjectwithtextblocks.cpp:333
ContentType contentType() const
Get the value of m_contentType specifies whether the content (text) of this object was generated by t...
Definition: codeblock.cpp:54
QString getUniqueTag()
return a unique, and currently unallocated, text block tag for this hblock
Definition: hierarchicalcodeblock.cpp:60
virtual bool addTextBlock(TextBlock *add_object)
Add a TextBlock object to the m_textblockVector List.
Definition: codegenobjectwithtextblocks.cpp:57
void addCodeClassFieldMethods(CodeClassFieldList &list)
Utility method to add accessormethods in this object.
Definition: hierarchicalcodeblock.cpp:215
TextBlockList m_textblockVector
Definition: codegenobjectwithtextblocks.h:96
bool removeTextBlock(TextBlock *remove_object)
Remove a TextBlock object from m_textblockVector List returns boolean - true if successful.
Definition: hierarchicalcodeblock.cpp:169
int indexOf(const T &value, int from) const
void clear()
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
virtual void setAttributesFromObject(TextBlock *obj)
set the class attributes from a passed object
Definition: hierarchicalcodeblock.cpp:297
virtual void saveToXMI(QDomDocument &doc, QDomElement &root)
Save the XMI representation of this object.
Definition: hierarchicalcodeblock.cpp:240
virtual void loadFromXMI(QDomElement &root)
load params from the appropriate XMI element node.
Definition: hierarchicalcodeblock.cpp:269
void setAttribute(const QString &name, const QString &value)
bool isEmpty() const
typedef Iterator
bool addTextBlock(TextBlock *add_object)
Add a TextBlock object to the m_textblockVector List.
Definition: hierarchicalcodeblock.cpp:93
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
Definition: codeaccessormethod.h:20
This abstract class is for code generator objects which 'own' text blocks.
Definition: codegenobjectwithtextblocks.h:31
void setStartText(const QString &text)
Definition: hierarchicalcodeblock.cpp:199
virtual void setAttributesFromNode(QDomElement &element)
Set the class attributes of this object from the passed element node.
Definition: codeblockwithcomments.cpp:105
iterator end()
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
TextBlockList * getTextBlockList() const
Get the list of TextBlock objects held by m_textblockVector.
Definition: codegenobjectwithtextblocks.cpp:46
Definition: hierarchicalcodeblock.h:22
The fundemental unit of text within an output file containing code.
Definition: textblock.h:24
HierarchicalCodeBlock(CodeDocument *doc, const QString &startString=QString(), const QString &endString=QString(), const QString &comment=QString())
Constructor.
Definition: hierarchicalcodeblock.cpp:27
TextBlock * findCodeClassFieldTextBlockByTag(const QString &tag)
look for specific text blocks which belong to code classfields
Definition: hierarchicalcodeblock.cpp:362
virtual QString toString() const
Definition: hierarchicalcodeblock.cpp:313
void insert(int i, const T &value)
virtual HierarchicalCodeBlock * newHierarchicalCodeBlock()
Definition: hierarchicalcodeblock.cpp:83
static QString formatMultiLineText(const QString &work, const QString &linePrefix, const QString &breakStr, bool addBreak=true, bool lastLineHasBreak=true)
Format a long text string to be more readable.
Definition: textblock.cpp:288
QString getStartText() const
Definition: hierarchicalcodeblock.cpp:207
QString getIndentationString(int level=0) const
Get the actual amount of indentation for a given level of indentation.
Definition: textblock.cpp:193
iterator insert(const Key &key, const T &value)
static QString decodeText(const QString &text, const QString &endLine)
Decode text from XML storage.
Definition: textblock.cpp:395
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)
CodeAccessorMethodList getMethodList() const
Get the list of Method objects held by m_methodVector.
Definition: codeclassfield.cpp:190
virtual void setAttributesOnNode(QDomDocument &doc, QDomElement &elem)
set attributes of the node that represents this class in the XMI document.
Definition: hierarchicalcodeblock.cpp:251
TextBlock * findTextBlockByTag(const QString &tag)
Find the text block with a given tag.
Definition: codegenobjectwithtextblocks.cpp:126
void removeChildTagFromMap(const QString &tag)
Definition: codedocument.cpp:485
static QString encodeText(const QString &text, const QString &endLine)
Encode text for XML storage.
Definition: textblock.cpp:381
virtual void setAttributesFromNode(QDomElement &element)
set the class attributes of this object from the passed element node.
Definition: hierarchicalcodeblock.cpp:278
iterator begin()
virtual void release()
Causes the text block to release all of its connections and any other text blocks that it 'owns'...
Definition: textblock.cpp:275
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:26 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:26 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.