CodeDocument Class Reference
class CodeDocument A document containing the code for one file. More...
#include <codedocument.h>
Inheritance diagram for CodeDocument:

Public Member Functions | |
| CodeDocument () | |
| Basic constructor for class. | |
| virtual | ~CodeDocument () |
| Empty Destructor. | |
| void | setFileExtension (const QString &new_var) |
| Set the value of m_fileExtension. | |
| QString | getFileExtension () const |
| Get the value of m_fileExtension. | |
| void | setFileName (const QString &new_var) |
| Set the complete value (name plus any extension) of m_filename. | |
| QString | getFileName () const |
| Get the value of m_filename. | |
| void | setPackage (UMLPackage *new_var) |
| Set the value of m_package. | |
| QString | getPackage () const |
| Get the value of the package of this codedocument. | |
| virtual QString | getPath () |
| Get the value of the path to this codedocument. | |
| void | setID (const QString &new_id) |
| Set the value of m_ID. | |
| QString | getID () const |
| Get the value of m_ID. | |
| void | setWriteOutCode (bool new_var) |
| Set the value of m_writeOutCode Whether or not to write out this code document and any codeblocks, etc that it owns. | |
| bool | getWriteOutCode () |
| Get the value of m_writeOutCode Whether or not to write out this code document and any codeblocks, etc that it owns. | |
| void | setHeader (CodeComment *comment) |
| Set a Header comment object. | |
| CodeComment * | getHeader () |
| Get the Header comment object. | |
| bool | insertTextBlock (TextBlock *newBlock, TextBlock *existingBlock, bool after=true) |
| Insert a new text block after the existing text block. | |
| TextBlock * | findTextBlockByTag (const QString &tag, bool descendIntoChildren=false) |
| Lookup a certain textblock by its tag value, returns NULL if it cant find the TextBlock with such a tag. | |
| virtual QString | toString () |
| create the string representation of this object. | |
| virtual void | saveToXMI (QDomDocument &doc, QDomElement &root) |
| Save the XMI representation of this object. | |
| virtual void | loadFromXMI (QDomElement &root) |
| load params from the appropriate XMI element node. | |
| virtual CodeBlock * | newCodeBlock () |
| create a new CodeBlock object belonging to this CodeDocument. | |
| virtual HierarchicalCodeBlock * | newHierarchicalCodeBlock () |
| create a new HierarchicalCodeBlock object belonging to this CodeDocument. | |
| virtual CodeBlockWithComments * | newCodeBlockWithComments () |
| create a new CodeBlockWithComments object belonging to this CodeDocument. | |
| virtual QString | getUniqueTag (QString prefix=QString("")) |
| QString | cleanName (const QString &name) |
| a little utility method to make life easier for the code document programmer | |
| virtual void | synchronize () |
Protected Member Functions | |
| virtual void | setAttributesOnNode (QDomDocument &doc, QDomElement &blockElement) |
| set attributes of the node that represents this class in the XMI document. | |
| virtual void | setAttributesFromNode (QDomElement &element) |
| set the class attributes of this object from the passed element node. | |
| void | addChildTagToMap (const QString &tag, TextBlock *tb) |
| void | removeChildTagFromMap (const QString &tag) |
| void | updateHeader () |
| void | resetTextBlocks () |
| virtual void | updateContent () |
| virtual TextBlock * | findCodeClassFieldTextBlockByTag (const QString &tag) |
Friends | |
| class | HierarchicalCodeBlock |
Detailed Description
class CodeDocument A document containing the code for one file.
Definition at line 45 of file codedocument.h.
Constructor & Destructor Documentation
|
|
Basic constructor for class.
Definition at line 34 of file codedocument.cpp. |
|
|
Empty Destructor.
Definition at line 40 of file codedocument.cpp. |
Member Function Documentation
|
|
Set the value of m_fileExtension.
Definition at line 82 of file codedocument.cpp. Referenced by CPPHeaderCodeDocument::CPPHeaderCodeDocument(), CPPMakefileCodeDocument::CPPMakefileCodeDocument(), JavaANTCodeDocument::JavaANTCodeDocument(), and setAttributesFromNode(). |
|
|
Get the value of m_fileExtension.
Definition at line 91 of file codedocument.cpp. Referenced by setAttributesOnNode(). |
|
|
Set the complete value (name plus any extension) of m_filename.
Definition at line 66 of file codedocument.cpp. Referenced by CPPMakefileCodeDocument::CPPMakefileCodeDocument(), JavaANTCodeDocument::JavaANTCodeDocument(), and setAttributesFromNode(). |
|
|
Get the value of m_filename. This name is the "complete" filename, meaning that it contains both the file name plus any extension (e.g. "file.cpp")
Definition at line 74 of file codedocument.cpp. Referenced by RubyClassifierCodeDocument::loadChildTextBlocksFromNode(), JavaClassifierCodeDocument::loadChildTextBlocksFromNode(), JavaANTCodeDocument::loadChildTextBlocksFromNode(), CPPHeaderCodeDocument::loadChildTextBlocksFromNode(), CodeGenObjectWithTextBlocks::loadChildTextBlocksFromNode(), and setAttributesOnNode(). |
|
|
Set the value of m_package.
Definition at line 99 of file codedocument.cpp. |
|
|
Get the value of the package of this codedocument.
Definition at line 129 of file codedocument.cpp. References UMLObject::getName(). Referenced by RubyClassifierCodeDocument::getPath(), JavaClassifierCodeDocument::getPath(), JavaANTCodeDocument::getPath(), CPPMakefileCodeDocument::getPath(), and getPath(). |
|
|
Get the value of the path to this codedocument.
Reimplemented in CPPMakefileCodeDocument, JavaANTCodeDocument, JavaClassifierCodeDocument, and RubyClassifierCodeDocument. Definition at line 107 of file codedocument.cpp. References getPackage(). |
|
|
Set the value of m_ID.
Definition at line 139 of file codedocument.cpp. Referenced by CodeGenerator::addCodeDocument(), CPPMakefileCodeDocument::CPPMakefileCodeDocument(), JavaANTCodeDocument::JavaANTCodeDocument(), and setAttributesFromNode(). |
|
|
Get the value of m_ID.
Definition at line 147 of file codedocument.cpp. Referenced by CodeGenerator::addCodeDocument(), CodeGenerator::removeCodeDocument(), setAttributesOnNode(), and ClassifierCodeDocument::setAttributesOnNode(). |
|
|
Set the value of m_writeOutCode Whether or not to write out this code document and any codeblocks, etc that it owns.
Definition at line 157 of file codedocument.cpp. Referenced by setAttributesFromNode(). |
|
|
Get the value of m_writeOutCode Whether or not to write out this code document and any codeblocks, etc that it owns.
Definition at line 167 of file codedocument.cpp. Referenced by setAttributesOnNode(), and toString(). |
|
|
Set a Header comment object.
Definition at line 174 of file codedocument.cpp. |
|
|
Get the Header comment object.
Definition at line 181 of file codedocument.cpp. Referenced by setAttributesFromNode(), setAttributesOnNode(), and toString(). |
|
||||||||||||||||
|
Insert a new text block after the existing text block. Returns false if it cannot insert the textblock. Implements CodeGenObjectWithTextBlocks. Definition at line 208 of file codedocument.cpp. References findTextBlockByTag(), TextBlock::getTag(), getUniqueTag(), and TextBlock::setTag(). |
|
||||||||||||
|
Lookup a certain textblock by its tag value, returns NULL if it cant find the TextBlock with such a tag. If descendIntoChildren is true, then any child hierarchical textblocks will also be searched for a match. Definition at line 467 of file codedocument.cpp. Referenced by ClassifierCodeDocument::addOperation(), getUniqueTag(), insertTextBlock(), ClassifierCodeDocument::removeOperation(), and CPPHeaderCodeDocument::updateContent(). |
|
|
create the string representation of this object.
Reimplemented in CPPMakefileCodeDocument. Definition at line 300 of file codedocument.cpp. References getHeader(), CodeGenObjectWithTextBlocks::getTextBlockList(), getWriteOutCode(), and TextBlock::toString(). Referenced by CodeGenerator::writeListedCodeDocsToFile(). |
|
||||||||||||
|
Save the XMI representation of this object.
Reimplemented in ClassifierCodeDocument, and JavaANTCodeDocument. Definition at line 420 of file codedocument.cpp. References setAttributesOnNode(). Referenced by CodeGenerator::saveToXMI(). |
|
|
load params from the appropriate XMI element node.
Reimplemented in ClassifierCodeDocument, and JavaANTCodeDocument. Definition at line 337 of file codedocument.cpp. References setAttributesFromNode(). Referenced by CodeGenerator::loadFromXMI(). |
|
|
create a new CodeBlock object belonging to this CodeDocument.
Implements CodeGenObjectWithTextBlocks. Definition at line 439 of file codedocument.cpp. Referenced by RubyClassifierCodeDocument::loadChildTextBlocksFromNode(), JavaClassifierCodeDocument::loadChildTextBlocksFromNode(), JavaANTCodeDocument::loadChildTextBlocksFromNode(), and CPPHeaderCodeDocument::loadChildTextBlocksFromNode(). |
|
|
create a new HierarchicalCodeBlock object belonging to this CodeDocument.
Implements CodeGenObjectWithTextBlocks. Reimplemented in JavaANTCodeDocument. Definition at line 451 of file codedocument.cpp. Referenced by RubyClassifierCodeDocument::loadChildTextBlocksFromNode(), JavaClassifierCodeDocument::loadChildTextBlocksFromNode(), and CPPHeaderCodeDocument::loadChildTextBlocksFromNode(). |
|
|
create a new CodeBlockWithComments object belonging to this CodeDocument.
Implements CodeGenObjectWithTextBlocks. Definition at line 447 of file codedocument.cpp. Referenced by RubyClassifierCodeDocument::loadChildTextBlocksFromNode(), JavaClassifierCodeDocument::loadChildTextBlocksFromNode(), JavaANTCodeDocument::loadChildTextBlocksFromNode(), and CPPHeaderCodeDocument::loadChildTextBlocksFromNode(). |
|
|
Implements CodeGenObjectWithTextBlocks. Definition at line 189 of file codedocument.cpp. References findTextBlockByTag(). Referenced by insertTextBlock(). |
|
|
a little utility method to make life easier for the code document programmer
Definition at line 271 of file codedocument.cpp. References CodeGenerator::cleanName(). Referenced by CodeClassField::cleanName(), and CPPHeaderCodeDocument::updateContent(). |
|
||||||||||||
|
set attributes of the node that represents this class in the XMI document.
Reimplemented from CodeGenObjectWithTextBlocks. Reimplemented in ClassifierCodeDocument, and JavaANTCodeDocument. Definition at line 344 of file codedocument.cpp. References getFileExtension(), getFileName(), getHeader(), getID(), UMLObject::getID(), getWriteOutCode(), CodeComment::saveToXMI(), and CodeGenObjectWithTextBlocks::setAttributesOnNode(). Referenced by saveToXMI(), JavaANTCodeDocument::setAttributesOnNode(), and ClassifierCodeDocument::setAttributesOnNode(). |
|
|
set the class attributes of this object from the passed element node.
Reimplemented from CodeGenObjectWithTextBlocks. Reimplemented in ClassifierCodeDocument, and JavaANTCodeDocument. Definition at line 375 of file codedocument.cpp. References UMLDoc::findObjectById(), UMLDoc::findUMLObject(), UMLApp::getDocument(), getHeader(), CodeComment::loadFromXMI(), CodeGenObjectWithTextBlocks::setAttributesFromNode(), setFileExtension(), setFileName(), setID(), and setWriteOutCode(). Referenced by loadFromXMI(), JavaANTCodeDocument::setAttributesFromNode(), and ClassifierCodeDocument::setAttributesFromNode(). |
The documentation for this class was generated from the following files:
