• Skip to content
  • Skip to link menu
KDE 4.0 API Reference
  • KDE API Reference
  • kdesdk
  • Sitemap
  • Contact Us
 

umbrello/umbrello

UMLRole Class Reference

#include <umlrole.h>

Inheritance diagram for UMLRole:

Inheritance graph
[legend]

List of all members.


Detailed Description

This class contains the non-graphic representation of an association role.

Author:
Brian Thomas <brian.thomas@gsfc.nasa.gov>
See also:
UMLObject

Definition at line 26 of file umlrole.h.


Public Member Functions

 UMLRole (UMLAssociation *parent, UMLObject *parentUMLObject, Uml::Role_Type role)
bool operator== (const UMLRole &rhs)
virtual ~UMLRole ()
UMLObject * getObject ()
Uml::Changeability_Type getChangeability () const
QString getMultiplicity () const
void setObject (UMLObject *obj)
void setChangeability (Uml::Changeability_Type value)
void setMultiplicity (const QString &multi)
UMLAssociation * getParentAssociation ()
Uml::Role_Type getRole ()
UMLObject * clone () const
void saveToXMI (QDomDocument &qDoc, QDomElement &qElement)

Protected Member Functions

bool load (QDomElement &element)

Constructor & Destructor Documentation

UMLRole::UMLRole ( UMLAssociation *  parent,
UMLObject *  parentUMLObject,
Uml::Role_Type  role 
)

Sets up an association.

Parameters:
parent The parent (association) of this UMLRole.
parentUMLObject The Parent UML Object of this UMLRole
role The Uml::Role_Type of this UMLRole

Definition at line 26 of file umlrole.cpp.

UMLRole::~UMLRole (  )  [virtual]

Standard deconstructor.

Definition at line 32 of file umlrole.cpp.


Member Function Documentation

bool UMLRole::operator== ( const UMLRole &  rhs  ) 

Overloaded '==' operator.

Definition at line 34 of file umlrole.cpp.

UMLObject * UMLRole::getObject (  ) 

Returns the UMLObject assigned to the role.

Returns:
Pointer to the UMLObject in role.

Definition at line 49 of file umlrole.cpp.

Uml::Changeability_Type UMLRole::getChangeability (  )  const

Returns the Changeablity of the role.

Returns:
Changeability_Type of role.

Definition at line 53 of file umlrole.cpp.

QString UMLRole::getMultiplicity (  )  const

Returns the multiplicity assigned to the role.

Returns:
The multiplicity assigned to the role.

Definition at line 57 of file umlrole.cpp.

void UMLRole::setObject ( UMLObject *  obj  ) 

Sets the UMLObject playing the role in the association.

Parameters:
obj Pointer to the UMLObject of role.

Definition at line 61 of file umlrole.cpp.

void UMLRole::setChangeability ( Uml::Changeability_Type  value  ) 

Sets the changeability of the role.

Parameters:
value Changeability_Type of role changeability.

Definition at line 77 of file umlrole.cpp.

void UMLRole::setMultiplicity ( const QString &  multi  ) 

Sets the multiplicity of the role.

Parameters:
multi The multiplicity of role.

Definition at line 82 of file umlrole.cpp.

UMLAssociation * UMLRole::getParentAssociation (  ) 

Definition at line 45 of file umlrole.cpp.

Uml::Role_Type UMLRole::getRole (  ) 

get the 'id' of the role (NOT the parent object).

This could be either Uml::A or Uml::B. Yes, it would be better if we could get along without this, but we need it to distinguish saved umlrole objects in the XMI for 'self' associations where both roles will point to the same underlying UMLObject.

Definition at line 87 of file umlrole.cpp.

UMLObject* UMLRole::clone (  )  const [inline, virtual]

Make a clone of this object.

Not yet implemented.

Implements UMLObject.

Definition at line 103 of file umlrole.h.

void UMLRole::saveToXMI ( QDomDocument &  qDoc,
QDomElement &  qElement 
) [virtual]

Creates the <UML:AssociationEnd> XMI element.

Implements UMLObject.

Definition at line 104 of file umlrole.cpp.

bool UMLRole::load ( QDomElement &  element  )  [protected, virtual]

Loads the <UML:AssociationEnd> XMI element.

Auxiliary to UMLObject::loadFromXMI.

There are different ways in which the multiplicity might be given:

  • direct value in the <AssociationEnd.multiplicity> tag,
  • attributes "lower" and "upper" of a subordinate <MultiplicityRange>,
  • direct value in subordinate <MultiplicityRange.lower> and <MultiplicityRange.upper> tags

Reimplemented from UMLObject.

Definition at line 158 of file umlrole.cpp.


The documentation for this class was generated from the following files:
  • umlrole.h
  • umlrole.cpp

umbrello/umbrello

Skip menu "umbrello/umbrello"
  • Main Page
  • Modules
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members
  • Related Pages

kdesdk

Skip menu "kdesdk"
  • kate
  •     kate
  • umbrello
  •   umbrello
Generated for kdesdk by doxygen 1.5.4
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal