umbrello 26.03.70-f7b1fd3 Umbrello UML Modeller is a Unified Modelling Language (UML) diagram program based on KDE Technology

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files

- Namespace List
- Namespace Members

Functions | Variables
Object_Factory Namespace Reference

## Functions

void | assignUniqueIdOnCreation (bool yesno)
bool | assignUniqueIdOnCreation ()
UMLObject * | createNewUMLObject (UMLObject::ObjectType type, const QString &name, UMLPackage *parentPkg, bool undoable)
UMLObject * | createUMLObject (UMLObject::ObjectType type, const QString &n, UMLPackage *parentPkg, bool solicitNewName)
UMLAttribute * | createAttribute (UMLObject *parent, const QString &name, UMLObject *type)
UMLOperation * | createOperation (UMLClassifier *parent, const QString &name)
UMLClassifierListItem * | createChildObject (UMLClassifier *parent, UMLObject::ObjectType type, const QString &name)
UMLObject * | makeObjectFromXMI (const QString &xmiTag, const QString &stereoID)

## Variables

Uml::ID::Type | g_predefinedId = Uml::ID::None

## Function Documentation

## ◆ assignUniqueIdOnCreation() [1/2]

bool Object_Factory::assignUniqueIdOnCreation | ( |  | ) |

Return whether unique ID generation is on or off.

## ◆ assignUniqueIdOnCreation() [2/2]

void Object_Factory::assignUniqueIdOnCreation | ( | bool | yesno | ) |

Control whether the createUMLObject() solicits a new unique ID for the created object. By default, unique ID generation is turned on.

Parameters

  yesno | False turns UID generation off, true turns it on.

## ◆ createAttribute()

UMLAttribute * Object_Factory::createAttribute | ( | UMLObject * | parent,
|  | const QString & | name,
|  | UMLObject * | type
| ) |  |

## ◆ createChildObject()

UMLClassifierListItem * Object_Factory::createChildObject | ( | UMLClassifier * | parent,
|  | UMLObject::ObjectType | type,
|  | const QString & | name
| ) |  |

Creates an operation, attribute, template, or enum literal for the parent classifier.

Parameters

  parent | The parent classifier
  type | The type to create
  name | Optional name of object (skips creation dialog)

Returns
  Pointer to the UMLClassifierListItem created

## ◆ createNewUMLObject()

UMLObject * Object_Factory::createNewUMLObject | ( | UMLObject::ObjectType | type,
|  | const QString & | name,
|  | UMLPackage * | parentPkg,
|  | bool | undoable
| ) |  |

Creates a new UMLObject of the given type. No check is made for whether the object named name already exists. If the name shall be checked then use createUMLObject.

Parameters

  type | The type of UMLObject to create.
  name | Name to give to the object (mandatory.)
  parentPkg | The object's parent package.
  undoable | Whether to insert the object creation into the undo stack (default: true.)

## ◆ createOperation()

UMLOperation * Object_Factory::createOperation | ( | UMLClassifier * | parent,
|  | const QString & | name
| ) |  |

## ◆ createUMLObject()

UMLObject * Object_Factory::createUMLObject | ( | UMLObject::ObjectType | type,
|  | const QString & | n,
|  | UMLPackage * | parentPkg,
|  | bool | solicitNewName
| ) |  |

Creates a UMLObject of the given type.

Parameters

  type | The type of UMLObject to create.
  n | A name to give to the object (optional.) If not given then an input dialog prompts the user to supply a name.
  parentPkg | The object's parent package.
  solicitNewName | Ask user for a different name if an object of the given name already exists. If set to false and the name already exists then the existing object is returned. The default is to ask for the new name.

Returns
  Pointer to object or nullptr if object creation was canceled by the user.

## ◆ makeObjectFromXMI()

UMLObject * Object_Factory::makeObjectFromXMI | ( | const QString & | xmiTag,
|  | const QString & | stereoID
| ) |  |

Make a new UMLObject according to the given XMI tag. Used by loadFromXMI and clipboard paste.

## Variable Documentation

## ◆ g_predefinedId

Uml::ID::Type Object_Factory::g_predefinedId = Uml::ID::None