umbrello 2.39.0
Umbrello UML Modeller is a Unified Modelling Language (UML) diagram program based on KDE Technology
Functions | Variables
Object_Factory Namespace Reference

Functions

void assignUniqueIdOnCreation (bool yesno)
 
bool assignUniqueIdOnCreation ()
 
UMLObjectcreateNewUMLObject (UMLObject::ObjectType type, const QString &name, UMLPackage *parentPkg, bool undoable)
 
UMLObjectcreateUMLObject (UMLObject::ObjectType type, const QString &n, UMLPackage *parentPkg, bool solicitNewName)
 
UMLAttributecreateAttribute (UMLObject *parent, const QString &name, UMLObject *type)
 
UMLOperationcreateOperation (UMLClassifier *parent, const QString &name)
 
UMLClassifierListItemcreateChildObject (UMLClassifier *parent, UMLObject::ObjectType type, const QString &name)
 
UMLObjectmakeObjectFromXMI (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
yesnoFalse turns UID generation off, true turns it on.

◆ createAttribute()

UMLAttribute * Object_Factory::createAttribute ( UMLObject * parent,
const QString & name,
UMLObject * type )
Here is the call graph for this function:

◆ 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
parentThe parent classifier
typeThe type to create
nameOptional name of object (skips creation dialog)
Returns
Pointer to the UMLClassifierListItem created
Here is the call graph for this function:

◆ 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
typeThe type of UMLObject to create.
nameName to give to the object (mandatory.)
parentPkgThe object's parent package.
undoableWhether to insert the object creation into the undo stack (default: true.)
Here is the call graph for this function:

◆ createOperation()

UMLOperation * Object_Factory::createOperation ( UMLClassifier * parent,
const QString & name )
Here is the call graph for this function:

◆ createUMLObject()

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

Creates a UMLObject of the given type.

Parameters
typeThe type of UMLObject to create.
nA name to give to the object (optional.) If not given then an input dialog prompts the user to supply a name.
parentPkgThe object's parent package.
solicitNewNameAsk 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.
Here is the call graph for this function:

◆ 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.

Here is the call graph for this function:

Variable Documentation

◆ g_predefinedId

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