umbrello 2.39.2 Umbrello UML Modeller is a Unified Modelling Language (UML) diagram program based on KDE Technology

- Main Page
- Related Pages
- Topics
- Namespaces
- Classes
- Files

- Class List
- Class Index
- Class Hierarchy
- Class Members

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:

## 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
UMLObject * | clone () const
virtual void | setNameCmd (const QString &strName)
virtual UMLAttribute * | createAttribute (const QString &name=QString(), UMLObject *type=0, Uml::Visibility::Enum vis=Uml::Visibility::Private, const QString &init=QString())
UMLAttribute * | addAttribute (const QString &name, Uml::ID::Type id=Uml::ID::None)
UMLAttribute * | addAttribute (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
UMLOperation * | createOperation (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)
UMLOperation * | checkOperationSignature (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
UMLObject * | createTemplate (const QString &name=QString())
UMLTemplate * | addTemplate (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)
UMLTemplate * | findTemplate (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 UMLObject * | findChildObjectById (Uml::ID::Type id, bool considerAncestors=false) const
UMLOperation * | findOperation (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 UMLClassifierListItem * | makeChildObject (const QString &xmiTag)
void | removeObject (UMLObject *pObject)
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)
virtual void | removeAllObjects ()
UMLObjectList | containedObjects (bool includeInactive=false) const
void | addAssocToConcepts (UMLAssociation *assoc)
void | removeAssocFromConcepts (UMLAssociation *assoc)
UMLObject * | findObject (const QString &name) const
UMLObject * | findObjectById (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 UMLObject * | findChildObject (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 ()
UMLObjectList & | subordinates () 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)
UMLStereotype * | umlStereotype () const
QStringList & | tags ()
QString | package (const QString &separator=QString(), bool includeRoot=false) const
UMLPackageList | packages (bool includeRoot=false) const
bool | setUMLPackage (UMLPackage *pPkg)
UMLPackage * | umlPackage () const
void | setUMLParent (UMLObject *parent)
UMLObject * | umlParent () 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
UMLActor * | asUMLActor ()
UMLArtifact * | asUMLArtifact ()
UMLAssociation * | asUMLAssociation ()
UMLAttribute * | asUMLAttribute ()
UMLCanvasObject * | asUMLCanvasObject ()
UMLCategory * | asUMLCategory ()
UMLCheckConstraint * | asUMLCheckConstraint ()
UMLClassifier * | asUMLClassifier ()
UMLClassifierListItem * | asUMLClassifierListItem ()
UMLClassifierSet * | asUMLClassifierSet ()
UMLComponent * | asUMLComponent ()
UMLDatatype * | asUMLDatatype ()
UMLEntity * | asUMLEntity ()
UMLEntityAttribute * | asUMLEntityAttribute ()
UMLEntityConstraint * | asUMLEntityConstraint ()
UMLEnum * | asUMLEnum ()
UMLEnumLiteral * | asUMLEnumLiteral ()
UMLFolder * | asUMLFolder ()
UMLForeignKeyConstraint * | asUMLForeignKeyConstraint ()
UMLInstance * | asUMLInstance ()
UMLInstanceAttribute * | asUMLInstanceAttribute ()
UMLNode * | asUMLNode ()
UMLObject * | asUMLObject ()
UMLOperation * | asUMLOperation ()
UMLPackage * | asUMLPackage ()
UMLPort * | asUMLPort ()
UMLRole * | asUMLRole ()
UMLStereotype * | asUMLStereotype ()
UMLTemplate * | asUMLTemplate ()
UMLUniqueConstraint * | asUMLUniqueConstraint ()
UMLUseCase * | asUMLUseCase ()
const UMLActor * | asUMLActor () const
const UMLArtifact * | asUMLArtifact () const
const UMLAssociation * | asUMLAssociation () const
const UMLAttribute * | asUMLAttribute () const
const UMLCanvasObject * | asUMLCanvasObject () const
const UMLCategory * | asUMLCategory () const
const UMLCheckConstraint * | asUMLCheckConstraint () const
const UMLClassifier * | asUMLClassifier () const
const UMLClassifierListItem * | asUMLClassifierListItem () const
const UMLClassifierSet * | asUMLClassifierSet () const
const UMLComponent * | asUMLComponent () const
const UMLDatatype * | asUMLDatatype () const
const UMLEntity * | asUMLEntity () const
const UMLEntityAttribute * | asUMLEntityAttribute () const
const UMLEntityConstraint * | asUMLEntityConstraint () const
const UMLEnum * | asUMLEnum () const
const UMLEnumLiteral * | asUMLEnumLiteral () const
const UMLFolder * | asUMLFolder () const
const UMLForeignKeyConstraint * | asUMLForeignKeyConstraint () const
const UMLInstance * | asUMLInstance () const
const UMLInstanceAttribute * | asUMLInstanceAttribute () const
const UMLNode * | asUMLNode () const
const UMLObject * | asUMLObject () const
const UMLOperation * | asUMLOperation () const
const UMLPackage * | asUMLPackage () const
const UMLPort * | asUMLPort () const
const UMLRole * | asUMLRole () const
const UMLStereotype * | asUMLStereotype () const
const UMLTemplate * | asUMLTemplate () const
const UMLUniqueConstraint * | asUMLUniqueConstraint () const
const UMLUseCase * | asUMLUseCase () 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
UMLAssociation * | m_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
QString | m_Doc
| object's documentation
QPointer< UMLStereotype > | m_pStereotype
| stereotype of the object if applicable
QString | m_name
| objects name
ObjectType | m_BaseType
| objects type
Uml::Visibility::Enum | m_visibility
| objects visibility
bool | m_bAbstract
| state of whether the object is abstract or not
bool | m_bStatic
| flag for instance scope
bool | m_bCreationWasSignalled
| auxiliary to maybeSignalObjectCreated()
QPointer< UMLObject > | m_pSecondary
QString | m_SecondaryId
QString | m_SecondaryFallback
QStringList | m_TaggedValues
UMLObjectPrivate * | m_d
| private data

## 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

enum UMLClassifier::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

  name | The name of the Concept.
  id | The 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

  name | an optional name, used by when creating through UMLListView
  id | an optional id

Returns
  the UMLAttribute created and added

## ◆ 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 classifier.

Parameters

  name | the name of the attribute
  type | the type of the attribute
  scope | the visibility of the attribute

Returns
  the just created and added attribute

## ◆ 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 classifier.

Parameters

  att | Pointer to the UMLAttribute.
  log | Pointer to the IDChangeLog (optional.)
  position | Position 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.

## ◆ 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

  op | Pointer to the UMLOperation to add.
  log | Pointer to the IDChangeLog.

Returns
  True if the operation was added successfully.

## ◆ 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

  op | Pointer to the UMLOperation to add.
  position | Inserted at the given position.

Returns
  True if the operation was added successfully.

## ◆ 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 classifier.

Parameters

  name | the name of the template
  id | the id of the template

Returns
  the added template

## ◆ 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 classifier.

Parameters

  newTemplate | Pointer to the UMLTemplate object to add.
  log | Pointer to the IDChangeLog.

Returns
  True if the template was successfully added.

## ◆ 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

  templt | Pointer to the UMLTemplate to add.
  position | The 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.

## ◆ attributeAdded

void UMLClassifier::attributeAdded | ( | UMLClassifierListItem * |  | ) |
| signal

## ◆ attributeRemoved

void UMLClassifier::attributeRemoved | ( | UMLClassifierListItem * |  | ) |
| 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

  name | Name of the operation to check.
  opParams | The operation's argument list.
  exemptOp | Pointer 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.

## ◆ clone()

UMLObject * UMLClassifier::clone | ( |  | ) | const
| virtual

Make a clone of this object.

Reimplemented from UMLPackage.

Reimplemented in UMLEntity, and UMLEnum.

## ◆ 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.

## ◆ 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

  name | An optional name, used by when creating through UMLListView
  type | An optional type, used by when creating through UMLListView
  vis | An optional visibility, used by when creating through UMLListView
  init | An optional initial value, used by when creating through UMLListView

Returns
  The UMLAttribute created

Reimplemented in UMLEntity.

## ◆ 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

  name | The operation name (will be chosen internally if none given.)
  isExistingOp | Optional pointer to bool. If supplied, the bool is set to true if an existing operation is returned.
  params | Optional 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.

## ◆ createTemplate()

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

Create and add a just created template.

Parameters

  currentName | the name of the template

Returns
  the template or NULL

## ◆ findChildObjectById()

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

Find the child object by the given id.

Parameters

  id | the id of the child object
  considerAncestors | flag whether the ancestors should be considered during search

Returns
  the found child object or NULL

Reimplemented from UMLCanvasObject.

## ◆ findOperation()

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

Find an operation of the given name and parameter signature.

Parameters

  name | The name of the operation to find.
  params | The parameter descriptors of the operation to find.

Returns
  The operation found. Will return 0 if none found.

## ◆ findOperations()

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

Find a list of operations with the given name.

Parameters

  n | The name of the operation to find.

Returns
  The list of objects found; will be empty if none found.

## ◆ findSubClassConcepts()

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

Returns a list of concepts which inherit from this classifier.

Parameters

  type | The ClassifierType to seek.

Returns
  List of UMLClassifiers that inherit from us.

## ◆ findSuperClassConcepts()

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

Returns a list of concepts which this classifier inherits from.

Parameters

  type | The ClassifierType to seek.

Returns
  List of UMLClassifiers we inherit from.

## ◆ findTemplate()

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

Seeks the template parameter of the given name.

Parameters

  name | the template name

Returns
  the found template or 0

## ◆ getAttributeList() [1/2]

UMLAttributeList UMLClassifier::getAttributeList | ( |  | ) | const

Returns the attributes for the specified scope.

Returns
  List of true attributes for the class.

## ◆ getAttributeList() [2/2]

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

Returns the attributes for the specified scope.

Parameters

  scope | The scope of the attribute.

Returns
  List of true attributes for the class.

## ◆ getAttributeListStatic()

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

Returns the static attributes for the specified scope.

Parameters

  scope | The scope of the attribute.

Returns
  List of true attributes for the class.

## ◆ 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

  ot | the requested object type

Returns
  The list of true operations for the Concept.

Reimplemented in UMLEntity.

## ◆ getOpList()

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

Return a list of operations for the Classifier.

Parameters

  includeInherited | Includes operations from superclasses.
  alreadyTraversed | internal used object to avoid recursive loops

Returns
  The list of operations for the Classifier.

## ◆ 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.

## ◆ getUniAssociationToBeImplemented()

UMLAssociationList UMLClassifier::getUniAssociationToBeImplemented | ( |  | ) | const
| virtual

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

## ◆ hasAbstractOps()

bool UMLClassifier::hasAbstractOps | ( |  | ) | const

Return true if this classifier has abstract operations.

## ◆ hasAccessorMethods()

bool UMLClassifier::hasAccessorMethods | ( |  | ) | const

Return true if this classifier has accessor methods.

## ◆ hasAssociations()

bool UMLClassifier::hasAssociations | ( |  | ) | const

Return true if this classifier has associations.

Returns
  true if classifier has associations

## ◆ hasAttributes()

bool UMLClassifier::hasAttributes | ( |  | ) | const

Return true if this classifier has attributes.

## ◆ hasMethods()

bool UMLClassifier::hasMethods | ( |  | ) | const

Return true if this classifier has methods.

## ◆ hasOperationMethods()

bool UMLClassifier::hasOperationMethods | ( |  | ) | const

Return true if this classifier has operation methods.

## ◆ hasStaticAttributes()

bool UMLClassifier::hasStaticAttributes | ( |  | ) | const

Return true if this classifier has static attributes.

## ◆ hasVectorFields()

bool UMLClassifier::hasVectorFields | ( |  | ) | const

Return true if this classifier has vector fields.

## ◆ isInterface()

bool UMLClassifier::isInterface | ( |  | ) | const

Returns true if this classifier represents an interface.

## ◆ load1()

bool UMLClassifier::load1 | ( | QDomElement & | element | ) |
| protected virtual

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.

## ◆ 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).

Creates a new classifier list object (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.

## ◆ operationAdded

void UMLClassifier::operationAdded | ( | UMLClassifierListItem * |  | ) |
| signal

## ◆ operationRemoved

void UMLClassifier::operationRemoved | ( | UMLClassifierListItem * |  | ) |
| signal

## ◆ operations()

int UMLClassifier::operations | ( |  | ) | const

Counts the number of operations in the Classifier.

Returns
  The number of operations for the Classifier.

## ◆ removeAttribute()

int UMLClassifier::removeAttribute | ( | UMLAttribute * | att | ) |

Removes an attribute from the class.

Parameters

  att | The attribute to remove.

Returns
  Count of the remaining attributes after removal. Returns -1 if the given attribute was not found.

## ◆ removeObject()

void UMLClassifier::removeObject | ( | UMLObject * | pObject | ) |
| virtual

Reimplements method from UMLPackage. Removes a classifier list object from this classifier. Does not physically delete the object. Does not emit signals.

Parameters

  pObject | Pointer to UMLObject to be removed is expected to be convertible to UMLClassifierListItem*.

Reimplemented from UMLPackage.

## ◆ 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

  op | The operation to remove.

Returns
  Count of the remaining operations after removal, or -1 if the given operation was not found.

## ◆ removeTemplate()

int UMLClassifier::removeTemplate | ( | UMLTemplate * | umltemplate | ) |

Removes a template from the class.

Parameters

  umltemplate | The template to remove.

Returns
  Count of the remaining templates after removal. Returns -1 if the given template was not found.

## ◆ 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.

## ◆ saveToXMI()

void UMLClassifier::saveToXMI | ( | QXmlStreamWriter & | writer | ) |
| protected virtual

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.

## ◆ 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

  ot | the base type to set

Reimplemented from UMLObject.

## ◆ setNameCmd()

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

override setting name of classifier

Parameters

  strName | name to set

Reimplemented from UMLObject.

## ◆ 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

  item | Subordinate item to take.

Returns
  Index in subordinates of the item taken. Return -1 if the item is not found in subordinates.

## ◆ templateAdded

void UMLClassifier::templateAdded | ( | UMLClassifierListItem * |  | ) |
| signal

## ◆ templateRemoved

void UMLClassifier::templateRemoved | ( | UMLClassifierListItem * |  | ) |
| signal

## ◆ templates()

int UMLClassifier::templates | ( |  | ) | const

Returns the number of templates for the class.

Returns
  The number of templates for the class.

## Member Data Documentation

## ◆ m_pClassAssoc

UMLAssociation* UMLClassifier::m_pClassAssoc
| private

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

- umbrello/umlmodel/classifier.h
- umbrello/umlmodel/classifier.cpp