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

Information for a non-graphical Concept/Class. More...

#include <classifier.h>

Inheritance diagram for UMLClassifier:
Collaboration diagram for UMLClassifier:

Public Types

enum  ClassifierType { ALL = 0 , CLASS , INTERFACE , DATATYPE }
 
- Public Types inherited from UMLObject
enum  ObjectType {
  ot_Unknown = -1 , ot_UMLObject = 100 , ot_Actor , ot_UseCase ,
  ot_Package , ot_Interface , ot_Datatype , ot_Enum ,
  ot_Class , ot_Instance , ot_Association , ot_Attribute ,
  ot_Operation , ot_EnumLiteral , ot_Template , ot_Component ,
  ot_Artifact , ot_Node , ot_Stereotype , ot_Role ,
  ot_Entity , ot_EntityAttribute , ot_Folder , ot_EntityConstraint ,
  ot_UniqueConstraint , ot_ForeignKeyConstraint , ot_CheckConstraint , ot_Category ,
  ot_Port , ot_InstanceAttribute , ot_SubSystem
}
 

Signals

void operationAdded (UMLClassifierListItem *)
 
void operationRemoved (UMLClassifierListItem *)
 
void templateAdded (UMLClassifierListItem *)
 
void templateRemoved (UMLClassifierListItem *)
 
void attributeAdded (UMLClassifierListItem *)
 
void attributeRemoved (UMLClassifierListItem *)
 
- Signals inherited from UMLCanvasObject
void sigAssociationEndAdded (UMLAssociation *assoc)
 
void sigAssociationEndRemoved (UMLAssociation *assoc)
 
- Signals inherited from UMLObject
void modified ()
 

Public Member Functions

 UMLClassifier (const QString &name=QString(), Uml::ID::Type id=Uml::ID::None)
 
virtual ~UMLClassifier ()
 
virtual void copyInto (UMLObject *lhs) const
 
UMLObjectclone () const
 
virtual void setNameCmd (const QString &strName)
 
virtual UMLAttributecreateAttribute (const QString &name=QString(), UMLObject *type=0, Uml::Visibility::Enum vis=Uml::Visibility::Private, const QString &init=QString())
 
UMLAttributeaddAttribute (const QString &name, Uml::ID::Type id=Uml::ID::None)
 
UMLAttributeaddAttribute (const QString &name, UMLObject *type, Uml::Visibility::Enum scope)
 
bool addAttribute (UMLAttribute *att, IDChangeLog *log=0, int position=-1)
 
int removeAttribute (UMLAttribute *att)
 
UMLAttributeList getAttributeList () const
 
UMLAttributeList getAttributeList (Uml::Visibility::Enum scope) const
 
UMLAttributeList getAttributeListStatic (Uml::Visibility::Enum scope) const
 
UMLOperationcreateOperation (const QString &name=QString(), bool *isExistingOp=0, Model_Utils::NameAndType_List *params=0)
 
bool addOperation (UMLOperation *op, int position=-1)
 
bool addOperation (UMLOperation *op, IDChangeLog *log)
 
UMLOperationcheckOperationSignature (const QString &name, UMLAttributeList opParams, UMLOperation *exemptOp=0) const
 
int removeOperation (UMLOperation *op)
 
int operations () const
 
UMLOperationList getOpList (bool includeInherited=false, UMLClassifierSet *alreadyTraversed=0) const
 
UMLObjectcreateTemplate (const QString &name=QString())
 
UMLTemplateaddTemplate (const QString &name, Uml::ID::Type id=Uml::ID::None)
 
bool addTemplate (UMLTemplate *newTemplate, IDChangeLog *log=0)
 
bool addTemplate (UMLTemplate *templt, int position)
 
int removeTemplate (UMLTemplate *umltemplate)
 
UMLTemplatefindTemplate (const QString &name) const
 
int templates () const
 
UMLTemplateList getTemplateList () const
 
int takeItem (UMLClassifierListItem *item)
 
virtual UMLClassifierListItemList getFilteredList (UMLObject::ObjectType ot) const
 
virtual bool resolveRef ()
 
UMLOperationList findOperations (const QString &n) const
 
virtual UMLObjectfindChildObjectById (Uml::ID::Type id, bool considerAncestors=false) const
 
