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

object_factory.h
Go to the documentation of this file.
1 /***************************************************************************
2 * This program is free software; you can redistribute it and/or modify *
3 * it under the terms of the GNU General Public License as published by *
4 * the Free Software Foundation; either version 2 of the License, or *
5 * (at your option) any later version. *
6 * *
7 * copyright (C) 2006-2020 *
8 * Umbrello UML Modeller Authors <umbrello-devel@kde.org> *
9 ***************************************************************************/
10
11 #ifndef OBJECT_FACTORY__H
12 #define OBJECT_FACTORY__H
13
14 #include "umlobject.h"
15
16 #include <QString>
17
18 class UMLPackage;
19 class UMLClassifier;
20 class UMLClassifierListItem;
21 class UMLAttribute;
22 class UMLOperation;
23
24 namespace Object_Factory {
25
26 UMLObject* createUMLObject(UMLObject::ObjectType type,
27 const QString &n = QString(),
28 UMLPackage *parentPkg = 0,
29 bool solicitNewName = true);
30
31 UMLObject* createNewUMLObject(UMLObject::ObjectType type,
32 const QString &n,
33 UMLPackage *parentPkg,
34 bool undoable = true);
35
36 UMLClassifierListItem* createChildObject(UMLClassifier *parent,
37 UMLObject::ObjectType type,
38 const QString& name = QString());
39
40 UMLAttribute *createAttribute(UMLObject *parent, const QString& name,
41 UMLObject *type = 0);
42
43 UMLOperation *createOperation(UMLClassifier *parent, const QString& name);
44
45 void assignUniqueIdOnCreation(bool yesno);
46 bool assignUniqueIdOnCreation();
47
48 UMLObject* makeObjectFromXMI(const QString& xmiTag,
49 const QString& stereoID = QString());
50
51 }
52
53 #endif
UMLEntity
Non-graphical Information for an Entity.
Definition: entity.h:35
category.h
datatype.h
UMLObject::asUMLClassifier
UMLClassifier * asUMLClassifier()
Definition: umlobject.cpp:1309
Uml::ModelType::Enum
Enum
Definition: basictypes.h:41
instance.h
umlpackagelist.h
UMLObject::ObjectType
ObjectType
Definition: umlobject.h:80
port.h
checkconstraint.h
UMLDoc::datatypeFolder
UMLFolder * datatypeFolder() const
Definition: umldoc.cpp:2988
UMLClassifier::isInterface
bool isInterface() const
Definition: classifier.cpp:118
UMLInstance
Non-graphical Information for an Instance.
Definition: instance.h:27
UMLObject::ot_CheckConstraint
@ ot_CheckConstraint
Definition: umlobject.h:107
UMLArtifact
Non-graphical information for a Artifact.
Definition: artifact.h:28
UMLObject::ot_Port
@ ot_Port
Definition: umlobject.h:109
UMLObject::name
QString name() const
Definition: umlobject.cpp:211
UMLObject::asUMLClassifierListItem
UMLClassifierListItem * asUMLClassifierListItem()
Definition: umlobject.cpp:1310
stereotype.h
Uml::ID::Reserved
const Type Reserved
special value for illegal ID
Definition: basictypes.h:354
UMLObject::ot_Artifact
@ ot_Artifact
Definition: umlobject.h:97
entity.h
component.h
UMLEntity::createAttribute
virtual UMLAttribute * createAttribute(const QString &name=QString(), UMLObject *type=0, Uml::Visibility::Enum vis=Uml::Visibility::Private, const QString &init=QString())
Definition: entity.cpp:100
Model_Utils::convert_OT_MT
Uml::ModelType::Enum convert_OT_MT(UMLObject::ObjectType ot)
Definition: model_utils.cpp:2106
UMLObject::ot_ForeignKeyConstraint
@ ot_ForeignKeyConstraint
Definition: umlobject.h:106
UMLDatatype
Non-graphical information for a Datatype.
Definition: datatype.h:26
Object_Factory::createUMLObject
UMLObject * createUMLObject(UMLObject::ObjectType type, const QString &n, UMLPackage *parentPkg, bool solicitNewName)
Definition: object_factory.cpp:203
UMLUseCase
Information for a non-graphical UML UseCase.
Definition: usecase.h:25
UMLObject::ot_Class
@ ot_Class
Definition: umlobject.h:89
operation.h
UMLObject::ot_Entity
@ ot_Entity
Definition: umlobject.h:101
foreignkeyconstraint.h
UMLClassifier::createOperation
UMLOperation * createOperation(const QString &name=QString(), bool *isExistingOp=0, Model_Utils::NameAndType_List *params=0)
Definition: classifier.cpp:236
CodeGenerator::isReservedKeyword
virtual bool isReservedKeyword(const QString &keyword)
Definition: codegenerator.cpp:797
UMLObject::asUMLInstance
UMLInstance * asUMLInstance()
Definition: umlobject.cpp:1320
Uml::ID::None
const Type None
special value for uninitialized ID
Definition: basictypes.h:353
UMLObject::setID
virtual void setID(Uml::ID::Type NewID)
Definition: umlobject.cpp:183
UMLObject::ot_Attribute
@ ot_Attribute
Definition: umlobject.h:92
UMLDoc::rootFolder
UMLFolder * rootFolder(Uml::ModelType::Enum mt)
Definition: umldoc.cpp:3205
artifact.h
object_factory.h
UMLObject::ot_Interface
@ ot_Interface
Definition: umlobject.h:86
association.h
Dialog_Utils::askNewName
bool askNewName(WidgetBase::WidgetType type, QString &name)
Definition: dialog_utils.cpp:151
cmds.h
Uml::AssociationType::Category2Parent
@ Category2Parent
Definition: basictypes.h:124
UMLObject::ot_Actor
@ ot_Actor
Definition: umlobject.h:83
UMLObject::ot_Package
@ ot_Package
Definition: umlobject.h:85
Uml::ID::Type
std::string Type
Definition: basictypes.h:351
Object_Factory::createChildObject
UMLClassifierListItem * createChildObject(UMLClassifier *parent, UMLObject::ObjectType type, const QString &name)
Definition: object_factory.cpp:300
UMLAttribute::setName
void setName(const QString &name)
Definition: attribute.cpp:76
UMLObject::ot_UMLObject
@ ot_UMLObject
Definition: umlobject.h:82
model_utils.h
UMLPort
Non-graphical information for a Port.
Definition: port.h:27
UMLObject
The base class for UML objects.
Definition: umlobject.h:74
UMLObject::ot_InstanceAttribute
@ ot_InstanceAttribute
Definition: umlobject.h:110
UMLObject::asUMLEnum
UMLEnum * asUMLEnum()
Definition: umlobject.cpp:1316
UMLEnum::createEnumLiteral
UMLObject * createEnumLiteral(const QString &name=QString())
Definition: enum.cpp:85
UMLDoc::isUnique
bool isUnique(const QString &name)
Definition: umldoc.cpp:1234
UMLObject::baseType
ObjectType baseType() const
Definition: umlobject.cpp:397
Uml::ModelType::toString
QString toString(Enum item)
Definition: basictypes.cpp:47
UMLObject::ot_EnumLiteral
@ ot_EnumLiteral
Definition: umlobject.h:94
UMLDoc::signalUMLObjectCreated
void signalUMLObjectCreated(UMLObject *o)
Definition: umldoc.cpp:1985
UMLObject::asUMLEntity
UMLEntity * asUMLEntity()
Definition: umlobject.cpp:1313
Uml::AssociationType::Child2Category
@ Child2Category
Definition: basictypes.h:125
UMLStereotype
Sets up stereotype information.
Definition: stereotype.h:41
Uml::AssociationType::Aggregation
@ Aggregation
Definition: basictypes.h:108
Uml::ID::fromString
ID::Type fromString(const QString &id)
Definition: basictypes.cpp:1268
node.h
UMLActor
Information for a non-graphical UML Actor.
Definition: actor.h:28
uniqueid.h
attribute.h
Model_Utils::uniqObjectName
QString uniqObjectName(UMLObject::ObjectType type, UMLPackage *parentPkg, QString prefix)
Definition: model_utils.cpp:526
Object_Factory::createAttribute
UMLAttribute * createAttribute(UMLObject *parent, const QString &name, UMLObject *type)
Definition: object_factory.cpp:275
UMLComponent
Non-graphical information for a Component.
Definition: component.h:28
uWarning
#define uWarning()
Definition: debug_utils.h:124
UMLApp::generator
CodeGenerator * generator() const
Definition: uml.cpp:2351
UMLEntity::createForeignKeyConstraint
UMLForeignKeyConstraint * createForeignKeyConstraint(const QString &name=QString())
Definition: entity.cpp:205
UMLClassifier::setBaseType
void setBaseType(UMLObject::ObjectType ot)
Definition: classifier.cpp:83
folder.h
UMLObject::ot_Node
@ ot_Node
Definition: umlobject.h:98
i18n
#define i18n
Definition: main.cpp:39
UMLClassifierListItem::setType
virtual void setType(UMLObject *type)
Definition: classifierlistitem.cpp:127
UMLObject::ot_SubSystem
@ ot_SubSystem
no real object type
Definition: umlobject.h:111
UMLObject::ot_Datatype
@ ot_Datatype
Definition: umlobject.h:87
UMLObject::ot_EntityAttribute
@ ot_EntityAttribute
Definition: umlobject.h:102
UMLApp::beginMacro
void beginMacro(const QString &text)
Definition: uml.cpp:3460
uDebug
#define uDebug()
Definition: debug_utils.h:122
Object_Factory::assignUniqueIdOnCreation
void assignUniqueIdOnCreation(bool yesno)
Definition: object_factory.cpp:69
UMLEntity::createUniqueConstraint
UMLUniqueConstraint * createUniqueConstraint(const QString &name=QString())
Definition: entity.cpp:151
UMLObject::toString
static QString toString(ObjectType ot)
Definition: umlobject.cpp:1125
UMLObject::ot_UniqueConstraint
@ ot_UniqueConstraint
Definition: umlobject.h:105
UMLApp::endMacro
void endMacro()
Definition: uml.cpp:3479
Uml::AssociationType::Generalization
@ Generalization
Definition: basictypes.h:107
UMLObject::ot_Instance
@ ot_Instance
Definition: umlobject.h:90
UMLApp::app
static UMLApp * app()
Definition: uml.cpp:278
UMLObject::ot_Component
@ ot_Component
Definition: umlobject.h:96
UMLDoc
Definition: umldoc.h:75
UMLAttribute
Sets up attribute information.
Definition: attribute.h:28
Object_Factory
Definition: object_factory.cpp:58
UMLFolder
Non-graphical management of objects and diagrams of a Folder.
Definition: folder.h:35
UniqueID::gen
Uml::ID::Type gen()
Definition: uniqueid.cpp:26
UMLDoc::tagEq
static bool tagEq(const QString &tag, const QString &pattern)
Definition: umldoc.cpp:3582
UMLClassifier::createTemplate
UMLObject * createTemplate(const QString &name=QString())
Definition: classifier.cpp:393
UMLDoc::findUMLObject
UMLObject * findUMLObject(const QString &name, UMLObject::ObjectType type=UMLObject::ot_UMLObject, UMLObject *currentObj=0)
Definition: umldoc.cpp:1067
classifier.h
uError
#define uError()
Definition: debug_utils.h:123
UMLOperation
Definition: operation.h:25
uniqueconstraint.h
UMLObject::ot_Enum
@ ot_Enum
Definition: umlobject.h:88
uml.h
Object_Factory::createNewUMLObject
UMLObject * createNewUMLObject(UMLObject::ObjectType type, const QString &name, UMLPackage *parentPkg, bool undoable)
Definition: object_factory.cpp:95
Object_Factory::makeObjectFromXMI
UMLObject * makeObjectFromXMI(const QString &xmiTag, const QString &stereoID)
Definition: object_factory.cpp:374
UMLObject::ot_UseCase
@ ot_UseCase
Definition: umlobject.h:84
UMLClassifier
Information for a non-graphical Concept/Class.
Definition: classifier.h:40
debug_utils.h
UMLAssociation
Sets up association information.
Definition: association.h:33
UMLDoc::findStereotypeById
UMLStereotype * findStereotypeById(Uml::ID::Type id)
Definition: umldoc.cpp:1341
Object_Factory::createOperation
UMLOperation * createOperation(UMLClassifier *parent, const QString &name)
Definition: object_factory.cpp:285
usecase.h
Object_Factory::g_predefinedId
Uml::ID::Type g_predefinedId
Definition: object_factory.cpp:60
actor.h
umlobject.h
UMLObject::ot_Template
@ ot_Template
Definition: umlobject.h:95
codegenerator.h
UMLEntity::createCheckConstraint
UMLCheckConstraint * createCheckConstraint(const QString &name=QString())
Definition: entity.cpp:254
UMLCategory
Information for a non-graphical UML Category.
Definition: category.h:28
UMLObject::ot_Operation
@ ot_Operation
Definition: umlobject.h:93
CodeGenerator
Definition: codegenerator.h:57
dialog_utils.h
package.h
Uml::AssociationType::Dependency
@ Dependency
Definition: basictypes.h:109
UMLInstance::createAttribute
virtual UMLAttribute * createAttribute(const QString &name=QString(), UMLObject *type=0, Uml::Visibility::Enum vis=Uml::Visibility::Private, const QString &init=QString())
Definition: instance.cpp:102
UMLApp::executeCommand
void executeCommand(QUndoCommand *cmd)
Definition: uml.cpp:3438
UMLObject::ot_Folder
@ ot_Folder
Definition: umlobject.h:103
Uml::CmdCreateUMLObject
Definition: cmdcreateumlobject.h:23
UMLClassifier::createAttribute
virtual UMLAttribute * createAttribute(const QString &name=QString(), UMLObject *type=0, Uml::Visibility::Enum vis=Uml::Visibility::Private, const QString &init=QString())
Definition: classifier.cpp:756
UMLClassifierListItem
A base class for classifier list items (e.g. attributes)
Definition: classifierlistitem.h:30
UMLEnum
Non-graphical Information for an Enum.
Definition: enum.h:29
UMLApp::document
UMLDoc * document() const
Definition: uml.cpp:1064
Uml::AssociationType::Realization
@ Realization
Definition: basictypes.h:118
umldoc.h
UMLNode
Non-graphical information for a Node.
Definition: node.h:27
UMLObject::ot_Category
@ ot_Category
Definition: umlobject.h:108
UMLPackage
Non-graphical information for a Package.
Definition: package.h:33
enum.h