umbrello 2.34.70-5524f40e1
Umbrello UML Modeller is a Unified Modelling Language (UML) diagram program based on KDE Technology
Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes | List of all members
RubyClassifierCodeDocument Class Reference

#include <rubyclassifiercodedocument.h>

Inheritance diagram for RubyClassifierCodeDocument:
Collaboration diagram for RubyClassifierCodeDocument:

Public Member Functions

 RubyClassifierCodeDocument (UMLClassifier *classifier)
 
virtual ~RubyClassifierCodeDocument ()
 
RubyCodeGenerationPolicygetRubyPolicy () const
 
QString getRubyClassName (const QString &name) const
 
QString getPath () const
 
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)
 
CodeClassFieldListgetCodeClassFieldList ()
 
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
 
CodeClassFieldfindCodeClassFieldFromParentID (Uml::ID::Type id, int role_id=-1)
 
UMLClassifiergetParentClassifier () const
 
void addCodeClassFieldMethods (CodeClassFieldList &list)
 
virtual void initCodeClassFields ()
 
virtual void synchronize ()
 
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
 
void setID (const QString &new_id)
 
QString ID () const
 
void setWriteOutCode (bool new_var)
 
bool getWriteOutCode () const
 
void setHeader (CodeComment *comment)
 
CodeCommentgetHeader () const
 
bool insertTextBlock (TextBlock *newBlock, TextBlock *existingBlock, bool after=true)
 
TextBlockfindTextBlockByTag (const QString &tag, bool descendIntoChildren=false) const
 
virtual QString toString () const
 
virtual CodeBlocknewCodeBlock ()
 
virtual HierarchicalCodeBlocknewHierarchicalCodeBlock ()
 
virtual CodeBlockWithCommentsnewCodeBlockWithComments ()
 
virtual QString getUniqueTag (const QString &prefix=QString())
 
QString cleanName (const QString &name)
 
- Public Member Functions inherited from CodeGenObjectWithTextBlocks
 CodeGenObjectWithTextBlocks (CodeDocument *parent)
 
virtual ~CodeGenObjectWithTextBlocks ()
 
virtual bool addTextBlock (TextBlock *add_object)
 
virtual bool removeTextBlock (TextBlock *remove_object)
 
TextBlockListgetTextBlockList () const
 
virtual HierarchicalCodeBlockgetHierarchicalCodeBlock (const QString &tag, const QString &comment, int indentLevel)
 
virtual CodeBlockWithCommentsgetCodeBlockWithComments (const QString &tag, const QString &comment, int indentLevel)
 
CodeCommentaddOrUpdateTaggedCodeComment (const QString &tag=QString(), const QString &text=QString(), int indentationLevel=0)
 
CodeBlockWithCommentsaddOrUpdateTaggedCodeBlockWithComments (const QString &tag, const QString &text, const QString &ctext, int indentLevel, bool forceUserBlockUpdate)
 
TextBlockfindTextBlockByTag (const QString &tag)
 
CodeGenObjectWithTextBlocksfindParentObjectForTaggedTextBlock (const QString &tag)
 

Protected Member Functions

void resetTextBlocks ()
 
virtual void loadChildTextBlocksFromNode (QDomElement &root)
 
void addOrUpdateCodeClassFieldMethodsInCodeBlock (CodeClassFieldList &list, RubyClassDeclarationBlock *codeBlock)
 
bool forceDoc ()
 
- Protected Member Functions inherited from ClassifierCodeDocument
void loadClassFieldsFromXMI (QDomElement &childElem)
 
virtual void setAttributesOnNode (QXmlStreamWriter &writer)
 
virtual void setAttributesFromNode (QDomElement &element)
 
TextBlockfindCodeClassFieldTextBlockByTag (const QString &tag)
 
void declareClassFields (CodeClassFieldList &list, CodeGenObjectWithTextBlocks *parent)
 
void syncClassFields ()
 
void syncNamesToParent ()
 
- Protected Member Functions inherited from CodeDocument
void addChildTagToMap (const QString &tag, TextBlock *tb)
 
void removeChildTagFromMap (const QString &tag)
 
void updateHeader ()
 
- Protected Member Functions inherited from CodeGenObjectWithTextBlocks
void setAttributesFromObject (CodeGenObjectWithTextBlocks *obj)
 

Private Member Functions

void init ()
 
RubyClassDeclarationBlockgetClassDecl ()
 

Private Attributes

RubyClassDeclarationBlockclassDeclCodeBlock
 
HierarchicalCodeBlockconstructorBlock
 
HierarchicalCodeBlockoperationsBlock
 
HierarchicalCodeBlockpublicBlock
 
HierarchicalCodeBlockprivateBlock
 
HierarchicalCodeBlockprotectedBlock
 
HierarchicalCodeBlockpubConstructorBlock
 
HierarchicalCodeBlockprotConstructorBlock
 
