umbrello 25.04.3
Umbrello UML Modeller is a Unified Modelling Language (UML) diagram program based on KDE Technology
CodeClassFieldDeclarationBlock Class Referenceabstract

#include <codeclassfielddeclarationblock.h>

Inheritance diagram for CodeClassFieldDeclarationBlock:
OwnedCodeBlock CodeBlockWithComments CodeBlock TextBlock CPPHeaderCodeClassFieldDeclarationBlock CPPSourceCodeClassFieldDeclarationBlock DCodeClassFieldDeclarationBlock JavaCodeClassFieldDeclarationBlock RubyCodeClassFieldDeclarationBlock

Public Slots

virtual void syncToParent ()
Public Slots inherited from OwnedCodeBlock
virtual void syncToParent ()

Public Member Functions

 CodeClassFieldDeclarationBlock (CodeClassField *parent)
virtual ~CodeClassFieldDeclarationBlock ()
CodeClassFieldgetParentClassField ()
UMLObjectgetParentObject ()
virtual void setAttributesFromObject (TextBlock *obj)
virtual void updateContent ()=0
virtual void saveToXMI (QXmlStreamWriter &writer)
virtual void loadFromXMI (QDomElement &root)
Public Member Functions inherited from OwnedCodeBlock
 OwnedCodeBlock (UMLObject *parent)
virtual ~OwnedCodeBlock ()
UMLObjectgetParentObject ()
Public Member Functions inherited from CodeBlockWithComments
 CodeBlockWithComments (CodeDocument *parent, const QString &body=QString(), const QString &comment=QString())
virtual ~CodeBlockWithComments ()
void setComment (CodeComment *object)
CodeCommentgetComment () const
virtual QString toString () const
void setOverallIndentationLevel (int level)
Public Member Functions inherited from CodeBlock
 CodeBlock (CodeDocument *parent, const QString &body=QString())
virtual ~CodeBlock ()
void setContentType (ContentType new_var)
ContentType contentType () const
Public Member Functions inherited from TextBlock
 TextBlock (CodeDocument *parent, const QString &text=QString())
virtual ~TextBlock ()
void setText (const QString &text)
QString getText () const
void appendText (const QString &text)
void setTag (const QString &value)
QString getTag () const
CodeDocumentgetParentDocument () const
void setWriteOutText (bool write)
bool getWriteOutText () const
void setIndentationLevel (int level)
int getIndentationLevel () const
QString getIndentationString (int level=0) const
virtual QString unformatText (const QString &text, const QString &indent=QString())
bool canDelete () const
virtual QString getNewEditorLine (int amount=0)
virtual int firstEditableLine ()
virtual int lastEditableLine ()

Protected Member Functions

virtual void release ()
virtual void setAttributesOnNode (QXmlStreamWriter &writer)
virtual void setAttributesFromNode (QDomElement &element)
void forceRelease ()
Protected Member Functions inherited from TextBlock
void setCanDelete (bool canDelete)

Private Member Functions

void init (CodeClassField *parent)

Private Attributes

CodeClassFieldm_parentclassfield

Friends

class CodeClassField

Additional Inherited Members

Public Types inherited from CodeBlock
enum  ContentType { AutoGenerated =0 , UserGenerated }
Static Public Member Functions inherited from CodeBlock
static QString enumToString (const ContentType &val)
Static Public Member Functions inherited from TextBlock
static QString getIndentation ()
static QString getNewLineEndingChars ()
static QString formatMultiLineText (const QString &work, const QString &linePrefix, const QString &breakStr, bool addBreak=true, bool lastLineHasBreak=true)
static QString encodeText (const QString &text, const QString &endLine)
static QString decodeText (const QString &text, const QString &endLine)

Detailed Description

Used to declare classifier fields (e.g. either class attributes or classifier associations) in the code document for any given code classfield. This is a special CodeBlockWithComments which is "sync'd" to the parent CodeClassField. Note: keep the inheritance sequence: QObject needs to be first in inheritance list. Basically a class to allow for synchronization of the contents based on the values of the parentClassField's parentObject.

Constructor & Destructor Documentation

◆ CodeClassFieldDeclarationBlock()

CodeClassFieldDeclarationBlock::CodeClassFieldDeclarationBlock ( CodeClassField * parentCF)
explicit

Constructor.

◆ ~CodeClassFieldDeclarationBlock()

CodeClassFieldDeclarationBlock::~CodeClassFieldDeclarationBlock ( )
virtual

Empty Destructor

Member Function Documentation

◆ forceRelease()

void CodeClassFieldDeclarationBlock::forceRelease ( )
protected

So parent can actually release this block.

◆ getParentClassField()

CodeClassField * CodeClassFieldDeclarationBlock::getParentClassField ( )

Get the value of m_parentclassfield.

Returns
the value of m_parentclassfield

◆ getParentObject()

UMLObject * CodeClassFieldDeclarationBlock::getParentObject ( )

A utility method to get the parent object of the parentCodeClassfield.

◆ init()

void CodeClassFieldDeclarationBlock::init ( CodeClassField * parent)
private

◆ loadFromXMI()

void CodeClassFieldDeclarationBlock::loadFromXMI ( QDomElement & root)
virtual

Load params from the appropriate XMI element node.

Reimplemented from CodeBlockWithComments.

◆ release()

void CodeClassFieldDeclarationBlock::release ( )
protectedvirtual

Causes the text block to release all of its connections and any other text blocks that it 'owns'. Needed to be called prior to deletion of the textblock.

Reimplemented from OwnedCodeBlock.

◆ saveToXMI()

void CodeClassFieldDeclarationBlock::saveToXMI ( QXmlStreamWriter & writer)
virtual

Save the XMI representation of this object.

Reimplemented from CodeBlockWithComments.

◆ setAttributesFromNode()

void CodeClassFieldDeclarationBlock::setAttributesFromNode ( QDomElement & root)
protectedvirtual

Set the class attributes of this object from the passed element node.

Reimplemented from OwnedCodeBlock.

◆ setAttributesFromObject()

void CodeClassFieldDeclarationBlock::setAttributesFromObject ( TextBlock * obj)
virtual

Set the class attributes from a passed object.

Reimplemented from OwnedCodeBlock.

◆ setAttributesOnNode()

void CodeClassFieldDeclarationBlock::setAttributesOnNode ( QXmlStreamWriter & writer)
protectedvirtual

Set attributes of the node that represents this class in the XMI document.

Reimplemented from OwnedCodeBlock.

◆ syncToParent

void CodeClassFieldDeclarationBlock::syncToParent ( )
virtualslot

◆ updateContent()

◆ CodeClassField

friend class CodeClassField
friend

Member Data Documentation

◆ m_parentclassfield

CodeClassField* CodeClassFieldDeclarationBlock::m_parentclassfield
private

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