umbrello/umbrello
#include <operation.h>
Public Member Functions | |
UMLOperation (UMLClassifier *parent, const QString &name, Uml::ID::Type id=Uml::ID::None, Uml::Visibility::Enum s=Uml::Visibility::Public, UMLObject *rt=0) | |
UMLOperation (UMLClassifier *parent) | |
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) const |
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::SignatureType::Enum sig=Uml::SignatureType::NoSig) |
Public Member Functions inherited from UMLClassifierListItem | |
UMLClassifierListItem (UMLObject *parent, const QString &name, Uml::ID::Type id=Uml::ID::None) | |
UMLClassifierListItem (UMLObject *parent) | |
virtual | ~UMLClassifierListItem () |
UMLClassifier * | getType () const |
virtual QString | getTypeName () const |
void | setTypeName (const QString &type) |
Public Member Functions inherited from UMLObject | |
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 () |
virtual bool | acceptAssociationType (Uml::AssociationType::Enum) |
ObjectType | baseType () const |
QLatin1String | baseTypeStr () const |
QString | doc () const |
virtual QString | fullyQualifiedName (const QString &separator=QString(), bool includeRoot=false) const |
bool | hasDoc () const |
virtual Uml::ID::Type | id () const |
bool | isAbstract () const |
bool | isStatic () const |
virtual bool | loadFromXMI (QDomElement &element) |
bool | loadStereotype (QDomElement &element) |
QString | name () const |
bool | operator== (const UMLObject &rhs) const |
QString | package (const QString &separator=QString(), bool includeRoot=false) |
UMLPackageList | packages (bool includeRoot=false) const |
QDomElement | save (const QString &tag, QDomDocument &qDoc) |
QString | secondaryFallback () const |
QString | secondaryId () const |
void | setAbstract (bool bAbstract) |
virtual void | setBaseType (ObjectType ot) |
void | setDoc (const QString &d) |
virtual void | setID (Uml::ID::Type NewID) |
void | setInPaste (bool bInPaste=true) |
virtual void | setName (const QString &strName) |
void | setNameCmd (const QString &strName) |
void | setPackage (const QString &_name) |
void | setSecondaryFallback (const QString &id) |
void | setSecondaryId (const QString &id) |
void | setStatic (bool bStatic) |
void | setStereotype (const QString &_name) |
void | setStereotypeCmd (const QString &_name) |
bool | setUMLPackage (UMLPackage *pPkg) |
void | setUMLStereotype (UMLStereotype *stereo) |
void | setVisibility (Uml::Visibility::Enum visibility) |
void | setVisibilityCmd (Uml::Visibility::Enum visibility) |
virtual bool | showPropertiesPagedDialog (int page=0, bool assoc=false) |
QString | stereotype (bool includeAdornments=false) const |
UMLPackage * | umlPackage () |
const UMLStereotype * | umlStereotype () |
Uml::Visibility::Enum | visibility () const |
Protected Member Functions | |
bool | load (QDomElement &element) |
Protected Member Functions inherited from UMLObject | |
void | init () |
void | maybeSignalObjectCreated () |
Detailed Description
This class represents an operation in the UML model.
Bugs and comments to umbre or llo- devel @kde .orghttp://bugs.kde.org
Definition at line 24 of file operation.h.
Constructor & Destructor Documentation
UMLOperation::UMLOperation | ( | UMLClassifier * | parent, |
const QString & | name, | ||
Uml::ID::Type | id = Uml::ID::None , |
||
Uml::Visibility::Enum | 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.
|
explicit |
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.
|
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 259 of file operation.cpp.
|
virtual |
Make a clone of this object.
Implements UMLClassifierListItem.
Definition at line 321 of file operation.cpp.
|
virtual |
Copy the internal presentation of this object into the new object.
Reimplemented from UMLClassifierListItem.
Definition at line 309 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 411 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 440 of file operation.cpp.
QString UMLOperation::getUniqueParameterName | ( | ) |
Returns an unused parameter name for a new parameter.
Definition at line 272 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 352 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 373 of file operation.cpp.
bool UMLOperation::isLifeOperation | ( | ) |
Shortcut for (isConstructorOperation() || isDestructorOperation()).
- Returns
- true if this operation is a constructor or destructor
Definition at line 395 of file operation.cpp.
|
protectedvirtual |
Loads a <UML:Operation> XMI element.
Reimplemented from UMLObject.
Definition at line 496 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 | ) | const |
Overloaded '==' operator.
Definition at line 285 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.
|
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 336 of file operation.cpp.
|
virtual |
Saves to the <UML:Operation> XMI element.
Implements UMLObject.
Definition at line 448 of file operation.cpp.
void UMLOperation::setConst | ( | bool | b | ) |
Sets whether this operation is a query (C++ "const").
Definition at line 403 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 432 of file operation.cpp.
|
virtual |
Reimplement method from UMLClassifierListItem.
- Parameters
-
type pointer to the type object
Reimplemented from UMLClassifierListItem.
Definition at line 87 of file operation.cpp.
|
virtual |
Display the properties configuration dialog for the template.
- Parameters
-
parent the parent for the dialog
Implements UMLClassifierListItem.
Definition at line 421 of file operation.cpp.
|
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:
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 23:06:02 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.