umbrello: CPPHeaderCodeDocument Class Reference

umbrello 2.38.2 Umbrello UML Modeller is a Unified Modelling Language (UML) diagram program based on KDE Technology

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files

- Class List
- Class Index
- Class Hierarchy
- Class Members

Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes | List of all members
CPPHeaderCodeDocument Class Reference

`#include <cppheadercodedocument.h>`

Inheritance diagram for CPPHeaderCodeDocument:

## Public Member Functions
| CPPHeaderCodeDocument (UMLClassifier *classifier)
virtual | ~CPPHeaderCodeDocument ()
bool | addCodeOperation (CodeOperation *op)
void | updateContent ()
Public Member Functions inherited from ClassifierCodeDocument
| ClassifierCodeDocument (UMLClassifier *parent)
virtual | ~ClassifierCodeDocument ()
bool | addCodeClassField (CodeClassField *add_object)
bool | removeCodeClassField (CodeClassField *remove_object)
CodeClassFieldList * | getCodeClassFieldList ()
bool | parentIsInterface () const
bool | parentIsClass () const
bool | hasAssociationClassFields () const
bool | hasAttributeClassFields () const
bool | hasObjectVectorClassFields () const
bool | hasClassFields () const
QList< const CodeOperation * > | getCodeOperations () const
CodeClassFieldList | getSpecificClassFields (CodeClassField::ClassFieldType cfType) const
CodeClassFieldList | getSpecificClassFields (CodeClassField::ClassFieldType cfType, bool isStatic) const
CodeClassFieldList | getSpecificClassFields (CodeClassField::ClassFieldType cfType, Uml::Visibility::Enum visibility) const
CodeClassFieldList | getSpecificClassFields (CodeClassField::ClassFieldType cfType, bool isStatic, Uml::Visibility::Enum visibility) const
CodeClassField * | findCodeClassFieldFromParentID (Uml::ID::Type id, int role_id=-1)
UMLClassifier * | getParentClassifier () const
void | addCodeClassFieldMethods (CodeClassFieldList &list)
virtual void | initCodeClassFields ()
virtual void | synchronize ()
virtual bool | addCodeOperation (CodeOperation *opBlock)=0
virtual void | updateContent ()=0
virtual void | saveToXMI (QXmlStreamWriter &writer)
virtual void | loadFromXMI (QDomElement &root)
Public Member Functions inherited from CodeDocument
| CodeDocument ()
virtual | ~CodeDocument ()
void | setFileExtension (const QString &new_var)
QString | getFileExtension () const
void | setFileName (const QString &new_var)
QString | getFileName () const
void | setPackage (UMLPackage *new_var)
QString | getPackage () const
virtual QString | getPath () const
void | setID (const QString &new_id)
QString | ID () const
void | setWriteOutCode (bool new_var)
bool | getWriteOutCode () const
void | setHeader (CodeComment *comment)
CodeComment * | getHeader () const
bool | insertTextBlock (TextBlock *newBlock, TextBlock *existingBlock, bool after=true)
TextBlock * | findTextBlockByTag (const QString &tag, bool descendIntoChildren=false) const
virtual QString | toString () const
virtual void | saveToXMI (QXmlStreamWriter &writer)
virtual void | loadFromXMI (QDomElement &root)
virtual CodeBlock * | newCodeBlock ()
virtual HierarchicalCodeBlock * | newHierarchicalCodeBlock ()
virtual CodeBlockWithComments * | newCodeBlockWithComments ()
virtual QString | getUniqueTag (const QString &prefix=QString())
QString | cleanName (const QString &name)
virtual void | synchronize ()
virtual void | updateContent ()
Public Member Functions inherited from CodeGenObjectWithTextBlocks
| CodeGenObjectWithTextBlocks (CodeDocument *parent)
virtual | ~CodeGenObjectWithTextBlocks ()
virtual bool | addTextBlock (TextBlock *add_object)
virtual bool | removeTextBlock (TextBlock *remove_object)
virtual bool | insertTextBlock (TextBlock *newBlock, TextBlock *existingBlock, bool after)=0
TextBlockList * | getTextBlockList () const
virtual HierarchicalCodeBlock * | getHierarchicalCodeBlock (const QString &tag, const QString &comment, int indentLevel)
virtual CodeBlockWithComments * | getCodeBlockWithComments (const QString &tag, const QString &comment, int indentLevel)
CodeComment * | addOrUpdateTaggedCodeComment (const QString &tag=QString(), const QString &text=QString(), int indentationLevel=0)
CodeBlockWithComments * | addOrUpdateTaggedCodeBlockWithComments (const QString &tag, const QString &text, const QString &ctext, int indentLevel, bool forceUserBlockUpdate)
TextBlock * | findTextBlockByTag (const QString &tag)
virtual QString | getUniqueTag (const QString &prefix=QString())=0
virtual CodeBlock * | newCodeBlock ()=0
virtual CodeBlockWithComments * | newCodeBlockWithComments ()=0
virtual HierarchicalCodeBlock * | newHierarchicalCodeBlock ()=0
CodeGenObjectWithTextBlocks * | findParentObjectForTaggedTextBlock (const QString &tag)