UMLOperationfindOperation (const QString &name, Model_Utils::NameAndType_List params) const
 
UMLClassifierList findSuperClassConcepts (ClassifierType type=ALL) const
 
UMLClassifierList findSubClassConcepts (ClassifierType type=ALL) const
 
virtual bool acceptAssociationType (Uml::AssociationType::Enum type) const
 
void setBaseType (UMLObject::ObjectType ot)
 
bool isInterface () const
 
bool hasAbstractOps () const
 
bool hasAssociations () const
 
bool hasAttributes () const
 
bool hasStaticAttributes () const
 
bool hasMethods () const
 
bool hasAccessorMethods () const
 
bool hasOperationMethods () const
 
bool hasVectorFields () const
 
virtual UMLClassifierListItemmakeChildObject (const QString &xmiTag)
 
virtual UMLAssociationList getUniAssociationToBeImplemented () const
 
- Public Member Functions inherited from UMLPackage
 UMLPackage (const QString &name=QString(), Uml::ID::Type id=Uml::ID::None)
 
virtual ~UMLPackage ()
 
bool addObject (UMLObject *pObject, bool interactOnConflict=true)
 
void removeObject (UMLObject *pObject)
 
virtual void removeAllObjects ()
 
UMLObjectList containedObjects (bool includeInactive=false) const
 
void addAssocToConcepts (UMLAssociation *assoc)
 
void removeAssocFromConcepts (UMLAssociation *assoc)
 
UMLObjectfindObject (const QString &name) const
 
UMLObjectfindObjectById (Uml::ID::Type id) const
 
void appendPackages (UMLPackageList &packages, bool includeNested=true) const
 
void appendClassifiers (UMLClassifierList &classifiers, bool includeNested=true) const
 
void appendClassesAndInterfaces (UMLClassifierList &classifiers, bool includeNested=true) const
 
void appendEntities (UMLEntityList &entities, bool includeNested=true) const
 
- Public Member Functions inherited from UMLCanvasObject
 UMLCanvasObject (const QString &name=QString(), Uml::ID::Type id=Uml::ID::None)
 
virtual ~UMLCanvasObject ()
 
bool operator== (const UMLCanvasObject &rhs) const
 
bool addAssociationEnd (UMLAssociation *assoc)
 
bool hasAssociation (UMLAssociation *assoc) const
 
int removeAssociationEnd (UMLAssociation *assoc)
 
void removeAllAssociationEnds ()
 
int associations () const
 
UMLAssociationList getAssociations () const
 
UMLAssociationList getSpecificAssocs (Uml::AssociationType::Enum assocType) const
 
UMLClassifierList getSuperClasses (bool withRealizations=true) const
 
UMLClassifierList getSubClasses () const
 
virtual UMLAssociationList getRealizations () const
 
UMLAssociationList getAggregations () const
 
UMLAssociationList getCompositions () const
 
UMLAssociationList getRelationships () const
 
virtual UMLObjectfindChildObject (const QString &n, UMLObject::ObjectType t=UMLObject::ot_UMLObject) const
 
virtual QString uniqChildName (const UMLObject::ObjectType type, const QString &prefix=QString()) const
 
virtual void removeAllChildObjects ()
 
UMLObjectListsubordinates () const
 
- Public Member Functions inherited from UMLObject
 UMLObject (const UMLObject &other)
 
 UMLObject (UMLObject *parent, const QString &name, Uml::ID::Type id=Uml::ID::None)
 
 UMLObject (UMLObject *parent)
 
 UMLObject (const QString &name=QString(), Uml::ID::Type id=Uml::ID::None)
 
virtual ~UMLObject ()
 
bool operator== (const UMLObject &rhs) const
 
ObjectType baseType () const
 
QLatin1String baseTypeStr () const
 
virtual void setID (Uml::ID::Type NewID)
 
virtual Uml::ID::Type id () const
 
QString doc () const
 
bool hasDoc () const
 
void setDoc (const QString &d)
 
void setVisibility (Uml::Visibility::Enum visibility)
 
void setVisibilityCmd (Uml::Visibility::Enum visibility)
 
Uml::Visibility::Enum visibility () const
 
void setStereotype (const QString &_name)
 
