umbrello: umbrello/codegenerators/sql/sqlwriter.h Source File

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

sqlwriter.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) 2003 Nikolaus Gradwohl <guru@local-guru.net> *
8 * copyright (C) 2004-2020 *
9 * Umbrello UML Modeller Authors <umbrello-devel@kde.org> *
10 ***************************************************************************/
11
12 #ifndef SQLWRITER_H
13 #define SQLWRITER_H
14
15 #include "simplecodegenerator.h"
16 #include "umlattributelist.h"
17
18 //forward declarations
19 class UMLEntity;
20 class UMLEntityAttributeList;
21 class UMLClassifierListItemList;
22
29 class SQLWriter : public SimpleCodeGenerator
30 {
31 Q_OBJECT
32 public:
33
34 SQLWriter();
35 virtual ~SQLWriter();
36
37 virtual void writeClass(UMLClassifier *c);
38
39 virtual Uml::ProgrammingLanguage::Enum language() const;
40
41 virtual QStringList defaultDatatypes();
42
43 virtual QStringList reservedKeywords() const;
44
45 protected:
46 QStringList m_enumsGenerated;
47 UMLEntity* m_pEntity;
48
49 virtual void printEntityAttributes(QTextStream& sql, UMLEntityAttributeList entityAttributeList);
50 virtual void printUniqueConstraints(QTextStream& sql, UMLClassifierListItemList constrList);
51 virtual void printForeignKeyConstraints(QTextStream& sql, UMLClassifierListItemList constrList);
52 virtual void printCheckConstraints(QTextStream& sql, UMLClassifierListItemList constrList);
53 virtual void printIndex(QTextStream& sql, UMLEntity* ent, UMLEntityAttributeList entAttList);
54 virtual void printAutoIncrements(QTextStream& sql, UMLEntityAttributeList entAttList);
55 };
56
57 #endif // SQLWRITER_H
SQLWriter
Definition: sqlwriter.h:30
SQLWriter::SQLWriter
SQLWriter()
Definition: sqlwriter.cpp:177
SQLWriter::printUniqueConstraints
virtual void printUniqueConstraints(QTextStream &sql, UMLClassifierListItemList constrList)
Definition: sqlwriter.cpp:460
SQLWriter::printCheckConstraints
virtual void printCheckConstraints(QTextStream &sql, UMLClassifierListItemList constrList)
Definition: sqlwriter.cpp:634
SQLWriter::reservedKeywords
virtual QStringList reservedKeywords() const
Definition: sqlwriter.cpp:366
SQLWriter::printAutoIncrements
virtual void printAutoIncrements(QTextStream &sql, UMLEntityAttributeList entAttList)
Definition: sqlwriter.cpp:623
SQLWriter::defaultDatatypes
virtual QStringList defaultDatatypes()
Definition: sqlwriter.cpp:333
SQLWriter::printIndex
virtual void printIndex(QTextStream &sql, UMLEntity *ent, UMLEntityAttributeList entAttList)
Definition: sqlwriter.cpp:586
SQLWriter::~SQLWriter
virtual ~SQLWriter()
Definition: sqlwriter.cpp:182
SQLWriter::printForeignKeyConstraints
virtual void printForeignKeyConstraints(QTextStream &sql, UMLClassifierListItemList constrList)
Definition: sqlwriter.cpp:507
SQLWriter::m_enumsGenerated
QStringList m_enumsGenerated
Definition: sqlwriter.h:46
SQLWriter::writeClass
virtual void writeClass(UMLClassifier *c)
Definition: sqlwriter.cpp:190
SQLWriter::m_pEntity
UMLEntity * m_pEntity
Definition: sqlwriter.h:47
SQLWriter::language
virtual Uml::ProgrammingLanguage::Enum language() const
Definition: sqlwriter.cpp:325
SQLWriter::printEntityAttributes
virtual void printEntityAttributes(QTextStream &sql, UMLEntityAttributeList entityAttributeList)
Definition: sqlwriter.cpp:384
SimpleCodeGenerator
Definition: simplecodegenerator.h:34
UMLClassifierListItemList
Definition: umlclassifierlistitemlist.h:27
UMLClassifier
Information for a non-graphical Concept/Class.
Definition: classifier.h:40
UMLEntityAttributeList
Definition: umlentityattributelist.h:26
UMLEntity
Non-graphical Information for an Entity.
Definition: entity.h:35
Uml::ProgrammingLanguage::Enum
Enum
Definition: basictypes.h:305
simplecodegenerator.h
umlattributelist.h