umbrello  2.32.2
Umbrello UML Modeller is a Unified Modelling Language (UML) diagram program based on KDE Technology
idlimport.h
Go to the documentation of this file.
1 /*
2  SPDX-License-Identifier: GPL-2.0-or-later
3  SPDX-FileCopyrightText: 2005-2021 Umbrello UML Modeller Authors <umbrello-devel@kde.org>
4 */
5 
6 #ifndef IDLIMPORT_H
7 #define IDLIMPORT_H
8 
9 #include "nativeimportbase.h"
10 
11 class UMLDoc;
12 
18 class IDLImport : public NativeImportBase {
19 public:
20  explicit IDLImport(CodeImpThread* thread = 0);
21  virtual ~IDLImport();
22 
23  bool parseStmt();
24 
25  bool parseFile(const QString& file);
26 
27  bool preprocess(QString& line);
28 
29  void fillSource(const QString& word);
30 
31  bool skipStructure();
32 
33  bool isValidScopedName(QString text);
34 
35 protected:
36  QString joinTypename();
39  QStringList m_unionCases;
40  static QString m_preProcessor;
41  static QStringList m_preProcessorArguments;
42  static bool m_preProcessorChecked;
43 };
44 
45 #endif
46 
NativeImportBase::scopeIndex
int scopeIndex()
Definition: nativeimportbase.cpp:171
UMLObject::asUMLClassifier
UMLClassifier * asUMLClassifier()
Definition: umlobject.cpp:1389
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:421
umlpackagelist.h
IDLImport::fillSource
void fillSource(const QString &word)
Definition: idlimport.cpp:127
UMLDoc::findStereotype
UMLStereotype * findStereotype(const QString &name) const
Definition: umldoc.cpp:1313
UMLObject::ObjectType
ObjectType
Definition: umlobject.h:75
Uml::PrimitiveTypes::String
@ String
Definition: basictypes.h:270
IDLImport::m_isReadonly
bool m_isReadonly
Definition: idlimport.h:38
IDLImport::m_unionCases
QStringList m_unionCases
Definition: idlimport.h:39
IDLImport::skipStructure
bool skipStructure()
Definition: idlimport.cpp:230
ClassImport::log
void log(const QString &file, const QString &text)
Definition: classimport.cpp:128
idlimport.h
NativeImportBase::m_currentAccess
Uml::Visibility::Enum m_currentAccess
current access (public/protected/private)
Definition: nativeimportbase.h:94
stereotype.h
UMLAttribute::setParmKind
void setParmKind(Uml::ParameterDirection::Enum pk)
Definition: attribute.cpp:112
NativeImportBase::preprocess
virtual bool preprocess(QString &line)
Definition: nativeimportbase.cpp:221
UMLObject::ot_Class
@ ot_Class
Definition: umlobject.h:85
IDLImport::m_isAttribute
bool m_isAttribute
Definition: idlimport.h:38
operation.h
Import_Utils::createGeneralization
UMLAssociation * createGeneralization(UMLClassifier *child, UMLClassifier *parent)
Definition: import_utils.cpp:598
UMLStereotype::getAttributeDefs
const AttributeDefs & getAttributeDefs() const
Definition: stereotype.cpp:109
IDLImport::m_doc
UMLDoc * m_doc
Definition: idlimport.h:37
object_factory.h
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:173
IDLImport::parseFile
bool parseFile(const QString &file)
Definition: idlimport.cpp:155
Uml::ParameterDirection::Enum
Enum
Definition: basictypes.h:254
IDLImport::m_isOneway
bool m_isOneway
Definition: idlimport.h:38
IDLImport::m_preProcessorChecked
static bool m_preProcessorChecked
Definition: idlimport.h:42
NativeImportBase::m_klass
UMLClassifier * m_klass
class currently being processed
Definition: nativeimportbase.h:93
UMLObject::ot_Package
@ ot_Package
Definition: umlobject.h:81
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:493
UMLObject::ot_UMLObject
@ ot_UMLObject
Definition: umlobject.h:78
UMLObject
The base class for UML objects.
Definition: umlobject.h:69
NativeImportBase::setMultiLineComment
void setMultiLineComment(const QString &intro, const QString &end)
Definition: nativeimportbase.cpp:54
import_utils.h
UMLObject::asUMLEnum
UMLEnum * asUMLEnum()
Definition: umlobject.cpp:1396
NativeImportBase::m_scope
QList< UMLPackage * > m_scope
stack of scopes for use by the specific importer
Definition: nativeimportbase.h:92
UMLObject::baseType
ObjectType baseType() const
Definition: umlobject.cpp:392
ClassImport::m_enabled
bool m_enabled
state of importer
Definition: classimport.h:63
NativeImportBase::currentScope
UMLPackage * currentScope()
Definition: nativeimportbase.cpp:160
NativeImportBase::skipStmt
void skipStmt(const QString &until=QLatin1String(";"))
Definition: nativeimportbase.cpp:77
UMLStereotype
Sets up stereotype information.
Definition: stereotype.h:35
Uml::Visibility::Public
@ Public
Definition: basictypes.h:46
Import_Utils::remapUMLEnum
UMLEnum * remapUMLEnum(UMLObject *ns, UMLPackage *currentScope)
Definition: import_utils.cpp:741
NativeImportBase::skipToClosing
bool skipToClosing(QChar opener)
Definition: nativeimportbase.cpp:92
UMLObject::tags
QStringList & tags()
Definition: umlobject.cpp:564
Uml::PrimitiveTypes::UnlimitedNatural
@ UnlimitedNatural
Definition: basictypes.h:272
NativeImportBase::m_isAbstract
bool m_isAbstract
accumulator for abstractness
Definition: nativeimportbase.h:102
attribute.h
Object_Factory::createAttribute
UMLAttribute * createAttribute(UMLObject *parent, const QString &name, UMLObject *type)
Definition: object_factory.cpp:275
NativeImportBase::popScope
UMLPackage * popScope()
Definition: nativeimportbase.cpp:148
number
it is up to the author donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License If the distribution and or use of the Library is restricted in certain countries either by patents or by copyrighted the original copyright holder who places the Library under this License may add an geographical distribution limitation excluding those so that distribution is permitted only in or among countries not thus excluded In such this License incorporates the limitation as if written in the body of this License The Free Software Foundation may publish revised and or new versions of the Library General Public License from time to time Such new versions will be similar in spirit to the present but may differ in detail to address new problems or concerns Each version is given a distinguishing version number If the Library specifies a version number of this License which applies to it and any later you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation If the Library does not specify a license version number
Definition: LGPL-2.0-only.txt:368
NativeImportBase::m_source
QStringList m_source
the scanned lexemes
Definition: nativeimportbase.h:90
IDLImport::~IDLImport
virtual ~IDLImport()
Definition: idlimport.cpp:96
IDLImport::IDLImport
IDLImport(CodeImpThread *thread=0)
Definition: idlimport.cpp:43
NativeImportBase::scan
void scan(const QString &line)
Definition: nativeimportbase.cpp:369
IDLImport
Definition: idlimport.h:18
UMLObject::ot_Datatype
@ ot_Datatype
Definition: umlobject.h:83
executable
if the work is an executable linked with the with the complete machine readable work that uses the as object code and or source so that the user can modify the Library and then relink to produce a modified executable containing the modified valid for at least three to give the same user the materials specified in for a charge no more than the cost of performing this distribution c If distribution of the work is made by offering access to copy from a designated offer equivalent access to copy the above specified materials from the same place d Verify that the user has already received a copy of these materials or that you have already sent this user a copy For an executable
Definition: LGPL-2.0-only.txt:274
Import_Utils::addMethodParameter
UMLAttribute * addMethodParameter(UMLOperation *method, const QString &type, const QString &name)
Definition: import_utils.cpp:567
uDebug
#define uDebug()
Definition: debug_utils.h:108
UMLDoc::createStereotype
UMLStereotype * createStereotype(const QString &name)
Definition: umldoc.cpp:1300
Import_Utils::addIncludePath
void addIncludePath(const QString &path)
Definition: import_utils.cpp:792
NativeImportBase::advance
virtual QString advance()
Definition: nativeimportbase.cpp:193
UMLObject::setStereotype
void setStereotype(const QString &_name)
Definition: umlobject.cpp:523
UMLObject::toString
static QString toString(ObjectType ot)
Definition: umlobject.cpp:1180
NativeImportBase::m_comment
QString m_comment
intermediate accumulator for comment text
Definition: nativeimportbase.h:95
CodeImpThread
Definition: codeimpthread.h:21
c
type show c for details The hypothetical commands show w and show c should show the appropriate parts of the General Public License Of the commands you use may be called something other than show w and show c
Definition: GPL-2.0-only.txt:301
UMLObject::setAbstract
void setAbstract(bool bAbstract)
Definition: umlobject.cpp:351
IDLImport::m_preProcessorArguments
static QStringList m_preProcessorArguments
Definition: idlimport.h:41
UMLApp::app
static UMLApp * app()
Definition: uml.cpp:275
Import_Utils::makeOperation
UMLOperation * makeOperation(UMLClassifier *parent, const QString &name)
Definition: import_utils.cpp:411
UMLDoc
Definition: umldoc.h:69
UMLAttribute
Sets up attribute information.
Definition: attribute.h:22
UMLStereotype::AttributeDef
Definition: stereotype.h:57
NativeImportBase
Base class for native implementations of language import.
Definition: nativeimportbase.h:39
nativeimportbase.h
IDLImport::m_preProcessor
static QString m_preProcessor
Definition: idlimport.h:40
Import_Utils::addEnumLiteral
void addEnumLiteral(UMLEnum *enumType, const QString &literal, const QString &comment, const QString &value)
Definition: import_utils.cpp:588
UMLDoc::findUMLObject
UMLObject * findUMLObject(const QString &name, UMLObject::ObjectType type=UMLObject::ot_UMLObject, UMLObject *currentObj=0)
Definition: umldoc.cpp:1068
classifier.h
UMLOperation
Definition: operation.h:19
UMLObject::ot_Enum
@ ot_Enum
Definition: umlobject.h:84
IDLImport::preprocess
bool preprocess(QString &line)
Definition: idlimport.cpp:116
IDLImport::isValidScopedName
bool isValidScopedName(QString text)
Definition: idlimport.cpp:240
uml.h
IDLImport::m_isUnionDefault
bool m_isUnionDefault
Definition: idlimport.h:38
Model_Utils::stringToDirection
int stringToDirection(QString input, Uml::ParameterDirection::Enum &result)
Definition: model_utils.cpp:908
UMLClassifier
Information for a non-graphical Concept/Class.
Definition: classifier.h:34
debug_utils.h
NativeImportBase::pushScope
void pushScope(UMLPackage *p)
Definition: nativeimportbase.cpp:138
UMLObject::setUMLStereotype
void setUMLStereotype(UMLStereotype *stereo)
Definition: umlobject.cpp:496
NativeImportBase::m_singleLineCommentIntro
QString m_singleLineCommentIntro
start token of a single line comment
Definition: nativeimportbase.h:89
UMLObject::asUMLPackage
UMLPackage * asUMLPackage()
Definition: umlobject.cpp:1405
IDLImport::parseStmt
bool parseStmt()
Definition: idlimport.cpp:256
Uml::Visibility::Private
@ Private
Definition: basictypes.h:47
NativeImportBase::m_srcIndex
int m_srcIndex
used for indexing m_source
Definition: nativeimportbase.h:91
package.h
Import_Utils::includePathList
QStringList includePathList()
Definition: import_utils.cpp:779
IDLImport::joinTypename
QString joinTypename()
Check for split type names (e.g. unsigned long long)
Definition: idlimport.cpp:101
codeimpthread.h
UMLEnum
Non-graphical Information for an Enum.
Definition: enum.h:23
UMLApp::document
UMLDoc * document() const
Definition: uml.cpp:1063
umldoc.h
enum.h