void setStereotypeCmd (const QString &_name)
 
QString stereotype (bool includeAdornments=false) const
 
void setUMLStereotype (UMLStereotype *stereo)
 
UMLStereotypeumlStereotype () const
 
QStringList & tags ()
 
QString package (const QString &separator=QString(), bool includeRoot=false) const
 
UMLPackageList packages (bool includeRoot=false) const
 
bool setUMLPackage (UMLPackage *pPkg)
 
UMLPackageumlPackage () const
 
void setUMLParent (UMLObject *parent)
 
UMLObjectumlParent () const
 
virtual void setName (const QString &strName)
 
QString name () const
 
virtual QString fullyQualifiedName (const QString &separator=QString(), bool includeRoot=false) const
 
void setAbstract (bool bAbstract)
 
bool isAbstract () const
 
virtual bool showPropertiesDialog (QWidget *parent=0)
 
virtual bool loadFromXMI (QDomElement &element)
 
bool loadStereotype (QDomElement &element)
 
void setStatic (bool bStatic)
 
bool isStatic () const
 
void setSecondaryId (const QString &id)
 
QString secondaryId () const
 
void setSecondaryFallback (const QString &id)
 
QString secondaryFallback () const
 
void save1 (QXmlStreamWriter &writer, const QString &type, const QString &tag=QString())
 
bool isUMLActor () const
 
bool isUMLArtifact () const
 
bool isUMLAssociation () const
 
bool isUMLAttribute () const
 
bool isUMLCategory () const
 
bool isUMLCheckConstraint () const
 
bool isUMLClassifier () const
 
bool isUMLComponent () const
 
bool isUMLDatatype () const
 
bool isUMLEntity () const
 
bool isUMLEntityAttribute () const
 
bool isUMLEntityConstraint () const
 
bool isUMLEnum () const
 
bool isUMLEnumLiteral () const
 
bool isUMLFolder () const
 
bool isUMLForeignKeyConstraint () const
 
bool isUMLInstance () const
 
bool isUMLInstanceAttribute () const
 
bool isUMLNode () const
 
bool isUMLObject () const
 
bool isUMLOperation () const
 
bool isUMLPackage () const
 
bool isUMLPort () const
 
bool isUMLRole () const
 
bool isUMLStereotype () const
 
bool isUMLTemplate () const
 
bool isUMLUniqueConstraint () const
 
bool isUMLUseCase () const
 
UMLActorasUMLActor ()
 
UMLArtifactasUMLArtifact ()
 
UMLAssociationasUMLAssociation ()
 
UMLAttributeasUMLAttribute ()
 
UMLCanvasObjectasUMLCanvasObject ()
 
UMLCategoryasUMLCategory ()
 
UMLCheckConstraintasUMLCheckConstraint ()
 
UMLClassifierasUMLClassifier ()
 
UMLClassifierListItemasUMLClassifierListItem ()
 
UMLClassifierSetasUMLClassifierSet ()
 
UMLComponentasUMLComponent ()
 
UMLDatatypeasUMLDatatype ()
 
UMLEntityasUMLEntity ()
 
UMLEntityAttributeasUMLEntityAttribute ()
 
UMLEntityConstraintasUMLEntityConstraint ()
 
UMLEnumasUMLEnum ()
 
UMLEnumLiteralasUMLEnumLiteral ()
 
UMLFolderasUMLFolder ()
 
UMLForeignKeyConstraintasUMLForeignKeyConstraint ()
 
UMLInstanceasUMLInstance ()
 
UMLInstanceAttributeasUMLInstanceAttribute ()
 
UMLNodeasUMLNode ()
 
UMLObjectasUMLObject ()
 
UMLOperationasUMLOperation ()
 
UMLPackageasUMLPackage ()
 
UMLPortasUMLPort ()
 
UMLRoleasUMLRole ()
 
UMLStereotypeasUMLStereotype ()
 
UMLTemplateasUMLTemplate ()
 
UMLUniqueConstraintasUMLUniqueConstraint ()
 
UMLUseCaseasUMLUseCase ()
 
const UMLActorasUMLActor () const
 
const UMLArtifactasUMLArtifact () const
 
const UMLAssociationasUMLAssociation () const
 
const UMLAttributeasUMLAttribute () const
 