## Protected Member Functions
void | resetTextBlocks ()
virtual void | loadChildTextBlocksFromNode (QDomElement &root)
void | addOrUpdateCodeClassFieldMethodsInCodeBlock (CodeClassFieldList &list, CPPHeaderClassDeclarationBlock *codeBlock)
CodeComment * | newCodeComment ()
Protected Member Functions inherited from ClassifierCodeDocument
void | loadClassFieldsFromXMI (QDomElement &childElem)
virtual void | setAttributesOnNode (QXmlStreamWriter &writer)
virtual void | setAttributesFromNode (QDomElement &element)
TextBlock * | findCodeClassFieldTextBlockByTag (const QString &tag)
void | declareClassFields (CodeClassFieldList &list, CodeGenObjectWithTextBlocks *parent)
void | syncClassFields ()
void | syncNamesToParent ()
Protected Member Functions inherited from CodeDocument
virtual void | setAttributesOnNode (QXmlStreamWriter &writer)
virtual void | setAttributesFromNode (QDomElement &element)
void | addChildTagToMap (const QString &tag, TextBlock *tb)
void | removeChildTagFromMap (const QString &tag)
void | updateHeader ()
void | resetTextBlocks ()
virtual TextBlock * | findCodeClassFieldTextBlockByTag (const QString &tag)
Protected Member Functions inherited from CodeGenObjectWithTextBlocks
virtual void | setAttributesOnNode (QXmlStreamWriter &writer)
virtual void | setAttributesFromNode (QDomElement &element)
void | setAttributesFromObject (CodeGenObjectWithTextBlocks *obj)
virtual void | loadChildTextBlocksFromNode (QDomElement &root)
virtual void | resetTextBlocks ()
virtual TextBlock * | findCodeClassFieldTextBlockByTag (const QString &tag)=0

## Private Member Functions
CPPHeaderClassDeclarationBlock * | getClassDecl ()

## Private Attributes
CPPHeaderClassDeclarationBlock * | m_classDeclCodeBlock
HierarchicalCodeBlock * | m_publicBlock
HierarchicalCodeBlock * | m_privateBlock
HierarchicalCodeBlock * | m_protectedBlock
HierarchicalCodeBlock * | m_namespaceBlock
HierarchicalCodeBlock * | m_pubConstructorBlock
HierarchicalCodeBlock * | m_protConstructorBlock
HierarchicalCodeBlock * | m_privConstructorBlock
HierarchicalCodeBlock * | m_pubOperationsBlock
HierarchicalCodeBlock * | m_privOperationsBlock
HierarchicalCodeBlock * | m_protOperationsBlock

## Additional Inherited Members
Public Slots inherited from ClassifierCodeDocument
void | addAttributeClassField (UMLClassifierListItem *at, bool syncToParentIfAdded=true)
void | addAssociationClassField (UMLAssociation *assoc, bool syncToParentIfAdded=true)
void | removeAttributeClassField (UMLClassifierListItem *at)
void | removeAssociationClassField (UMLAssociation *assoc)
void | addOperation (UMLClassifierListItem *obj)
void | removeOperation (UMLClassifierListItem *obj)
void | syncToParent ()
Protected Attributes inherited from CodeGenObjectWithTextBlocks
QMap< QString, TextBlock * > | m_textBlockTagMap
TextBlockList | m_textblockVector

## Detailed Description

