umbrello/umbrello
classifier.cpp
Go to the documentation of this file.
277 i18n("An operation with the same name and signature already exists. You can not add it again."));
553 UMLObject* UMLClassifier::findChildObjectById(Uml::ID::Type id, bool considerAncestors /* =false */)
810 UMLAttribute* UMLClassifier::addAttribute(const QString &name, Uml::ID::Type id /* = Uml::id_None */)
835 UMLAttribute* UMLClassifier::addAttribute(const QString &name, UMLObject *type, Visibility::Enum scope)
960 UMLOperationList UMLClassifier::getOpList(bool includeInherited, UMLClassifierSet *alreadyTraversed)
int removeAttribute(UMLAttribute *att)
Removes an attribute from the class.
Definition: classifier.cpp:893
void attributeAdded(UMLClassifierListItem *)
void operationAdded(UMLClassifierListItem *)
UMLAssociationList getAggregations()
Shorthand for getSpecificAssocs(Uml::at_Aggregation)
Definition: umlcanvasobject.cpp:421
void templateAdded(UMLClassifierListItem *)
void operationRemoved(UMLClassifierListItem *)
UMLTemplate * addTemplate(const QString &name, Uml::ID::Type id=Uml::ID::None)
Adds an already created template.
Definition: classifier.cpp:1043
UMLObject * getObject(Uml::RoleType::Enum role) const
Returns the UMLObject assigned to the given role.
Definition: association.cpp:476
Definition: umlobject.h:60
This class contains the non-graphical information required for a UML Package.
Definition: package.h:32
int associations()
Returns the number of associations for the CanvasObject.
Definition: umlcanvasobject.cpp:319
This sub-class adds copyInto and clone to the QPtrList base class...
Definition: umlclassifierlistitemlist.h:26
This class defines the non-graphical information required for a UML Classifier (ie a class or interfa...
Definition: classifier.h:39
virtual bool acceptAssociationType(Uml::AssociationType::Enum type)
Reimplemented from UMLObject.
Definition: classifier.cpp:726
Definition: classifier.h:47
UMLAssociationList getSpecificAssocs(Uml::AssociationType::Enum assocType)
Return the subset of m_List that matches the given type.
Definition: umlcanvasobject.cpp:61
Definition: classifier.h:47
virtual bool loadFromXMI(QDomElement &element)
This method loads the generic parts of the XMI common to most model classes.
Definition: umlobject.cpp:914
Classifiers (classes, interfaces) have lists of operations, attributes, templates and others...
Definition: classifierlistitem.h:29
Definition: basictypes.h:209
virtual void setType(UMLObject *type)
Sets the type of the UMLAttribute.
Definition: classifierlistitem.cpp:125
Uml::Visibility::Enum visibility() const
Returns the visibility of the object.
Definition: umlobject.cpp:435
UMLAttributeList getAttributeListStatic(Uml::Visibility::Enum scope) const
Returns the static attributes for the specified scope.
Definition: classifier.cpp:493
virtual UMLClassifierListItemList getFilteredList(UMLObject::ObjectType ot) const
Returns the entries in m_List that are of the requested type.
Definition: classifier.cpp:1019
bool operator==(const UMLCanvasObject &rhs) const
Overloaded '==' operator.
Definition: umlcanvasobject.cpp:282
void setVisibility(Uml::Visibility::Enum s)
Reimplementation of method from UMLObject is required as an extra signal, attributeChanged(), is emitted.
Definition: attribute.cpp:86
virtual UMLAttribute * createAttribute(const QString &name=QString(), UMLObject *type=0, Uml::Visibility::Enum vis=Uml::Visibility::Private, const QString &init=QString())
Creates an attribute for the class.
Definition: classifier.cpp:756
static bool tagEq(const QString &tag, const QString &pattern)
Function for comparing tags in XMI files.
Definition: umldoc.cpp:3030
virtual bool load(QDomElement &element)
Auxiliary to loadFromXMI: The loading of operations is implemented here.
Definition: classifier.cpp:1509
Definition: icon_utils.h:87
This class contains all the ID translations done for each UMLObject pasted.
Definition: idchangelog.h:26
void setIsReference(bool isRef=true)
Set the m_isRef flag (true when dealing with a pointer type)
Definition: classifier.cpp:1281
UMLOperation * createOperation(const QString &name=QString(), bool *isExistingOp=NULL, Model_Utils::NameAndType_List *params=NULL)
Creates an operation in the current document.
Definition: classifier.cpp:238
Definition: basictypes.h:210
int removeTemplate(UMLTemplate *umltemplate)
Removes a template from the class.
Definition: classifier.cpp:1120
QLinkedList< NameAndType > NameAndType_List
Auxiliary type for OpDescriptor.
Definition: model_utils.h:109
void setName(const QString &name)
Reimplementation of method from UMLObject is required as an extra signal, attributeChanged(), is emitted.
Definition: attribute.cpp:75
void setBaseType(UMLObject::ObjectType ot)
Reimplementation of method from class UMLObject for controlling the exact type of this classifier: cl...
Definition: classifier.cpp:82
This sub-class adds copyInto and clone to the QPtrList base class.
Definition: umlattributelist.h:26
Definition: umlattributedialog.h:28
This class holds information used by template classes, called paramaterised class in UML and a generi...
Definition: template.h:26
Definition: umlobject.h:59
UMLOperationList findOperations(const QString &n)
Find a list of operations with the given name.
Definition: classifier.cpp:528
Definition: umlobject.h:61
Definition: umloperationdialog.h:37
UMLDoc * document() const
Returns a pointer to the current document connected to the KMainWindow instance.
Definition: uml.cpp:872
void removeChangeByNewID(Uml::ID::Type OldID)
Definition: idchangelog.cpp:124
UMLOperation * checkOperationSignature(const QString &name, UMLAttributeList opParams, UMLOperation *exemptOp=NULL)
Checks whether an operation is valid based on its signature - An operation is "valid" if the operatio...
Definition: classifier.cpp:136
QString toString(Uml::SignatureType::Enum sig=Uml::SignatureType::NoSig)
Returns a string representation of the operation.
Definition: operation.cpp:198
virtual void copyInto(UMLObjectList *rhs) const
Copy the internal presentation of this object into the new object.
Definition: umlobjectlist.cpp:26
int removeOperation(UMLOperation *op)
Remove an operation from the Classifier.
Definition: classifier.cpp:364
Definition: basictypes.h:58
This class contains the non-graphic representation of an association.
Definition: association.h:32
void signalEnumLiteralRemoved(UMLClassifierListItem *elit)
Emit the enumLiteralRemoved signal.
Definition: enum.cpp:231
void saveToXMI(QDomDocument &qDoc, QDomElement &qElement)
Saves to the XMI element.
Definition: operation.cpp:448
Definition: basictypes.h:137
bool addOperation(UMLOperation *op, int position=-1)
Appends an operation to the classifier.
Definition: classifier.cpp:304
A dialog to edit the properties of a class template (paramaterised class)
Definition: umltemplatedialog.h:28
virtual bool resolveRef()
Resolve referenced objects (if any.) Needs to be called after all UML objects are loaded from file...
Definition: umlobject.cpp:709
UMLClassifier(const QString &name=QString(), Uml::ID::Type id=Uml::ID::None)
Sets up a Classifier.
Definition: classifier.cpp:62
bool isInterface() const
Returns true if this classifier represents an interface.
Definition: classifier.cpp:112
void addParm(UMLAttribute *parameter, int position=-1)
Add a parameter to the operation.
Definition: operation.cpp:259
void setClassAssoc(UMLAssociation *assoc)
Sets the UMLAssociation for which this class shall act as an association class.
Definition: classifier.cpp:912
Uml::ParameterDirection::Enum m_direction
Definition: model_utils.h:99
bool setUMLPackage(UMLPackage *pPkg)
Sets the UMLPackage in which this class is located.
Definition: umlobject.cpp:545
UMLClassifierList findSubClassConcepts(ClassifierType type=ALL)
Returns a list of concepts which inherit from this concept.
Definition: classifier.cpp:577
void removeObject(UMLObject *pObject)
Removes an object from this package.
Definition: package.cpp:193
Definition: icon_utils.h:76
void attributeRemoved(UMLClassifierListItem *)
void saveToXMI(QDomDocument &qDoc, QDomElement &qElement)
Utility method called by "get*ChildClassfierList()" methods.
Definition: classifier.cpp:1403
Definition: basictypes.h:60
UMLAssociationList getCompositions()
Shorthand for getSpecificAssocs(Uml::at_Composition)
Definition: umlcanvasobject.cpp:431
virtual bool resolveRef()
Needs to be called after all UML objects are loaded from file.
Definition: classifier.cpp:692
virtual UMLObject * findChildObjectById(Uml::ID::Type id, bool considerAncestors=false)
Find an association.
Definition: umlcanvasobject.cpp:266
virtual UMLObject * findChildObject(const QString &n, UMLObject::ObjectType t=UMLObject::ot_UMLObject)
Find a child object with the given name.
Definition: umlcanvasobject.cpp:240
bool hasStaticAttributes()
Return true if this classifier has static attributes.
Definition: classifier.cpp:1323
bool hasVectorFields()
Return true if this classifier has vector fields.
Definition: classifier.cpp:1361
virtual UMLAssociationList getUniAssociationToBeImplemented()
Return the list of unidirectional association that should show up in the code.
Definition: classifier.cpp:1369
This class is used to set up information for an enum literal.
Definition: enumliteral.h:25
Definition: model_utils.h:96
virtual void copyInto(UMLObject *lhs) const
Copy the internal presentation of this object into the new object.
Definition: classifier.cpp:665
bool isCommonXMIAttribute(const QString &tag)
Return true if the given tag is a one of the common XMI attributes, such as: "name" | "visibility" | ...
Definition: model_utils.cpp:503
virtual UMLObject * findChildObjectById(Uml::ID::Type id, bool considerAncestors=false)
Find the child object by the given id.
Definition: classifier.cpp:553
Definition: basictypes.h:57
void signalEntityAttributeRemoved(UMLClassifierListItem *eattr)
Emit the entityAttributeRemoved signal.
Definition: entity.cpp:400
UMLClassifierList getSuperClasses()
Return a list of the superclasses of this concept.
Definition: umlcanvasobject.cpp:359
QLinkedList< NameAndType >::iterator NameAndType_ListIt
Auxiliary type for OpDescriptor.
Definition: model_utils.h:110
Definition: umlobject.h:58
UMLClassifierList findSuperClassConcepts(ClassifierType type=ALL)
Returns a list of concepts which this concept inherits from.
Definition: classifier.cpp:616
void treeViewChangeIcon(UMLObject *object, Icon_Utils::IconType to)
Change an icon of an object in the tree view.
Definition: model_utils.cpp:342
This class contains the non-graphical information required for a UML Enum.
Definition: enum.h:28
Definition: umlobject.h:53
bool isStatic() const
Returns true if this UMLObject has classifier scope, otherwise false (the default).
Definition: umlobject.cpp:335
Definition: umlobject.h:57
QDomElement save(const QString &tag, QDomDocument &qDoc)
Auxiliary to saveToXMI.
Definition: umlobject.cpp:808
UMLAttributeList getAttributeList() const
Returns the attributes for the specified scope.
Definition: classifier.cpp:441
Definition: classifier.h:47
This class is used to set up information for an entityattribute.
Definition: entityattribute.h:25
UMLClassifierList getSubClasses()
Return a list of the classes that inherit from this concept.
Definition: umlcanvasobject.cpp:386
virtual void copyInto(UMLObject *lhs) const
Copy the internal presentation of this object into the new object.
Definition: umlcanvasobject.cpp:303
UMLClassifier * originType() const
Get the origin type (in case of e.g.
Definition: classifier.cpp:1272
Definition: umlobject.h:56
virtual void saveToXMI(QDomDocument &qDoc, QDomElement &qElement)=0
UMLObject * makeObjectFromXMI(const QString &xmiTag, const QString &stereoID)
Make a new UMLObject according to the given XMI tag.
Definition: object_factory.cpp:309
virtual UMLClassifierListItem * makeChildObject(const QString &xmiTag)
utility functions to allow easy determination of what classifiers are "owned" by the current one via ...
Definition: classifier.cpp:1487
UMLObject * createTemplate(const QString &name=QString())
Create and add a just created template.
Definition: classifier.cpp:387
bool activeLanguageIsCaseSensitive()
Return true if the active language is case sensitive.
Definition: uml.cpp:2361
Definition: umlobject.h:49
bool hasAbstractOps()
Return true if this classifier has abstract operations.
Definition: classifier.cpp:930
bool isDatatype() const
Returns true if this classifier represents a datatype.
Definition: classifier.cpp:120
UMLObjectList m_objects
References to the objects contained in this package.
Definition: package.h:78
UMLOperationList getOpList(bool includeInherited=false, UMLClassifierSet *alreadyTraversed=0)
Return a list of operations for the Classifier.
Definition: classifier.cpp:960
bool hasAccessorMethods()
Return true if this classifier has accessor methods.
Definition: classifier.cpp:1333
QString getRoleName(Uml::RoleType::Enum role) const
Returns the name assigned to the role A.
Definition: association.cpp:545
UMLAttribute * addAttribute(const QString &name, Uml::ID::Type id=Uml::ID::None)
Creates and adds an attribute for the class.
Definition: classifier.cpp:810
Uml::ID::Type getObjectId(Uml::RoleType::Enum role) const
Returns the ID of the UMLObject assigned to the given role.
Definition: association.cpp:488
virtual QString uniqChildName(const UMLObject::ObjectType type, const QString &prefix=QString())
Returns a name for the new association, operation, template or attribute appended with a number if th...
Definition: umlcanvasobject.cpp:185
virtual void setID(Uml::ID::Type NewID)
Assigns a new Id to the object.
Definition: umlobject.cpp:159
QString m_SecondaryId
xmi.id of the secondary object for intermediate use during loading.
Definition: umlobject.h:186
UMLTemplate * findTemplate(const QString &name)
Seeks the template parameter of the given name.
Definition: classifier.cpp:1137
bool hasOperationMethods()
Return true if this classifier has operation methods.
Definition: classifier.cpp:1341
UMLOperation * findOperation(const QString &name, Model_Utils::NameAndType_List params)
Find an operation of the given name and parameter signature.
Definition: classifier.cpp:181
void setOriginType(UMLClassifier *origType)
Set the origin type (in case of e.g.
Definition: classifier.cpp:1263
int takeItem(UMLClassifierListItem *item)
Take and return a subordinate item from this classifier.
Definition: classifier.cpp:1186
Definition: icon_utils.h:86
void modified()
bool operator==(const UMLClassifier &rhs) const
Overloaded '==' operator.
Definition: classifier.cpp:648
Definition: basictypes.h:59
void setStereotype(const QString &_name)
Sets the classes stereotype name.
Definition: umlobject.cpp:494
Definition: umlobject.h:54
void templateRemoved(UMLClassifierListItem *)
virtual UMLAssociationList getRealizations()
Shorthand for getSpecificAssocs(Uml::at_Realization)
Definition: umlcanvasobject.cpp:411
Definition: umlobject.h:68
Uml::Visibility::Enum defaultAttributeScope
Definition: optionstate.h:71
UMLObject * m_pSecondary
pointer to an associated object Only a few of the classes inheriting from UMLObject use this...
Definition: umlobject.h:182
This class contains the non-graphical information required for a UML Entity.
Definition: entity.h:34
UMLAssociation * getClassAssoc() const
Returns the UMLAssociation for which this class acts as an association class.
Definition: classifier.cpp:922
bool hasAssociations()
Return true if this classifier has associations.
Definition: classifier.cpp:1299
void setParmKind(Uml::ParameterDirection::Enum pk)
Definition: attribute.cpp:116
void signalUMLObjectCreated(UMLObject *o)
Signal that a UMLObject has been created.
Definition: umldoc.cpp:1619
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.