umbrello/umbrello
#include <operation.h>
Protected Member Functions | |
bool | load (QDomElement &element) |
Protected Member Functions inherited from UMLObject | |
void | init () |
void | maybeSignalObjectCreated () |
Protected Member Functions inherited from QObject | |
bool | checkConnectArgs (const char *signal, const QObject *object, const char *method) |
virtual void | childEvent (QChildEvent *event) |
virtual void | connectNotify (const char *signal) |
virtual void | customEvent (QEvent *event) |
virtual void | disconnectNotify (const char *signal) |
int | receivers (const char *signal) const |
QObject * | sender () const |
int | senderSignalIndex () const |
virtual void | timerEvent (QTimerEvent *event) |
Additional Inherited Members | |
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_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 } |
Public Slots inherited from UMLObject | |
void | emitModified () |
Signals inherited from UMLObject | |
void | modified () |
Static Public Member Functions inherited from UMLObject | |
static QString | toString (ObjectType ot) |
Static Public Member Functions inherited from QObject | |
bool | connect (const QObject *sender, const char *signal, const QObject *receiver, const char *method, Qt::ConnectionType type) |
bool | connect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &method, Qt::ConnectionType type) |
bool | disconnect (const QObject *sender, const char *signal, const QObject *receiver, const char *method) |
bool | disconnect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &method) |
QString | tr (const char *sourceText, const char *disambiguation, int n) |
QString | trUtf8 (const char *sourceText, const char *disambiguation, int n) |
Static Protected Member Functions inherited from QObject | |
QByteArray | normalizeSignalSlot (const char *signalSlot) |
Protected Attributes inherited from UMLObject | |
bool | m_bAbstract |
ObjectType | m_BaseType |
bool | m_bCreationWasSignalled |
bool | m_bInPaste |
bool | m_bStatic |
QString | m_Doc |
QString | m_name |
Uml::ID::Type | m_nId |
UMLObject * | m_pSecondary |
UMLStereotype * | m_pStereotype |
UMLPackage * | m_pUMLPackage |
QString | m_SecondaryFallback |
QString | m_SecondaryId |
Uml::Visibility::Enum | m_visibility |
Properties inherited from QObject | |
objectName | |
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 45 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 68 of file operation.cpp.
|
virtual |
Destructor.
Definition at line 79 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 260 of file operation.cpp.
|
virtual |
Make a clone of this object.
Implements UMLClassifierListItem.
Definition at line 322 of file operation.cpp.
|
virtual |
Copy the internal presentation of this object into the new object.
Reimplemented from UMLClassifierListItem.
Definition at line 310 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 183 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 172 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 273 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 353 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 100 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 124 of file operation.cpp.
bool UMLOperation::operator== | ( | const UMLOperation & | rhs | ) | const |
Overloaded '==' operator.
Definition at line 286 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 152 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 337 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 88 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 199 of file operation.cpp.
The documentation for this class was generated from the following files:
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:40:29 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.