HierarchicalCodeBlockprivConstructorBlock
 
HierarchicalCodeBlockpubOperationsBlock
 
HierarchicalCodeBlockprivOperationsBlock
 
HierarchicalCodeBlockprotOperationsBlock
 

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 RubyClassifierCodeDocument A Ruby UMLClassifier Code Document. We carve the Ruby document up into sections as follows:

Constructor & Destructor Documentation

◆ RubyClassifierCodeDocument()

RubyClassifierCodeDocument::RubyClassifierCodeDocument ( UMLClassifier concept)
explicit

Constructor.

Here is the call graph for this function:

◆ ~RubyClassifierCodeDocument()

RubyClassifierCodeDocument::~RubyClassifierCodeDocument ( )
virtual

Empty Destructor.

Member Function Documentation

◆ addCodeOperation()

bool RubyClassifierCodeDocument::addCodeOperation ( CodeOperation op)
virtual

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

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

Implements ClassifierCodeDocument.

Here is the call graph for this function:

◆ addOrUpdateCodeClassFieldMethodsInCodeBlock()

void RubyClassifierCodeDocument::addOrUpdateCodeClassFieldMethodsInCodeBlock ( CodeClassFieldList list,
RubyClassDeclarationBlock codeBlock 
)
protected

◆ forceDoc()

bool RubyClassifierCodeDocument::forceDoc ( )
protected

◆ getClassDecl()

RubyClassDeclarationBlock * RubyClassifierCodeDocument::getClassDecl ( )
private
Here is the call graph for this function:

◆ getPath()

QString RubyClassifierCodeDocument::getPath ( ) const
virtual

Overwritten by Ruby language implementation to get lowercase path.

Reimplemented from CodeDocument.

Here is the call graph for this function:

◆ getRubyClassName()

QString RubyClassifierCodeDocument::getRubyClassName ( const QString &  name) const
Here is the call graph for this function:

◆ getRubyPolicy()

RubyCodeGenerationPolicy * RubyClassifierCodeDocument::getRubyPolicy ( ) const

Make it easier on ourselves.

Here is the call graph for this function:

◆ init()

void RubyClassifierCodeDocument::init ( )
private
Here is the call graph for this function:

◆ loadChildTextBlocksFromNode()

void RubyClassifierCodeDocument::loadChildTextBlocksFromNode ( QDomElement &  root)
protectedvirtual

Need to overwrite this for ruby since we need to pick up the ruby class declaration block. Sigh. NOT optimal. The only reason that we need to have this is so we can create the RubyClassDeclarationBlock. would be better if we could create a handler interface that each codeblock used so all we have to do here is add the handler for "rubyclassdeclarationblock".

Reimplemented from CodeGenObjectWithTextBlocks.

Here is the call graph for this function:

◆ resetTextBlocks()

void RubyClassifierCodeDocument::resetTextBlocks ( )
protectedvirtual

Reset/clear our inventory of textblocks in this document.

Reimplemented from CodeDocument.

Here is the call graph for this function:

◆ updateContent()

void RubyClassifierCodeDocument::updateContent ( )
virtual

Update the content of this code document. This is where you should lay out your code document structure of textblocks in the inheriting class, should it have any text in it. Vanilla code documents don't have much to do.. override this with a different version for your own documents.

Implements ClassifierCodeDocument.

Here is the call graph for this function:

Member Data Documentation

◆ classDeclCodeBlock

RubyClassDeclarationBlock* RubyClassifierCodeDocument::classDeclCodeBlock
private

◆ constructorBlock

HierarchicalCodeBlock* RubyClassifierCodeDocument::constructorBlock
private

◆ operationsBlock

HierarchicalCodeBlock* RubyClassifierCodeDocument::operationsBlock
private

◆ privateBlock

HierarchicalCodeBlock* RubyClassifierCodeDocument::privateBlock
private

◆ privConstructorBlock

HierarchicalCodeBlock* RubyClassifierCodeDocument::privConstructorBlock
private

◆ privOperationsBlock

HierarchicalCodeBlock* RubyClassifierCodeDocument::privOperationsBlock
private

◆ protConstructorBlock

HierarchicalCodeBlock* RubyClassifierCodeDocument::protConstructorBlock
private

◆ protectedBlock

HierarchicalCodeBlock* RubyClassifierCodeDocument::protectedBlock
private

◆ protOperationsBlock

HierarchicalCodeBlock* RubyClassifierCodeDocument::protOperationsBlock
private

◆ pubConstructorBlock

HierarchicalCodeBlock* RubyClassifierCodeDocument::pubConstructorBlock
private

◆ publicBlock

HierarchicalCodeBlock* RubyClassifierCodeDocument::publicBlock
private

◆ pubOperationsBlock

HierarchicalCodeBlock* RubyClassifierCodeDocument::pubOperationsBlock
private

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