const UMLCanvasObjectasUMLCanvasObject () const
 
const UMLCategoryasUMLCategory () const
 
const UMLCheckConstraintasUMLCheckConstraint () const
 
const UMLClassifierasUMLClassifier () const
 
const UMLClassifierListItemasUMLClassifierListItem () const
 
const UMLClassifierSetasUMLClassifierSet () const
 
const UMLComponentasUMLComponent () const
 
const UMLDatatypeasUMLDatatype () const
 
const UMLEntityasUMLEntity () const
 
const UMLEntityAttributeasUMLEntityAttribute () const
 
const UMLEntityConstraintasUMLEntityConstraint () const
 
const UMLEnumasUMLEnum () const
 
const UMLEnumLiteralasUMLEnumLiteral () const
 
const UMLFolderasUMLFolder () const
 
const UMLForeignKeyConstraintasUMLForeignKeyConstraint () const
 
const UMLInstanceasUMLInstance () const
 
const UMLInstanceAttributeasUMLInstanceAttribute () const
 
const UMLNodeasUMLNode () const
 
const UMLObjectasUMLObject () const
 
const UMLOperationasUMLOperation () const
 
const UMLPackageasUMLPackage () const
 
const UMLPortasUMLPort () const
 
const UMLRoleasUMLRole () const
 
const UMLStereotypeasUMLStereotype () const
 
const UMLTemplateasUMLTemplate () const
 
const UMLUniqueConstraintasUMLUniqueConstraint () const
 
const UMLUseCaseasUMLUseCase () const
 

Protected Member Functions

void saveToXMI (QXmlStreamWriter &writer)
 
virtual bool load1 (QDomElement &element)
 
- Protected Member Functions inherited from UMLObject
void init ()
 
void maybeSignalObjectCreated ()
 
void save1end (QXmlStreamWriter &writer)
 

Private Attributes

UMLAssociationm_pClassAssoc
 

Additional Inherited Members

- Public Slots inherited from UMLObject
void emitModified ()
 
- Static Public Member Functions inherited from UMLObject
static QString toString (ObjectType ot)
 
static QString toI18nString (ObjectType t)
 
static Icon_Utils::IconType toIcon (ObjectType t)
 
- Protected Attributes inherited from UMLPackage
UMLObjectList m_objects
 
- Protected Attributes inherited from UMLObject
Uml::ID::Type m_nId
 object's id More...
 
QString m_Doc
 object's documentation More...
 
QPointer< UMLStereotypem_pStereotype
 stereotype of the object if applicable More...
 
QString m_name
 objects name More...
 
ObjectType m_BaseType
 objects type More...
 
Uml::Visibility::Enum m_visibility
 objects visibility More...
 
bool m_bAbstract
 state of whether the object is abstract or not More...
 
bool m_bStatic
 flag for instance scope More...
 
bool m_bCreationWasSignalled
 auxiliary to maybeSignalObjectCreated() More...
 
QPointer< UMLObjectm_pSecondary
 
QString m_SecondaryId
 
QString m_SecondaryFallback
 
QStringList m_TaggedValues
 
UMLObjectPrivatem_d
 private data More...
 

Detailed Description

Information for a non-graphical Concept/Class.

This class defines the non-graphical information required for a UML Classifier (ie a class or interface). This class inherits from UMLPackage which allows classifiers to also act as namespaces, i.e. it allows classifiers to nest.

NOTE: There is a unit test available for this class. Please, use and adapt it when necessary.

Author
Paul Hensgen phens.nosp@m.gen@.nosp@m.techi.nosp@m.e.co.nosp@m.m Bugs and comments to umbre.nosp@m.llo-.nosp@m.devel.nosp@m.@kde.nosp@m..org or https://bugs.kde.org

Member Enumeration Documentation

◆ ClassifierType

Enumeration identifying the type of classifier.

Enumerator
ALL 
CLASS 
INTERFACE 
DATATYPE 

Constructor & Destructor Documentation

◆ UMLClassifier()

UMLClassifier::UMLClassifier ( const QString &  name = QString(),
Uml::ID::Type  id = Uml::ID::None 
)
explicit

Sets up a Classifier.

Parameters
nameThe name of the Concept.
idThe unique id of the Concept.

