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

umbrello/umbrello

UMLOperation Class Reference

This class represents an operation in the UML model. More...

#include <operation.h>

Inheritance diagram for UMLOperation:
Inheritance graph
[legend]

List of all members.

Public Member Functions

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

Protected Member Functions

bool load (QDomElement &element)

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 24 of file operation.h.


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 44 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 67 of file operation.cpp.

UMLOperation::~UMLOperation (  )  [virtual]

Destructor.

Definition at line 78 of file operation.cpp.


Member Function Documentation

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 258 of file operation.cpp.

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

Make a clone of this object.

Implements UMLClassifierListItem.

Definition at line 320 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 308 of file operation.cpp.

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 182 of file operation.cpp.

bool UMLOperation::getConst (  )  const

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

Definition at line 410 of file operation.cpp.

UMLAttributeList UMLOperation::getParmList (  )  const

Returns a list of parameters.

Returns:
a list of the parameters in the operation

Definition at line 171 of file operation.cpp.

QString UMLOperation::getSourceCode (  )  const

Returns the source code for this operation.

Definition at line 439 of file operation.cpp.

QString UMLOperation::getUniqueParameterName (  ) 

Returns an unused parameter name for a new parameter.

Definition at line 271 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 351 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 372 of file operation.cpp.

bool UMLOperation::isLifeOperation (  ) 

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

Returns:
true if this operation is a constructor or destructor

Definition at line 394 of file operation.cpp.

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

Loads a <UML:Operation> XMI element.

Reimplemented from UMLObject.

Definition at line 495 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 99 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 123 of file operation.cpp.

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

Overloaded '==' operator.

Reimplemented from UMLObject.

Definition at line 284 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 151 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 335 of file operation.cpp.

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

Saves to the <UML:Operation> XMI element.

Implements UMLObject.

Definition at line 447 of file operation.cpp.

void UMLOperation::setConst ( bool  b  ) 

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

Definition at line 402 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 431 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 87 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 420 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 198 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"
  • kapptemplate
  • kate
  •     kate
  • kbugbuster
  • kcachegrind
  • kompare
  • lokalize
  • umbrello
  •   umbrello
Generated for kdesdk by doxygen 1.5.9-20090814
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