umbrello 2.34.70-5524f40e1
Umbrello UML Modeller is a Unified Modelling Language (UML) diagram program based on KDE Technology
|
#include <classifiercodedocument.h>
Public Slots | |
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 Member Functions | |
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 () |
![]() | |
void | addChildTagToMap (const QString &tag, TextBlock *tb) |
void | removeChildTagFromMap (const QString &tag) |
void | updateHeader () |
void | resetTextBlocks () |
![]() | |
void | setAttributesFromObject (CodeGenObjectWithTextBlocks *obj) |
virtual void | loadChildTextBlocksFromNode (QDomElement &root) |
Private Member Functions | |
void | updateAssociationClassFields (UMLAssociationList &assocList) |
void | updateOperations () |
void | init (UMLClassifier *classifier) |
Private Attributes | |
CodeClassFieldList | m_classfieldVector |
UMLClassifier * | m_parentclassifier |
QMap< UMLObject *, CodeClassField * > | m_classFieldMap |
Friends | |
class | HierarchicalCodeBlock |
Additional Inherited Members | |
![]() | |
QMap< QString, TextBlock * > | m_textBlockTagMap |
TextBlockList | m_textblockVector |
class ClassifierCodeDocument A CodeDocument which represents a UMLClassifier (e.g. a Class or Interface)
|
explicit |
Constructor.
|
virtual |
Destructor.
|
slot |
|
slot |
Synchronize this document to the attributes/associations of the parent classifier. This is a slot..should only be called from a signal.
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.
void ClassifierCodeDocument::addCodeClassFieldMethods | ( | CodeClassFieldList & | list | ) |
A utility method that allows user to easily add classfield methods to this document.
|
pure virtual |
Will add the code operation in the correct place in the document.
Implemented in CPPHeaderCodeDocument, CPPSourceCodeDocument, DClassifierCodeDocument, JavaClassifierCodeDocument, and RubyClassifierCodeDocument.
|
slot |
o | The Operation to add |
|
protected |
Add declaration blocks for the passed classfields.
CodeClassField * ClassifierCodeDocument::findCodeClassFieldFromParentID | ( | Uml::ID::Type | id, |
int | role_id = -1 |
||
) |
|
protectedvirtual |
Find a specific textblock held by any code class field in this document by its tag.
Reimplemented from CodeDocument.
CodeClassFieldList * ClassifierCodeDocument::getCodeClassFieldList | ( | ) |
Get the list of CodeClassField objects held by m_classfieldVector
QList< const CodeOperation * > ClassifierCodeDocument::getCodeOperations | ( | ) | const |
Get a list of codeoperation objects held by this classifiercodedocument.
UMLClassifier * ClassifierCodeDocument::getParentClassifier | ( | ) | const |
Get the value of m_parentclassifier
CodeClassFieldList ClassifierCodeDocument::getSpecificClassFields | ( | CodeClassField::ClassFieldType | cfType | ) | const |
Get a list of codeclassifier objects held by this classifiercodedocument that meet the passed criteria.
CodeClassFieldList ClassifierCodeDocument::getSpecificClassFields | ( | CodeClassField::ClassFieldType | cfType, |
bool | isStatic | ||
) | const |
Get a list of codeclassifier objects held by this classifiercodedocument that meet the passed criteria.
CodeClassFieldList ClassifierCodeDocument::getSpecificClassFields | ( | CodeClassField::ClassFieldType | cfType, |
bool | isStatic, | ||
Uml::Visibility::Enum | visibility | ||
) | const |
Get a list of codeclassifier objects held by this classifiercodedocument that meet the passed criteria.
CodeClassFieldList ClassifierCodeDocument::getSpecificClassFields | ( | CodeClassField::ClassFieldType | cfType, |
Uml::Visibility::Enum | visibility | ||
) | const |
Get a list of codeclassifier objects held by this classifiercodedocument that meet the passed criteria.
bool ClassifierCodeDocument::hasAssociationClassFields | ( | ) | const |
Tell if one or more codeclassfields are derived from associations.
bool ClassifierCodeDocument::hasAttributeClassFields | ( | ) | const |
Tell if one or more codeclassfields are derived from attributes.
bool ClassifierCodeDocument::hasClassFields | ( | ) | const |
Does this object have any classfields declared?
bool ClassifierCodeDocument::hasObjectVectorClassFields | ( | ) | const |
Tell if any of the accessor classfields will be of lists of objects.
|
private |
Initialize from a UMLClassifier object.
c | Classifier from which to initialize this CodeDocument |
|
virtual |
Add codeclassfields to this classifiercodedocument. If a codeclassfield already exists, it is not added.
|
protected |
Load CodeClassFields from XMI element node.
|
virtual |
Load params from the appropriate XMI element node.
Reimplemented from CodeDocument.
bool ClassifierCodeDocument::parentIsClass | ( | ) | const |
Return if the parent classifier is a class
bool ClassifierCodeDocument::parentIsInterface | ( | ) | const |
Return if the parent classifier is an interface
|
slot |
|
slot |
bool ClassifierCodeDocument::removeCodeClassField | ( | CodeClassField * | remove_object | ) |
Remove a CodeClassField object from m_classfieldVector List
|
slot |
op |
|
virtual |
Save the XMI representation of this object.
Reimplemented from CodeDocument.
|
protectedvirtual |
Set the class attributes of this object from the passed element node.
Reimplemented from CodeDocument.
|
protectedvirtual |
Set attributes of the node that represents this class in the XMI document.
Reimplemented from CodeDocument.
|
protected |
Force synchronization of child classfields to their parent objects.
|
virtual |
Cause this classifier code document to synchronize to current policy.
Reimplemented from CodeDocument.
|
protected |
IF the classifier object is modified, this will get called.
|
slot |
|
private |
Using the passed list, update our inventory of CodeClassFields which are based on UMLRoles (e.g. derived from associations with other classifiers).
|
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 CPPHeaderCodeDocument, CPPSourceCodeDocument, DClassifierCodeDocument, JavaClassifierCodeDocument, and RubyClassifierCodeDocument.
|
private |
Update code operations in this document using the parent classifier.
|
friend |
|
private |
Maps CodeClassFields to UMLObjects. Used to prevent re-adding a class field.
|
private |
|
private |