class CPPHeaderCodeDocument A CPP UMLClassifier Header Code Document. We carve the CPP document up into 2 documents, "source" and "header". This one represents the header portion. The sections of each are as follows:

- header
- includes
- import statements
- class declaration
- guts of the class (e.g. field decl, accessor methods, operations, dependent classes)

## Constructor & Destructor Documentation

## ◆ CPPHeaderCodeDocument()

CPPHeaderCodeDocument::CPPHeaderCodeDocument | ( | UMLClassifier * | concept | ) |
| explicit

Constructor.

## ◆ ~CPPHeaderCodeDocument()

CPPHeaderCodeDocument::~CPPHeaderCodeDocument | ( |  | ) |
| virtual

Destructor.

## Member Function Documentation

## ◆ addCodeOperation()

bool CPPHeaderCodeDocument::addCodeOperation | ( | CodeOperation * | op | ) |
| virtual

Add a code operation to this cpp classifier code document. In the vanilla version, we just tack all operations on the end of the document.

Parameters

  op | the code operation

Returns
  bool which is true IF the code operation was added successfully

Implements ClassifierCodeDocument.

## ◆ addOrUpdateCodeClassFieldMethodsInCodeBlock()

void CPPHeaderCodeDocument::addOrUpdateCodeClassFieldMethodsInCodeBlock | ( | CodeClassFieldList & | list,
|  | CPPHeaderClassDeclarationBlock * | codeBlock
| ) |  |
| protected

## ◆ getClassDecl()

CPPHeaderClassDeclarationBlock * CPPHeaderCodeDocument::getClassDecl | ( |  | ) |
| private

## ◆ loadChildTextBlocksFromNode()

void CPPHeaderCodeDocument::loadChildTextBlocksFromNode | ( | QDomElement & | root | ) |
| protectedvirtual

Need to overwrite this for cpp header since we need to pick up the header class declaration block.

Reimplemented from CodeGenObjectWithTextBlocks.

## ◆ newCodeComment()

CodeComment * CPPHeaderCodeDocument::newCodeComment | ( |  | ) |
| protected

Create a new code comment. IN this case it is a CPPCodeDocumentation object.

## ◆ resetTextBlocks()

void CPPHeaderCodeDocument::resetTextBlocks | ( |  | ) |
| protectedvirtual

Save the XMI representation of this object

Reimplemented from CodeDocument.

## ◆ updateContent()

void CPPHeaderCodeDocument::updateContent | ( |  | ) |
| virtual

Save the XMI representation of this object

Returns
  bool status of save

Implements ClassifierCodeDocument.

## Member Data Documentation

## ◆ m_classDeclCodeBlock

CPPHeaderClassDeclarationBlock* CPPHeaderCodeDocument::m_classDeclCodeBlock
| private

## ◆ m_namespaceBlock

HierarchicalCodeBlock* CPPHeaderCodeDocument::m_namespaceBlock
| private

## ◆ m_privateBlock

HierarchicalCodeBlock* CPPHeaderCodeDocument::m_privateBlock
| private

## ◆ m_privConstructorBlock

HierarchicalCodeBlock* CPPHeaderCodeDocument::m_privConstructorBlock
| private

## ◆ m_privOperationsBlock

HierarchicalCodeBlock* CPPHeaderCodeDocument::m_privOperationsBlock
| private

## ◆ m_protConstructorBlock

HierarchicalCodeBlock* CPPHeaderCodeDocument::m_protConstructorBlock
| private

## ◆ m_protectedBlock

HierarchicalCodeBlock* CPPHeaderCodeDocument::m_protectedBlock
| private

## ◆ m_protOperationsBlock

HierarchicalCodeBlock* CPPHeaderCodeDocument::m_protOperationsBlock
| private

## ◆ m_pubConstructorBlock

HierarchicalCodeBlock* CPPHeaderCodeDocument::m_pubConstructorBlock
| private

## ◆ m_publicBlock

HierarchicalCodeBlock* CPPHeaderCodeDocument::m_publicBlock
| private

## ◆ m_pubOperationsBlock

HierarchicalCodeBlock* CPPHeaderCodeDocument::m_pubOperationsBlock
| private

The documentation for this class was generated from the following files:

- umbrello/codegenerators/cpp/cppheadercodedocument.h
- umbrello/codegenerators/cpp/cppheadercodedocument.cpp