umbrello: umbrello/codeimport/import_utils.h Source File

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

import_utils.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) 2005-2021 *
8 * Umbrello UML Modeller Authors <umbrello-devel@kde.org> *
9 ***************************************************************************/
10
11 #ifndef IMPORT_UTILS_H
12 #define IMPORT_UTILS_H
13
14 #include "basictypes.h"
15 #include "folder.h"
16 #include "umlattributelist.h"
17
18 #include <QStringList>
19
20 class UMLObject;
21 class UMLClassifier;
22 class UMLPackage;
23 class UMLOperation;
24 class UMLEnum;
25 class UMLScene;
26
27 class QMimeData;
28
34 namespace Import_Utils {
35
36 UMLFolder *createSubDir(const QString& name,
37 UMLFolder *parentPkg,
38 const QString &comment = QString());
39
40 UMLObject *createArtifactFolder(const QString& name,
41 UMLPackage *parentPkg,
42 const QString &comment);
43
44 UMLObject *createArtifact(const QString& name,
45 UMLFolder *parentPkg = NULL,
46 const QString &comment = QString());
47
48 UMLObject* createUMLObject(UMLObject::ObjectType type,
49 const QString& name,
50 UMLPackage *parentPkg = 0,
51 const QString& comment = QString(),
52 const QString& stereotype = QString(),
53 bool searchInParentPackageOnly = false,
54 bool remapParent = true);
55
56 UMLObject* createUMLObjectHierarchy(UMLObject::ObjectType type, const QString &name, UMLPackage *parentPkg);
57
58 void putAtGlobalScope(bool yesno);
59
60 void setRelatedClassifier(UMLClassifier *c);
61
62 void assignUniqueIdOnCreation(bool yesno);
63
64 UMLAttribute* insertAttribute(UMLClassifier *klass, Uml::Visibility::Enum scope,
65 const QString& name,
66 const QString& type,
67 const QString& comment = QString(),
68 bool isStatic = false);
69 UMLAttribute *insertAttribute(UMLClassifier *klass, Uml::Visibility::Enum scope,
70 const QString& name,
71 UMLClassifier *attrType,
72 const QString& comment = QString(),
73 bool isStatic = false);
74
75 UMLOperation* makeOperation(UMLClassifier *parent, const QString &name);
76
77 void insertMethod(UMLClassifier *klass, UMLOperation* &op,
78 Uml::Visibility::Enum scope, const QString& type,
79 bool isStatic, bool isAbstract,
80 bool isFriend = false, bool isConstructor = false, bool isDestructor = false,
81 const QString& comment = QString());
82
83 UMLAttribute* addMethodParameter(UMLOperation *method,
84 const QString& type,
85 const QString& name);
86
87 void addEnumLiteral(UMLEnum *enumType, const QString &literal,
88 const QString &comment = QString(),
89 const QString &value = QString());
90
91 UMLAssociation *createGeneralization(UMLClassifier *child, UMLClassifier *parent);
92 void createGeneralization(UMLClassifier *child, const QString &parentName);
93
94 UMLEnum *remapUMLEnum(UMLObject *ns, UMLPackage *currentScope);
95
96 QString formatComment(const QString &comment);
97
98 QStringList includePathList();
99
100 void addIncludePath(const QString& path);
101
102 bool newUMLObjectWasCreated();
103
104 bool isDatatype(const QString& name, UMLPackage *parentPkg = 0);
105
106 UMLPackage *globalScope();
107
108 } // end namespace Import_Utils
109
110 #endif
basictypes.h
UMLAssociation
Sets up association information.
Definition: association.h:34
UMLAttribute
Sets up attribute information.
Definition: attribute.h:28
UMLClassifier
Information for a non-graphical Concept/Class.
Definition: classifier.h:40
UMLEnum
Non-graphical Information for an Enum.
Definition: enum.h:29
UMLFolder
Non-graphical management of objects and diagrams of a Folder.
Definition: folder.h:35
UMLObject
The base class for UML objects.
Definition: umlobject.h:75
UMLObject::ObjectType
ObjectType
Definition: umlobject.h:81
UMLOperation
Definition: operation.h:25
UMLPackage
Non-graphical information for a Package.
Definition: package.h:33
UMLScene
Definition: umlscene.h:70
folder.h
Import_Utils
Definition: import_utils.cpp:45
Import_Utils::globalScope
UMLPackage * globalScope()
Definition: import_utils.cpp:816
Import_Utils::formatComment
QString formatComment(const QString &comment)
Definition: import_utils.cpp:121
Import_Utils::putAtGlobalScope
void putAtGlobalScope(bool yesno)
Definition: import_utils.cpp:83
Import_Utils::remapUMLEnum
UMLEnum * remapUMLEnum(UMLObject *ns, UMLPackage *currentScope)
Definition: import_utils.cpp:746
Import_Utils::createArtifact
UMLObject * createArtifact(const QString &name, UMLFolder *parentPkg, const QString &comment)
Definition: import_utils.cpp:679
Import_Utils::createGeneralization
UMLAssociation * createGeneralization(UMLClassifier *child, UMLClassifier *parent)
Definition: import_utils.cpp:603
Import_Utils::isDatatype
bool isDatatype(const QString &name, UMLPackage *parentPkg)
Definition: import_utils.cpp:806
Import_Utils::assignUniqueIdOnCreation
void assignUniqueIdOnCreation(bool yesno)
Definition: import_utils.cpp:104
Import_Utils::addMethodParameter
UMLAttribute * addMethodParameter(UMLOperation *method, const QString &type, const QString &name)
Definition: import_utils.cpp:572
Import_Utils::insertMethod
void insertMethod(UMLClassifier *klass, UMLOperation *&op, Uml::Visibility::Enum scope, const QString &type, bool isStatic, bool isAbstract, bool isFriend, bool isConstructor, bool isDestructor, const QString &comment)
Definition: import_utils.cpp:498
Import_Utils::createSubDir
UMLFolder * createSubDir(const QString &name, UMLFolder *parentPkg, const QString &comment)
Definition: import_utils.cpp:634
Import_Utils::addIncludePath
void addIncludePath(const QString &path)
Definition: import_utils.cpp:797
Import_Utils::makeOperation
UMLOperation * makeOperation(UMLClassifier *parent, const QString &name)
Definition: import_utils.cpp:416
Import_Utils::newUMLObjectWasCreated
bool newUMLObjectWasCreated()
Definition: import_utils.cpp:113
Import_Utils::insertAttribute
UMLAttribute * insertAttribute(UMLClassifier *owner, Uml::Visibility::Enum scope, const QString &name, UMLClassifier *attrType, const QString &comment, bool isStatic)
Definition: import_utils.cpp:426
Import_Utils::createUMLObject
UMLObject * createUMLObject(UMLObject::ObjectType type, const QString &inName, UMLPackage *parentPkg, const QString &comment, const QString &stereotype, bool searchInParentPackageOnly, bool remapParent)
Definition: import_utils.cpp:178
Import_Utils::createArtifactFolder
UMLObject * createArtifactFolder(const QString &name, UMLPackage *parentPkg, const QString &comment)
Definition: import_utils.cpp:657
Import_Utils::addEnumLiteral
void addEnumLiteral(UMLEnum *enumType, const QString &literal, const QString &comment, const QString &value)
Definition: import_utils.cpp:593
Import_Utils::includePathList
QStringList includePathList()
Definition: import_utils.cpp:784
Import_Utils::setRelatedClassifier
void setRelatedClassifier(UMLClassifier *c)
Definition: import_utils.cpp:92
Import_Utils::createUMLObjectHierarchy
UMLObject * createUMLObjectHierarchy(UMLObject::ObjectType type, const QString &name, UMLPackage *topLevelParent)
Definition: import_utils.cpp:376
Uml::Visibility::Enum
Enum
Definition: basictypes.h:59
umlattributelist.h