◆ ~UMLClassifier()

UMLClassifier::~UMLClassifier ( )
virtual

Standard deconstructor.

Member Function Documentation

◆ acceptAssociationType()

bool UMLClassifier::acceptAssociationType ( Uml::AssociationType::Enum  type) const
virtual

Reimplemented from UMLObject.

Reimplemented from UMLObject.

◆ addAttribute() [1/3]

UMLAttribute * UMLClassifier::addAttribute ( const QString &  name,
Uml::ID::Type  id = Uml::ID::None 
)

Creates and adds an attribute for the class.

Parameters
namean optional name, used by when creating through UMLListView
idan optional id
Returns
the UMLAttribute created and added
Here is the call graph for this function:

◆ addAttribute() [2/3]

UMLAttribute * UMLClassifier::addAttribute ( const QString &  name,
UMLObject type,
Uml::Visibility::Enum  scope 
)

Adds an already created attribute. The attribute object must not belong to any other concept.

Parameters
namethe name of the attribute
typethe type of the attribute
scopethe visibility of the attribute
Returns
the just created and added attribute
Here is the call graph for this function:

◆ addAttribute() [3/3]

bool UMLClassifier::addAttribute ( UMLAttribute att,
IDChangeLog log = 0,
int  position = -1 
)

Adds an already created attribute. The attribute object must not belong to any other concept.

Parameters
attPointer to the UMLAttribute.
logPointer to the IDChangeLog (optional.)
positionPosition index for the insertion (optional.) If the position is omitted, or if it is negative or too large, the attribute is added to the end of the list.
Returns
True if the attribute was successfully added.
Here is the call graph for this function:

◆ addOperation() [1/2]

bool UMLClassifier::addOperation ( UMLOperation op,
IDChangeLog log 
)

Appends an operation to the classifier.

See also
bool addOperation(UMLOperation* Op, int position = -1) This function is mainly intended for the clipboard.
Parameters
opPointer to the UMLOperation to add.
logPointer to the IDChangeLog.
Returns
True if the operation was added successfully.
Here is the call graph for this function:

◆ addOperation() [2/2]

bool UMLClassifier::addOperation ( UMLOperation op,
int  position = -1 
)

Appends an operation to the classifier. This function is mainly intended for the clipboard.

Parameters
opPointer to the UMLOperation to add.
positionInserted at the given position.
Returns
True if the operation was added successfully.
Here is the call graph for this function:

◆ addTemplate() [1/3]

UMLTemplate * UMLClassifier::addTemplate ( const QString &  name,
Uml::ID::Type  id = Uml::ID::None 
)

Adds an already created template. The template object must not belong to any other concept.

Parameters
namethe name of the template
idthe id of the template
Returns
the added template
Here is the call graph for this function:

◆ addTemplate() [2/3]

bool UMLClassifier::addTemplate ( UMLTemplate newTemplate,
IDChangeLog log = 0 
)

Adds an already created template. The template object must not belong to any other concept.

Parameters
newTemplatePointer to the UMLTemplate object to add.
logPointer to the IDChangeLog.
Returns
True if the template was successfully added.
Here is the call graph for this function:

◆ addTemplate() [3/3]

bool UMLClassifier::addTemplate ( UMLTemplate templt,
int  position 
)

Adds an template to the class. The template object must not belong to any other class. TODO: If the param IDChangeLog from the method above is not being used, give position a default value of -1 and the method can replace the above one.

Parameters
templtPointer to the UMLTemplate to add.
positionThe position of the template in the list. A value of -1 will add the template at the end.
Returns
True if the template was successfully added.
Here is the call graph for this function:

◆ attributeAdded

void UMLClassifier::attributeAdded ( UMLClassifierListItem _t1)
signal

◆ attributeRemoved

void UMLClassifier::attributeRemoved ( UMLClassifierListItem _t1)
signal

◆ checkOperationSignature()

UMLOperation * UMLClassifier::checkOperationSignature ( const QString &  name,
UMLAttributeList  opParams,
UMLOperation exemptOp = 0 
) const

Checks whether an operation is valid based on its signature - An operation is "valid" if the operation's name and parameter list are unique in the classifier.

