umbrello/umbrello
codegenobjectwithtextblocks.cpp
Go to the documentation of this file.
146 CodeGenObjectWithTextBlocks * CodeGenObjectWithTextBlocks::findParentObjectForTaggedTextBlock (const QString & tag)
183 HierarchicalCodeBlock * CodeGenObjectWithTextBlocks::getHierarchicalCodeBlock (const QString &tag, const QString &comment, int indentLevel)
186 HierarchicalCodeBlock * codeBlock = dynamic_cast<HierarchicalCodeBlock*>(findTextBlockByTag(tag));
217 CodeBlockWithComments * CodeGenObjectWithTextBlocks::getCodeBlockWithComments (const QString &tag, const QString &comment, int indentLevel)
220 CodeBlockWithComments * codeBlock = dynamic_cast<CodeBlockWithComments*>(findTextBlockByTag(tag));
246 CodeComment * CodeGenObjectWithTextBlocks::addOrUpdateTaggedCodeComment (const QString &tag, const QString &text, int indentationLevel)
259 return 0; // hmm. total failure.., was there a preexisting comment with this tag?? lets return null
287 CodeBlockWithComments * CodeGenObjectWithTextBlocks::addOrUpdateTaggedCodeBlockWithComments (const QString &tag, const QString &text, const QString &ctext, int indentLevel, bool forceUserBlockUpdate)
300 return 0; // hmm. total failure.., was there a preexisting codeblock with this tag?? lets return null
343 by 0x82C4634: ClassifierCodeDocument::findCodeClassFieldTextBlockByTag(QString const&) (classifiercodedocument.cpp:730)
344 by 0x82F3940: HierarchicalCodeBlock::findCodeClassFieldTextBlockByTag(QString const&) (hierarchicalcodeblock.cpp:366)
345 by 0x82D71DC: CodeGenObjectWithTextBlocks::loadChildTextBlocksFromNode(QDomElement&) (codegenobjectwithtextblocks.cpp:422)
346 by 0x82D6DFF: CodeGenObjectWithTextBlocks::setAttributesFromNode(QDomElement&) (codegenobjectwithtextblocks.cpp:373)
347 by 0x82F3412: HierarchicalCodeBlock::setAttributesFromNode(QDomElement&) (hierarchicalcodeblock.cpp:290)
349 by 0x82D760F: CodeGenObjectWithTextBlocks::loadChildTextBlocksFromNode(QDomElement&) (codegenobjectwithtextblocks.cpp:453)
350 by 0x82D6DFF: CodeGenObjectWithTextBlocks::setAttributesFromNode(QDomElement&) (codegenobjectwithtextblocks.cpp:373)
352 by 0x82C3CAE: ClassifierCodeDocument::setAttributesFromNode(QDomElement&) (classifiercodedocument.cpp:595)
353 by 0x82C4388: ClassifierCodeDocument::loadFromXMI(QDomElement&) (classifiercodedocument.cpp:687)
363 by 0x8204CA2: CPPSourceCodeAccessorMethod::~CPPSourceCodeAccessorMethod() (cppsourcecodeaccessormethod.cpp:51)
364 by 0x82D6C6D: CodeGenObjectWithTextBlocks::resetTextBlocks() (codegenobjectwithtextblocks.cpp:333)
365 by 0x82D6001: CodeGenObjectWithTextBlocks::~CodeGenObjectWithTextBlocks() (codegenobjectwithtextblocks.cpp:42)
367 by 0x82D6C6D: CodeGenObjectWithTextBlocks::resetTextBlocks() (codegenobjectwithtextblocks.cpp:333)
370 by 0x82D6DE7: CodeGenObjectWithTextBlocks::setAttributesFromNode(QDomElement&) (codegenobjectwithtextblocks.cpp:370)
372 by 0x82C3CAE: ClassifierCodeDocument::setAttributesFromNode(QDomElement&) (classifiercodedocument.cpp:595)
373 by 0x82C4388: ClassifierCodeDocument::loadFromXMI(QDomElement&) (classifiercodedocument.cpp:687)
521 CodeOperation * block = CodeGenFactory::newCodeOperation(dynamic_cast<ClassifierCodeDocument*>(m_pCodeDoc), op);
544 uWarning() << "unable to initialize any child blocks in doc: " << test->getFileName() << " " << this;
548 uWarning() << "unable to initialize any child blocks in Hblock: "<< hb->getTag() << " " << this;
virtual HierarchicalCodeBlock * newHierarchicalCodeBlock()=0
virtual void loadFromXMI(QDomElement &root)
Load params from the appropriate XMI element node.
Definition: codeblock.cpp:91
virtual void loadChildTextBlocksFromNode(QDomElement &root)
Load text blocks.
Definition: codegenobjectwithtextblocks.cpp:441
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
virtual void loadFromXMI(QDomElement &root)
Load params from the appropriate XMI element node.
Definition: codecomment.cpp:42
CodeComment * addOrUpdateTaggedCodeComment(const QString &tag="", const QString &text="", int indentationLevel=0)
Allows the user to add a code comment to the end of the list of text blocks in this document OR...
Definition: codegenobjectwithtextblocks.cpp:246
void setText(const QString &text)
Set the value of m_text The actual text of this code block.
Definition: textblock.cpp:80
the content was generated by code generation itself
Definition: codeblock.h:28
void setOverallIndentationLevel(int level)
A utility method that causes the comment and body of the code block to have the same indentation leve...
Definition: codeblockwithcomments.cpp:163
virtual TextBlock * findCodeClassFieldTextBlockByTag(const QString &tag)=0
Find specific text block belonging to code classfields.
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
UMLDoc * document() const
Returns a pointer to the current document connected to the KMainWindow instance.
Definition: uml.cpp:872
virtual CodeBlockWithComments * getCodeBlockWithComments(const QString &tag, const QString &comment, int indentLevel)
Will get a codeblockwithcomments from the document with given tag.
Definition: codegenobjectwithtextblocks.cpp:217
virtual bool addTextBlock(TextBlock *add_object)
Add a TextBlock object to the m_textblockVector List.
Definition: codegenobjectwithtextblocks.cpp:57
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
class CodeBlockWithComments A very common type of text block in any type of code. ...
Definition: codeblockwithcomments.h:24
virtual CodeBlock * newCodeBlock()=0
Virtual methods that return a new code document objects.
virtual CodeBlockWithComments * newCodeBlockWithComments()=0
virtual void loadFromXMI(QDomElement &root)
load params from the appropriate XMI element node.
Definition: hierarchicalcodeblock.cpp:269
Definition: codeoperation.h:23
virtual void loadFromXMI(QDomElement &root)
Load params from the appropriate XMI element node.
Definition: codeoperation.cpp:83
virtual void saveToXMI(QDomDocument &doc, QDomElement &root)=0
Save the XMI representation of this object.
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
CodeComment * newCodeComment(CodeDocument *cd)
Definition: codegenfactory.cpp:402
CodeGenObjectWithTextBlocks * findParentObjectForTaggedTextBlock(const QString &tag)
Find the direct parent for a given textblock.
Definition: codegenobjectwithtextblocks.cpp:146
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
TextBlockList * getTextBlockList() const
Get the list of TextBlock objects held by m_textblockVector.
Definition: codegenobjectwithtextblocks.cpp:46
virtual HierarchicalCodeBlock * getHierarchicalCodeBlock(const QString &tag, const QString &comment, int indentLevel)
Will get a hierarchicalcodeblock from the document with given tag.
Definition: codegenobjectwithtextblocks.cpp:183
UMLObject * findObjectById(Uml::ID::Type id)
Used to find a reference to a UMLObject by its ID.
Definition: umldoc.cpp:766
Definition: hierarchicalcodeblock.h:22
The fundemental unit of text within an output file containing code.
Definition: textblock.h:24
CodeBlockWithComments * addOrUpdateTaggedCodeBlockWithComments(const QString &tag, const QString &text, const QString &ctext, int indentLevel, bool forceUserBlockUpdate)
Allows the user to either add a code block with comments to the end of the list of text blocks in thi...
Definition: codegenobjectwithtextblocks.cpp:287
virtual QString getUniqueTag(const QString &prefix="")=0
virtual bool removeTextBlock(TextBlock *remove_object)
Remove a TextBlock object from m_textblockVector list.
Definition: codegenobjectwithtextblocks.cpp:95
CodeGenObjectWithTextBlocks(CodeDocument *parent)
Constructor.
Definition: codegenobjectwithtextblocks.cpp:29
void setIndentationLevel(int level)
Set how many times to indent this text block.
Definition: textblock.cpp:152
TextBlock * findTextBlockByTag(const QString &tag)
Find the text block with a given tag.
Definition: codegenobjectwithtextblocks.cpp:126
void setComment(CodeComment *object)
Set the Comment object.
Definition: codeblockwithcomments.cpp:38
CodeOperation * newCodeOperation(ClassifierCodeDocument *ccd, UMLOperation *op)
Definition: codegenfactory.cpp:224
virtual void loadFromXMI(QDomElement &root)
Load params from the appropriate XMI element node.
Definition: codeblockwithcomments.cpp:96
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.