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

umbrello/umbrello

UMLOperation Class Reference

#include <operation.h>

Inheritance diagram for UMLOperation:

Inheritance graph
[legend]

List of all members.


Detailed Description

This class represents an operation in the UML model.

Bugs and comments to uml-devel@lists.sf.net or http://bugs.kde.org

Definition at line 25 of file operation.h.


Public Member Functions

 UMLOperation (UMLClassifier *parent, const QString &name, Uml::IDType id=Uml::id_None, Uml::Visibility s=Uml::Visibility::Public, UMLObject *rt=0)
 UMLOperation (UMLClassifier *parent)
virtual ~UMLOperation ()
bool operator== (const UMLOperation &rhs)
virtual void copyInto (UMLObject *lhs) const
virtual UMLObject * clone () const
void setType (UMLObject *type)
void moveParmLeft (UMLAttribute *a)
void moveParmRight (UMLAttribute *a)
void removeParm (UMLAttribute *a, bool emitModifiedSignal=true)
UMLAttributeList getParmList ()
UMLAttribute * findParm (const QString &name)
QString toString (Uml::Signature_Type sig=Uml::st_NoSig)
void addParm (UMLAttribute *parameter, int position=-1)
bool resolveRef ()
QString getUniqueParameterName ()
bool showPropertiesDialog (QWidget *parent)
bool isConstructorOperation ()
bool isDestructorOperation ()
bool isLifeOperation ()
void setConst (bool b)
bool getConst () const
void setSourceCode (const QString &code)
QString getSourceCode () const
void saveToXMI (QDomDocument &qDoc, QDomElement &qElement)

Protected Member Functions

bool load (QDomElement &element)

Constructor & Destructor Documentation

UMLOperation::UMLOperation ( UMLClassifier *  parent,
const QString &  name,
Uml::IDType  id = Uml::id_None,
Uml::Visibility  s = Uml::Visibility::Public,
UMLObject *  rt = 0 
)

Constructs an UMLOperation.

Not intended for general use: The operation is not tied in with umbrello's Qt signalling for object creation. If you want to create an Operation use the method in UMLDoc instead.

Parameters:
parent the parent to this operation
name the name of the operation
id the id of the operation
s the visibility of the operation
rt the return type of the operation

Definition at line 32 of file operation.cpp.

UMLOperation::UMLOperation ( UMLClassifier *  parent  ) 

Constructs an UMLOperation.

Not intended for general use: The operation is not tied in with umbrello's Qt signalling for object creation. If you want to create an Operation use the method in UMLDoc instead.

Parameters:
parent the parent to this operation

Definition at line 47 of file operation.cpp.

UMLOperation::~UMLOperation (  )  [virtual]

Destructor.

Definition at line 55 of file operation.cpp.


Member Function Documentation

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

Overloaded '==' operator.

Definition at line 202 of file operation.cpp.

void UMLOperation::copyInto ( UMLObject *  lhs  )  const [virtual]

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

Reimplemented from UMLClassifierListItem.

Definition at line 222 of file operation.cpp.

UMLObject * UMLOperation::clone (  )  const [virtual]

Make a clone of this object.

Implements UMLClassifierListItem.

Definition at line 231 of file operation.cpp.

void UMLOperation::setType ( UMLObject *  type  )  [virtual]

Reimplement method from UMLClassifierListItem.

Parameters:
type pointer to the type object

Reimplemented from UMLClassifierListItem.

Definition at line 59 of file operation.cpp.

void UMLOperation::moveParmLeft ( UMLAttribute *  a  ) 

Move a parameter one position to the left.

Parameters:
a the parameter to move

Definition at line 66 of file operation.cpp.

void UMLOperation::moveParmRight ( UMLAttribute *  a  ) 

Move a parameter one position to the right.

Parameters:
a the parameter to move

Definition at line 85 of file operation.cpp.

void UMLOperation::removeParm ( UMLAttribute *  a,
bool  emitModifiedSignal = true 
)

Remove a parameter from the operation.

Parameters:
a the parameter to remove
emitModifiedSignal whether to emit the "modified" signal which creates an entry in the Undo stack for the removal, default: true

Definition at line 105 of file operation.cpp.

UMLAttributeList UMLOperation::getParmList (  )  [inline]

Returns a list of parameters.

Returns:
a list of the parameters in the operation

Definition at line 115 of file operation.h.

UMLAttribute * UMLOperation::findParm ( const QString &  name  ) 

Finds a parameter of the operation.

Parameters:
name the parameter name to search for
Returns:
the found parameter, 0 if not found

Definition at line 120 of file operation.cpp.

QString UMLOperation::toString ( Uml::Signature_Type  sig = Uml::st_NoSig  )  [virtual]

Returns a string representation of the operation.

Parameters:
sig what type of operation string to show
Returns:
the string representation of the operation

Reimplemented from UMLClassifierListItem.

Definition at line 130 of file operation.cpp.

void UMLOperation::addParm ( UMLAttribute *  parameter,
int  position = -1 
)

Add a parameter to the operation.

Parameters:
parameter the parameter to add
position the position in the parameter list. If position = -1 the parameter will be appended to the list.

Definition at line 182 of file operation.cpp.

bool UMLOperation::resolveRef (  )  [virtual]

Calls resolveRef() on all parameters.

Needs to be called after all UML objects are loaded from file.

Returns:
true for success

Reimplemented from UMLObject.

Definition at line 240 of file operation.cpp.

QString UMLOperation::getUniqueParameterName (  ) 

Returns an unused parameter name for a new parameter.

Definition at line 192 of file operation.cpp.

bool UMLOperation::showPropertiesDialog ( QWidget *  parent  )  [virtual]

Display the properties configuration dialog for the template.

Parameters:
parent the parent for the dialog

Implements UMLClassifierListItem.

Definition at line 299 of file operation.cpp.

bool UMLOperation::isConstructorOperation (  ) 

Returns whether this operation is a constructor.

Returns:
true if this operation is a constructor

Definition at line 251 of file operation.cpp.

bool UMLOperation::isDestructorOperation (  ) 

Returns whether this operation is a destructor.

Returns:
true if this operation is a destructor

Definition at line 267 of file operation.cpp.

bool UMLOperation::isLifeOperation (  ) 

Shortcut for (isConstructorOperation() || isDestructorOperation()).

Returns:
true if this operation is a constructor or destructor

Definition at line 284 of file operation.cpp.

void UMLOperation::setConst ( bool  b  ) 

Sets whether this operation is a query (C++ "const").

Definition at line 289 of file operation.cpp.

bool UMLOperation::getConst (  )  const

Returns whether this operation is a query (C++ "const").

Definition at line 294 of file operation.cpp.

void UMLOperation::setSourceCode ( const QString &  code  ) 

Sets the source code for this operation.

Parameters:
code the body of this operation

Definition at line 305 of file operation.cpp.

QString UMLOperation::getSourceCode (  )  const

Returns the source code for this operation.

Definition at line 310 of file operation.cpp.

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

Saves to the <UML:Operation> XMI element.

Implements UMLObject.

Definition at line 315 of file operation.cpp.

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

Loads a <UML:Operation> XMI element.

Reimplemented from UMLObject.

Definition at line 360 of file operation.cpp.


The documentation for this class was generated from the following files:
  • operation.h
  • operation.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