Parameters
nameName of the operation to check.
opParamsThe operation's argument list.
exemptOpPointer to the exempt method (optional.)
Returns
NULL if the signature is valid (ok), else return a pointer to the existing UMLOperation that causes the conflict.
Here is the call graph for this function:

◆ clone()

UMLObject * UMLClassifier::clone ( ) const
virtual

Make a clone of this object.

Reimplemented from UMLPackage.

Reimplemented in UMLEntity, and UMLEnum.

Here is the call graph for this function:

◆ copyInto()

void UMLClassifier::copyInto ( UMLObject lhs) const
virtual

Copy the internal presentation of this object into the new object.

Reimplemented from UMLPackage.

Reimplemented in UMLEntity, and UMLEnum.

Here is the call graph for this function:

◆ createAttribute()

UMLAttribute * UMLClassifier::createAttribute ( const QString &  name = QString(),
UMLObject type = 0,
Uml::Visibility::Enum  vis = Uml::Visibility::Private,
const QString &  init = QString() 
)
virtual

Creates an attribute for the class.

Parameters
nameAn optional name, used by when creating through UMLListView
typeAn optional type, used by when creating through UMLListView
visAn optional visibility, used by when creating through UMLListView
initAn optional initial value, used by when creating through UMLListView
Returns
The UMLAttribute created

Reimplemented in UMLEntity.

Here is the call graph for this function:

◆ createOperation()

UMLOperation * UMLClassifier::createOperation ( const QString &  name = QString(),
bool *  isExistingOp = 0,
Model_Utils::NameAndType_List params = 0 
)

Creates an operation in the current document. The new operation is initialized with name, id, etc. If a method with the given profile already exists in the classifier, no new method is created and the existing operation is returned. If no name is provided, or if the params are 0, an Operation Dialog is shown to ask the user for a name and parameters. The operation's signature is checked for validity within the parent classifier.

Parameters
nameThe operation name (will be chosen internally if none given.)
isExistingOpOptional pointer to bool. If supplied, the bool is set to true if an existing operation is returned.
paramsOptional list of parameter names and types. If supplied, new operation parameters are constructed using this list.
Returns
The new operation, or NULL if the operation could not be created because for example, the user canceled the dialog or no appropriate name can be found.
Here is the call graph for this function:

◆ createTemplate()

UMLObject * UMLClassifier::createTemplate ( const QString &  currentName = QString())

Create and add a just created template.

Parameters
currentNamethe name of the template
Returns
the template or NULL
Here is the call graph for this function:

◆ findChildObjectById()

UMLObject * UMLClassifier::findChildObjectById ( Uml::ID::Type  id,
bool  considerAncestors = false 
) const
virtual

Find the child object by the given id.

Parameters
idthe id of the child object
considerAncestorsflag whether the ancestors should be considered during search
Returns
the found child object or NULL

Reimplemented from UMLCanvasObject.

Here is the call graph for this function:

◆ findOperation()

UMLOperation * UMLClassifier::findOperation ( const QString &  name,
Model_Utils::NameAndType_List  params 
) const

Find an operation of the given name and parameter signature.

Parameters
nameThe name of the operation to find.
paramsThe parameter descriptors of the operation to find.
Returns
The operation found. Will return 0 if none found.
Here is the call graph for this function:

◆ findOperations()

UMLOperationList UMLClassifier::findOperations ( const QString &  n) const

Find a list of operations with the given name.

Parameters
nThe name of the operation to find.
Returns
The list of objects found; will be empty if none found.
Here is the call graph for this function:

◆ findSubClassConcepts()

UMLClassifierList UMLClassifier::findSubClassConcepts ( ClassifierType  type = ALL) const

Returns a list of concepts which inherit from this concept.

Parameters
typeThe ClassifierType to seek.
Returns
List of UMLClassifiers that inherit from us.
Here is the call graph for this function:

◆ findSuperClassConcepts()

UMLClassifierList UMLClassifier::findSuperClassConcepts ( ClassifierType  type = ALL) const

Returns a list of concepts which this concept inherits from.

Parameters
typeThe ClassifierType to seek.
Returns
List of UMLClassifiers we inherit from.
Here is the call graph for this function:

◆ findTemplate()

UMLTemplate * UMLClassifier::findTemplate ( const QString &  name) const

