umbrello/umbrello
#include <classifiercodedocument.h>
Public Slots | |
void | addAssociationClassField (UMLAssociation *assoc, bool syncToParentIfAdded=true) |
void | addAttributeClassField (UMLClassifierListItem *at, bool syncToParentIfAdded=true) |
void | addOperation (UMLClassifierListItem *obj) |
void | removeAssociationClassField (UMLAssociation *assoc) |
void | removeAttributeClassField (UMLClassifierListItem *at) |
void | removeOperation (UMLClassifierListItem *obj) |
void | syncToParent () |
Protected Member Functions | |
void | declareClassFields (CodeClassFieldList &list, CodeGenObjectWithTextBlocks *parent) |
TextBlock * | findCodeClassFieldTextBlockByTag (const QString &tag) |
void | loadClassFieldsFromXMI (QDomElement &childElem) |
virtual void | setAttributesFromNode (QDomElement &element) |
virtual void | setAttributesOnNode (QDomDocument &doc, QDomElement &blockElement) |
void | syncClassFields () |
void | syncNamesToParent () |
Protected Member Functions inherited from CodeDocument | |
void | addChildTagToMap (const QString &tag, TextBlock *tb) |
void | removeChildTagFromMap (const QString &tag) |
void | resetTextBlocks () |
void | updateHeader () |
Protected Member Functions inherited from CodeGenObjectWithTextBlocks | |
virtual void | loadChildTextBlocksFromNode (QDomElement &root) |
void | setAttributesFromObject (CodeGenObjectWithTextBlocks *obj) |
Additional Inherited Members | |
Protected Attributes inherited from CodeGenObjectWithTextBlocks | |
QMap< QString, TextBlock * > | m_textBlockTagMap |
TextBlockList | m_textblockVector |
Detailed Description
class ClassifierCodeDocument A CodeDocument which represents a UMLClassifier (e.g.
a Class or Interface)
Definition at line 33 of file classifiercodedocument.h.
Constructor & Destructor Documentation
|
explicit |
Constructor.
Definition at line 37 of file classifiercodedocument.cpp.
|
virtual |
Destructor.
Definition at line 45 of file classifiercodedocument.cpp.
Member Function Documentation
|
slot |
Definition at line 570 of file classifiercodedocument.cpp.
|
slot |
Synchronize this document to the attributes/associations of the parent classifier.
This is a slot..should only be called from a signal.
Definition at line 195 of file classifiercodedocument.cpp.
bool ClassifierCodeDocument::addCodeClassField | ( | CodeClassField * | add_object | ) |
Add a CodeClassField object to the m_classfieldVector List We DON'T add methods of the code classfield here because we need to allow the codegenerator writer the liberty to organize their document as they desire.
- Returns
- boolean true if successful in adding
Definition at line 178 of file classifiercodedocument.cpp.
void ClassifierCodeDocument::addCodeClassFieldMethods | ( | CodeClassFieldList & | list | ) |
A utility method that allows user to easily add classfield methods to this document.
Definition at line 348 of file classifiercodedocument.cpp.
|
pure virtual |
Will add the code operation in the correct place in the document.
- Returns
- bool which is true IF the code operation was added successfully
Implemented in JavaClassifierCodeDocument, DClassifierCodeDocument, RubyClassifierCodeDocument, CPPSourceCodeDocument, and CPPHeaderCodeDocument.
|
slot |
- Parameters
-
o The Operation to add
Definition at line 298 of file classifiercodedocument.cpp.
|
protected |
Add declaration blocks for the passed classfields.
Definition at line 373 of file classifiercodedocument.cpp.
CodeClassField * ClassifierCodeDocument::findCodeClassFieldFromParentID | ( | Uml::ID::Type | id, |
int | role_id = -1 |
||
) |
Definition at line 644 of file classifiercodedocument.cpp.
|
protectedvirtual |
Find a specific textblock held by any code class field in this document by its tag.
Reimplemented from CodeDocument.
Definition at line 766 of file classifiercodedocument.cpp.
CodeClassFieldList * ClassifierCodeDocument::getCodeClassFieldList | ( | ) |
Get the list of CodeClassField objects held by m_classfieldVector.
- Returns
- CodeClassFieldList list of CodeClassField objects held by m_classfieldVector
Definition at line 262 of file classifiercodedocument.cpp.
QList< CodeOperation * > ClassifierCodeDocument::getCodeOperations | ( | ) |
Get a list of codeoperation objects held by this classifiercodedocument.
- Returns
- QList<CodeOperation>
Definition at line 280 of file classifiercodedocument.cpp.
UMLClassifier * ClassifierCodeDocument::getParentClassifier | ( | ) |
Get the value of m_parentclassifier.
- Returns
- the value of m_parentclassifier
Definition at line 271 of file classifiercodedocument.cpp.
CodeClassFieldList ClassifierCodeDocument::getSpecificClassFields | ( | CodeClassField::ClassFieldType | cfType | ) |
Get a list of codeclassifier objects held by this classifiercodedocument that meet the passed criteria.
Definition at line 54 of file classifiercodedocument.cpp.
CodeClassFieldList ClassifierCodeDocument::getSpecificClassFields | ( | CodeClassField::ClassFieldType | cfType, |
bool | isStatic | ||
) |
Get a list of codeclassifier objects held by this classifiercodedocument that meet the passed criteria.
Definition at line 70 of file classifiercodedocument.cpp.
CodeClassFieldList ClassifierCodeDocument::getSpecificClassFields | ( | CodeClassField::ClassFieldType | cfType, |
Uml::Visibility::Enum | visibility | ||
) |
Get a list of codeclassifier objects held by this classifiercodedocument that meet the passed criteria.
Definition at line 87 of file classifiercodedocument.cpp.
CodeClassFieldList ClassifierCodeDocument::getSpecificClassFields | ( | CodeClassField::ClassFieldType | cfType, |
bool | isStatic, | ||
Uml::Visibility::Enum | visibility | ||
) |
Get a list of codeclassifier objects held by this classifiercodedocument that meet the passed criteria.
Definition at line 104 of file classifiercodedocument.cpp.
bool ClassifierCodeDocument::hasAssociationClassFields | ( | ) |
Tell if one or more codeclassfields are derived from associations.
Definition at line 157 of file classifiercodedocument.cpp.
bool ClassifierCodeDocument::hasAttributeClassFields | ( | ) |
Tell if one or more codeclassfields are derived from attributes.
Definition at line 166 of file classifiercodedocument.cpp.
bool ClassifierCodeDocument::hasClassFields | ( | ) |
Does this object have any classfields declared?
Definition at line 147 of file classifiercodedocument.cpp.
bool ClassifierCodeDocument::hasObjectVectorClassFields | ( | ) |
Tell if any of the accessor classfields will be of lists of objects.
Definition at line 124 of file classifiercodedocument.cpp.
|
virtual |
Add codeclassfields to this classifiercodedocument.
If a codeclassfield already exists, it is not added.
Definition at line 535 of file classifiercodedocument.cpp.
|
protected |
Load CodeClassFields from XMI element node.
Definition at line 674 of file classifiercodedocument.cpp.
|
virtual |
Load params from the appropriate XMI element node.
Reimplemented from CodeDocument.
Definition at line 731 of file classifiercodedocument.cpp.
bool ClassifierCodeDocument::parentIsClass | ( | ) |
Return if the parent classifier is a class.
Definition at line 405 of file classifiercodedocument.cpp.
bool ClassifierCodeDocument::parentIsInterface | ( | ) |
Return if the parent classifier is an interface.
Definition at line 413 of file classifiercodedocument.cpp.
|
slot |
Definition at line 243 of file classifiercodedocument.cpp.
|
slot |
Definition at line 236 of file classifiercodedocument.cpp.
bool ClassifierCodeDocument::removeCodeClassField | ( | CodeClassField * | remove_object | ) |
Remove a CodeClassField object from m_classfieldVector List.
Definition at line 220 of file classifiercodedocument.cpp.
|
slot |
- Parameters
-
op
Definition at line 326 of file classifiercodedocument.cpp.
|
virtual |
Save the XMI representation of this object.
Reimplemented from CodeDocument.
Definition at line 708 of file classifiercodedocument.cpp.
|
protectedvirtual |
Set the class attributes of this object from the passed element node.
Reimplemented from CodeDocument.
Definition at line 615 of file classifiercodedocument.cpp.
|
protectedvirtual |
Set attributes of the node that represents this class in the XMI document.
Reimplemented from CodeDocument.
Definition at line 744 of file classifiercodedocument.cpp.
|
protected |
Force synchronization of child classfields to their parent objects.
Definition at line 488 of file classifiercodedocument.cpp.
|
virtual |
Cause this classifier code document to synchronize to current policy.
Reimplemented from CodeDocument.
Definition at line 475 of file classifiercodedocument.cpp.
|
protected |
IF the classifier object is modified, this will get called.
- Todo:
- we cannot make this virtual as long as the ClassifierCodeDocument constructor calls it because that gives a call-before-construction error. Example of the problem: CPPSourceCodeDocument reimplementing syncNamesToParent() CPPCodeGenerator::initFromParentDocument() CodeDocument * codeDoc = new CPPSourceCodeDocument(c); CPPSourceCodeDocument::CPPSourceCodeDocument(UMLClassifier * concept) : ClassifierCodeDocument(concept) ClassifierCodeDocument::ClassifierCodeDocument(concept) init(concept); syncNamesToParent(); dispatches to CPPSourceCodeDocument::syncNamesToParent() but that object is not yet constructed.
Definition at line 461 of file classifiercodedocument.cpp.
|
slot |
Definition at line 526 of file classifiercodedocument.cpp.
|
pure 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.
Reimplemented from CodeDocument.
Implemented in JavaClassifierCodeDocument, CPPSourceCodeDocument, DClassifierCodeDocument, RubyClassifierCodeDocument, and CPPHeaderCodeDocument.
The documentation for this class was generated from the following files:
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 23:06:01 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.