umbrello/umbrello
classifiercodedocument.cpp
Go to the documentation of this file.
54 CodeClassFieldList ClassifierCodeDocument::getSpecificClassFields(CodeClassField::ClassFieldType cfType)
70 CodeClassFieldList ClassifierCodeDocument::getSpecificClassFields(CodeClassField::ClassFieldType cfType, bool isStatic)
87 CodeClassFieldList ClassifierCodeDocument::getSpecificClassFields (CodeClassField::ClassFieldType cfType, Uml::Visibility::Enum visibility)
104 CodeClassFieldList ClassifierCodeDocument::getSpecificClassFields (CodeClassField::ClassFieldType cfType, bool isStatic, Uml::Visibility::Enum visibility)
112 if (cf->getClassFieldType() == cfType && cf->getVisibility() == visibility && cf->getStatic() == isStatic)
195 void ClassifierCodeDocument::addAttributeClassField (UMLClassifierListItem *obj, bool syncToParentIfAdded)
390 CodeGenObjectWithTextBlocks * oldParent = findParentObjectForTaggedTextBlock (declBlock->getTag());
398 parent->addTextBlock(declBlock); // wont add it IF its already present. Will give it a tag if missing
433 connect(c, SIGNAL(attributeAdded(UMLClassifierListItem*)), this, SLOT(addAttributeClassField(UMLClassifierListItem*)));
434 connect(c, SIGNAL(attributeRemoved(UMLClassifierListItem*)), this, SLOT(removeAttributeClassField(UMLClassifierListItem*)));
437 connect(c, SIGNAL(sigAssociationEndAdded(UMLAssociation*)), this, SLOT(addAssociationClassField(UMLAssociation*)));
438 connect(c, SIGNAL(sigAssociationEndRemoved(UMLAssociation*)), this, SLOT(removeAssociationClassField(UMLAssociation*)));
439 connect(c, SIGNAL(operationAdded(UMLClassifierListItem*)), this, SLOT(addOperation(UMLClassifierListItem*)));
440 connect(c, SIGNAL(operationRemoved(UMLClassifierListItem*)), this, SLOT(removeOperation(UMLClassifierListItem*)));
570 void ClassifierCodeDocument::addAssociationClassField (UMLAssociation * a, bool syncToParentIfAdded)
698 uError()<<" LoadFromXMI: can not load classfield parent_id:"<<id<<" do you have a corrupt savefile?";
UMLAssociationList getAggregations()
Shorthand for getSpecificAssocs(Uml::at_Aggregation)
Definition: umlcanvasobject.cpp:421
bool removeCodeClassField(CodeClassField *remove_object)
Remove a CodeClassField object from m_classfieldVector List.
Definition: classifiercodedocument.cpp:220
void addAttributeClassField(UMLClassifierListItem *at, bool syncToParentIfAdded=true)
Synchronize this document to the attributes/associations of the parent classifier.
Definition: classifiercodedocument.cpp:195
CodeClassFieldList getSpecificClassFields(CodeClassField::ClassFieldType cfType)
Get a list of codeclassifier objects held by this classifiercodedocument that meet the passed criteri...
Definition: classifiercodedocument.cpp:54
virtual bool addCodeOperation(CodeOperation *opBlock)=0
Will add the code operation in the correct place in the document.
bool hasAttributeClassFields()
Tell if one or more codeclassfields are derived from attributes.
Definition: classifiercodedocument.cpp:166
TextBlock * findCodeClassFieldTextBlockByTag(const QString &tag)
Find a specific textblock held by any code class field in this document by its tag.
Definition: classifiercodedocument.cpp:766
This class defines the non-graphical information required for a UML Classifier (ie a class or interfa...
Definition: classifier.h:39
virtual void initCodeClassFields()
Add codeclassfields to this classifiercodedocument.
Definition: classifiercodedocument.cpp:535
UMLAssociationList getSpecificAssocs(Uml::AssociationType::Enum assocType)
Return the subset of m_List that matches the given type.
Definition: umlcanvasobject.cpp:61
QString multiplicity() const
Returns the multiplicity assigned to the role.
Definition: umlrole.cpp:96
virtual void updateContent()=0
Update the content of this code document.
Classifiers (classes, interfaces) have lists of operations, attributes, templates and others...
Definition: classifierlistitem.h:29
Definition: codeclassfield.h:34
Definition: basictypes.h:209
void removeOperation(UMLClassifierListItem *obj)
Definition: classifiercodedocument.cpp:326
void updateHeader()
Update the header text of this codedocument (text and status of the head comment).
Definition: codedocument.cpp:278
bool addCodeClassField(CodeClassField *add_object)
Add a CodeClassField object to the m_classfieldVector List We DON'T add methods of the code classfiel...
Definition: classifiercodedocument.cpp:178
CodeClassFieldList * getCodeClassFieldList()
Get the list of CodeClassField objects held by m_classfieldVector.
Definition: classifiercodedocument.cpp:262
Definition: basictypes.h:210
virtual void saveToXMI(QDomDocument &doc, QDomElement &root)
Save the XMI representation of this object.
Definition: classifiercodedocument.cpp:708
virtual void setAttributesOnNode(QDomDocument &doc, QDomElement &blockElement)
Set attributes of the node that represents this class in the XMI document.
Definition: classifiercodedocument.cpp:744
void loadClassFieldsFromXMI(QDomElement &childElem)
Load CodeClassFields from XMI element node.
Definition: classifiercodedocument.cpp:674
This sub-class adds copyInto and clone to the QPtrList base class.
Definition: umlattributelist.h:26
static QString findTag(UMLOperation *op)
Find the value of the tag that this operation would have.
Definition: codeoperation.cpp:91
void addOperation(UMLClassifierListItem *obj)
Definition: classifiercodedocument.cpp:298
UMLClassifier * getParentClassifier()
Get the value of m_parentclassifier.
Definition: classifiercodedocument.cpp:271
Used to declare classifier fields (e.g.
Definition: codeclassfielddeclarationblock.h:29
ClassFieldType getClassFieldType() const
Get the type of classfield this is.
Definition: codeclassfield.cpp:135
void syncClassFields()
Force synchronization of child classfields to their parent objects.
Definition: classifiercodedocument.cpp:488
virtual void setAttributesFromNode(QDomElement &element)
Set the class attributes of this object from the passed element node.
Definition: classifiercodedocument.cpp:615
virtual bool addTextBlock(TextBlock *add_object)
Add a TextBlock object to the m_textblockVector List.
Definition: codegenobjectwithtextblocks.cpp:57
void removeAttributeClassField(UMLClassifierListItem *at)
Definition: classifiercodedocument.cpp:236
CodeClassField * newCodeClassField(ClassifierCodeDocument *ccd, UMLAttribute *at)
Definition: codegenfactory.cpp:267
This class contains the non-graphic representation of an association.
Definition: association.h:32
bool parentIsClass()
Return if the parent classifier is a class.
Definition: classifiercodedocument.cpp:405
virtual void loadFromXMI(QDomElement &root)
Load params from the appropriate XMI element node.
Definition: codeclassfield.cpp:228
Definition: codeoperation.h:23
bool parentIsInterface()
Return if the parent classifier is an interface.
Definition: classifiercodedocument.cpp:413
virtual void setAttributesOnNode(QDomDocument &doc, QDomElement &blockElement)
Set attributes of the node that represents this class in the XMI document.
Definition: codedocument.cpp:356
UMLAssociationList getCompositions()
Shorthand for getSpecificAssocs(Uml::at_Composition)
Definition: umlcanvasobject.cpp:431
virtual void setAttributesFromNode(QDomElement &element)
Set the class attributes of this object from the passed element node.
Definition: codedocument.cpp:386
CodeClassField * findCodeClassFieldFromParentID(Uml::ID::Type id, int role_id=-1)
Definition: classifiercodedocument.cpp:644
Definition: codeaccessormethod.h:20
This abstract class is for code generator objects which 'own' text blocks.
Definition: codegenobjectwithtextblocks.h:31
UMLRole * getUMLRole(Uml::RoleType::Enum role) const
Get the underlying UMLRole object for the given role.
Definition: association.cpp:563
TextBlockList * getTextBlockList() const
Get the list of TextBlock objects held by m_textblockVector.
Definition: codegenobjectwithtextblocks.cpp:46
TextBlock * findTextBlockByTag(const QString &tag, bool descendIntoChildren=false)
Lookup a certain textblock by its tag value, returns NULL if it can not find the TextBlock with such ...
Definition: codedocument.cpp:499
void setFileName(const QString &new_var)
Set the complete value (name plus any extension) of m_filename.
Definition: codedocument.cpp:53
Definition: umlobject.h:53
virtual void loadFromXMI(QDomElement &root)
Load params from the appropriate XMI element node.
Definition: classifiercodedocument.cpp:731
QList< CodeOperation * > getCodeOperations()
Get a list of codeoperation objects held by this classifiercodedocument.
Definition: classifiercodedocument.cpp:280
UMLAttributeList getAttributeList() const
Returns the attributes for the specified scope.
Definition: classifier.cpp:441
The fundemental unit of text within an output file containing code.
Definition: textblock.h:24
UMLPackage * umlPackage()
Returns the UMLPackage that this class is located in.
Definition: umlobject.cpp:641
Definition: umlobject.h:56
Uml::Visibility::Enum getVisibility() const
Utility method to get the value of parent object scope.
Definition: codeparameter.cpp:89
This class contains the non-graphic representation of an association role.
Definition: umlrole.h:24
CodeClassFieldDeclarationBlock * getDeclarationCodeBlock()
Return the declaration statement for this class field object.
Definition: codeclassfield.cpp:220
void syncNamesToParent()
IF the classifier object is modified, this will get called.
Definition: classifiercodedocument.cpp:461
Uml::RoleType::Enum role() const
Get the 'id' of the role (NOT the parent object).
Definition: umlrole.cpp:152
bool hasAssociationClassFields()
Tell if one or more codeclassfields are derived from associations.
Definition: classifiercodedocument.cpp:157
QList< CodeAccessorMethod * > CodeAccessorMethodList
Definition: codeaccessormethodlist.h:17
void removeAssociationClassField(UMLAssociation *assoc)
Definition: classifiercodedocument.cpp:243
void declareClassFields(CodeClassFieldList &list, CodeGenObjectWithTextBlocks *parent)
Add declaration blocks for the passed classfields.
Definition: classifiercodedocument.cpp:373
virtual bool removeTextBlock(TextBlock *remove_object)
Remove a TextBlock object from m_textblockVector list.
Definition: codegenobjectwithtextblocks.cpp:95
void addAssociationClassField(UMLAssociation *assoc, bool syncToParentIfAdded=true)
Definition: classifiercodedocument.cpp:570
bool hasObjectVectorClassFields()
Tell if any of the accessor classfields will be of lists of objects.
Definition: classifiercodedocument.cpp:124
static QString cleanName(const QString &name)
Replaces spaces with underscores and capitalises as defined in m_modname.
Definition: codegenerator.cpp:609
Uml::ID::Type getObjectId(Uml::RoleType::Enum role) const
Returns the ID of the UMLObject assigned to the given role.
Definition: association.cpp:488
CodeAccessorMethodList getMethodList() const
Get the list of Method objects held by m_methodVector.
Definition: codeclassfield.cpp:190
bool hasClassFields()
Does this object have any classfields declared?
Definition: classifiercodedocument.cpp:147
CodeOperation * newCodeOperation(ClassifierCodeDocument *ccd, UMLOperation *op)
Definition: codegenfactory.cpp:224
void addCodeClassFieldMethods(CodeClassFieldList &list)
A utility method that allows user to easily add classfield methods to this document.
Definition: classifiercodedocument.cpp:348
bool getStatic()
Utility method to get the value of parent object static Whether or not this is static.
Definition: codeparameter.cpp:57
Enum fromInt(int item)
Convert a integer item into RoleType representation.
Definition: basictypes.cpp:739
virtual void synchronize()
Cause this classifier code document to synchronize to current policy.
Definition: classifiercodedocument.cpp:475
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.