Seeks the template parameter of the given name.

Parameters
namethe template name
Returns
the found template or 0
Here is the call graph for this function:

◆ getAttributeList() [1/2]

UMLAttributeList UMLClassifier::getAttributeList ( ) const

Returns the attributes for the specified scope.

Returns
List of true attributes for the class.
Here is the call graph for this function:

◆ getAttributeList() [2/2]

UMLAttributeList UMLClassifier::getAttributeList ( Uml::Visibility::Enum  scope) const

Returns the attributes for the specified scope.

Parameters
scopeThe scope of the attribute.
Returns
List of true attributes for the class.
Here is the call graph for this function:

◆ getAttributeListStatic()

UMLAttributeList UMLClassifier::getAttributeListStatic ( Uml::Visibility::Enum  scope) const

Returns the static attributes for the specified scope.

Parameters
scopeThe scope of the attribute.
Returns
List of true attributes for the class.
Here is the call graph for this function:

◆ getFilteredList()

UMLClassifierListItemList UMLClassifier::getFilteredList ( UMLObject::ObjectType  ot) const
virtual

Returns the entries in subordinates that are of the requested type. If the requested type is UMLObject::ot_UMLObject then all entries are returned.

Parameters
otthe requested object type
Returns
The list of true operations for the Concept.

Reimplemented in UMLEntity.

Here is the call graph for this function:

◆ getOpList()

UMLOperationList UMLClassifier::getOpList ( bool  includeInherited = false,
UMLClassifierSet alreadyTraversed = 0 
) const

Return a list of operations for the Classifier.

Parameters
includeInheritedIncludes operations from superclasses.
alreadyTraversedinternal used object to avoid recursive loops
Returns
The list of operations for the Classifier.
Here is the call graph for this function:

◆ getTemplateList()

UMLTemplateList UMLClassifier::getTemplateList ( ) const

Returns the templates. Same as UMLClassifier::getFilteredList(ot_Template) but return type is a true UMLTemplateList.

Returns
Pointer to the list of true templates for the class.
Here is the call graph for this function:

◆ getUniAssociationToBeImplemented()

UMLAssociationList UMLClassifier::getUniAssociationToBeImplemented ( ) const
virtual

Return the list of unidirectional association that should show up in the code

Here is the call graph for this function:

◆ hasAbstractOps()

bool UMLClassifier::hasAbstractOps ( ) const

Return true if this classifier has abstract operations.

Here is the call graph for this function:

◆ hasAccessorMethods()

bool UMLClassifier::hasAccessorMethods ( ) const

Return true if this classifier has accessor methods.

Here is the call graph for this function:

◆ hasAssociations()

bool UMLClassifier::hasAssociations ( ) const

Return true if this classifier has associations.

Returns
true if classifier has associations
Here is the call graph for this function:

◆ hasAttributes()

bool UMLClassifier::hasAttributes ( ) const

Return true if this classifier has attributes.

Here is the call graph for this function:

◆ hasMethods()

bool UMLClassifier::hasMethods ( ) const

Return true if this classifier has methods.

Here is the call graph for this function:

◆ hasOperationMethods()

bool UMLClassifier::hasOperationMethods ( ) const

Return true if this classifier has operation methods.

Here is the call graph for this function:

◆ hasStaticAttributes()

bool UMLClassifier::hasStaticAttributes ( ) const

Return true if this classifier has static attributes.

Here is the call graph for this function:

◆ hasVectorFields()

bool UMLClassifier::hasVectorFields ( ) const

Return true if this classifier has vector fields.

Here is the call graph for this function:

◆ isInterface()

bool UMLClassifier::isInterface ( ) const

Returns true if this classifier represents an interface.

◆ load1()

bool UMLClassifier::load1 ( QDomElement &  element)
protectedvirtual

Auxiliary to loadFromXMI: The loading of operations is implemented here. Calls loadFromXMI() for any other tag. Child classes can override the loadFromXMI() method to load its additional tags.

Reimplemented from UMLPackage.

Reimplemented in UMLDatatype, UMLEntity, and UMLEnum.

Here is the call graph for this function:

◆ makeChildObject()

UMLClassifierListItem * UMLClassifier::makeChildObject ( const QString &  xmiTag)
virtual

