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:465
virtual CodeBlock * newCodeBlock()
Create a new CodeBlock object belonging to this CodeDocument.
Definition: codedocument.cpp:456
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
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:33
virtual void setAttributesFromObject(TextBlock *obj)
Set the class attributes from a passed object.
Definition: codeblockwithcomments.cpp:83
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
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
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:24
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
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:486
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
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:2132
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="", const QString &endString="", const QString &comment="")
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
virtual HierarchicalCodeBlock * newHierarchicalCodeBlock()
Definition: hierarchicalcodeblock.cpp:83
QList< CodeAccessorMethod * > CodeAccessorMethodList
Definition: codeaccessormethodlist.h:17
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
static QString decodeText(const QString &text, const QString &endLine)
Decode text from XML storage.
Definition: textblock.cpp:392
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
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
virtual QString getUniqueTag(const QString &prefix=QString(""))
Return a unique and currently unallocated text block tag for this document.
Definition: codedocument.cpp:192
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:481
static QString encodeText(const QString &text, const QString &endLine)
Encode text for XML storage.
Definition: textblock.cpp:378
virtual void setAttributesFromNode(QDomElement &element)
set the class attributes of this object from the passed element node.
Definition: hierarchicalcodeblock.cpp:278
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
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.