utility functions to allow easy determination of what classifiers are "owned" by the current one via named association type (e.g. plain, aggregate or compositions).

Create a new ClassifierListObject (attribute, operation, template) according to the given XMI tag. Returns NULL if the string given does not contain one of the tags <UML:Attribute>, <UML:Operation>, or <UML:TemplateParameter>. Used by the clipboard for paste operation.

Reimplemented in UMLEntity, and UMLEnum.

Here is the call graph for this function:

◆ operationAdded

void UMLClassifier::operationAdded ( UMLClassifierListItem _t1)
signal

◆ operationRemoved

void UMLClassifier::operationRemoved ( UMLClassifierListItem _t1)
signal

◆ operations()

int UMLClassifier::operations ( ) const

Counts the number of operations in the Classifier.

Returns
The number of operations for the Classifier.
Here is the call graph for this function:

◆ removeAttribute()

int UMLClassifier::removeAttribute ( UMLAttribute att)

Removes an attribute from the class.

Parameters
attThe attribute to remove.
Returns
Count of the remaining attributes after removal. Returns -1 if the given attribute was not found.
Here is the call graph for this function:

◆ removeOperation()

int UMLClassifier::removeOperation ( UMLOperation op)

Remove an operation from the Classifier. The operation is not deleted so the caller is responsible for what happens to it after this.

Parameters
opThe operation to remove.
Returns
Count of the remaining operations after removal, or -1 if the given operation was not found.
Here is the call graph for this function:

◆ removeTemplate()

int UMLClassifier::removeTemplate ( UMLTemplate umltemplate)

Removes a template from the class.

Parameters
umltemplateThe template to remove.
Returns
Count of the remaining templates after removal. Returns -1 if the given template was not found.
Here is the call graph for this function:

◆ resolveRef()

bool UMLClassifier::resolveRef ( )
virtual

Needs to be called after all UML objects are loaded from file. Calls the parent resolveRef(), and calls resolveRef() on all UMLClassifierListItems. Overrides the method from UMLObject.

Returns
true for success.

Reimplemented from UMLPackage.

Reimplemented in UMLEntity.

Here is the call graph for this function:

◆ saveToXMI()

void UMLClassifier::saveToXMI ( QXmlStreamWriter &  writer)
protectedvirtual

Utility method called by "get*ChildClassfierList()" methods. It basically finds all the classifiers named in each association in the given association list which aren't the current one. Useful for finding which classifiers are "owned" by the current one via declared associations such as in aggregations/compositions.

Creates XML tag <UML:Class>, <UML:Interface>, or <UML:DataType> depending on m_BaseType. Saves possible template parameters, generalizations, attributes, operations, and contained objects to the given QDomElement.

Reimplemented from UMLPackage.

Reimplemented in UMLDatatype, UMLEntity, and UMLEnum.

Here is the call graph for this function:

◆ setBaseType()

void UMLClassifier::setBaseType ( UMLObject::ObjectType  ot)
virtual

Reimplementation of method from class UMLObject for controlling the exact type of this classifier: class, interface, or datatype.

Parameters
otthe base type to set

Reimplemented from UMLObject.

Here is the call graph for this function:

◆ setNameCmd()

void UMLClassifier::setNameCmd ( const QString &  strName)
virtual

override setting name of classifier

Parameters
strNamename to set

Reimplemented from UMLObject.

Here is the call graph for this function:

◆ takeItem()

int UMLClassifier::takeItem ( UMLClassifierListItem item)

Take and return a subordinate item from this classifier. Ownership of the item is passed to the caller.

Parameters
itemSubordinate item to take.
Returns
Index in subordinates of the item taken. Return -1 if the item is not found in subordinates.
Here is the call graph for this function:

◆ templateAdded

void UMLClassifier::templateAdded ( UMLClassifierListItem _t1)
signal

◆ templateRemoved

void UMLClassifier::templateRemoved ( UMLClassifierListItem _t1)
signal

◆ templates()

int UMLClassifier::templates ( ) const

Returns the number of templates for the class.

Returns
The number of templates for the class.
Here is the call graph for this function:

Member Data Documentation

◆ m_pClassAssoc

UMLAssociation* UMLClassifier::m_pClassAssoc
private

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