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

umbrello 2.32.2 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 SPDX-License-Identifier: GPL-2.0-or-later
3
4 SPDX-FileCopyrightText: 2003 Nikolaus Gradwohl <guru@local-guru.net>
5 SPDX-FileCopyrightText: 2004-2020 Umbrello UML Modeller Authors <umbrello-devel@kde.org>
6*/
7
8#ifndef SQLWRITER_H
9#define SQLWRITER_H
10
11#include "simplecodegenerator.h"
12#include "umlattributelist.h"
13
14//forward declarations
15class UMLEntity;
16class UMLEntityAttributeList;
17class UMLClassifierListItemList;
18
25 class SQLWriter : public SimpleCodeGenerator
26{
27 Q_OBJECT
28public:
29
30 SQLWriter();
31 virtual ~SQLWriter();
32
33 virtual void writeClass(UMLClassifier *c);
34
35 virtual Uml::ProgrammingLanguage::Enum language() const;
36
37 virtual QStringList defaultDatatypes();
38
39 virtual QStringList reservedKeywords() const;
40
41protected:
42 QStringList m_enumsGenerated;
43 UMLEntity* m_pEntity;
44
45 virtual void printEntityAttributes(QTextStream& sql, UMLEntityAttributeList entityAttributeList);
46 virtual void printUniqueConstraints(QTextStream& sql, UMLClassifierListItemList constrList);
47 virtual void printForeignKeyConstraints(QTextStream& sql, UMLClassifierListItemList constrList);
48 virtual void printCheckConstraints(QTextStream& sql, UMLClassifierListItemList constrList);
49 virtual void printIndex(QTextStream& sql, UMLEntity* ent, UMLEntityAttributeList entAttList);
50 virtual void printAutoIncrements(QTextStream& sql, UMLEntityAttributeList entAttList);
51};
52
53#endif // SQLWRITER_H
SQLWriter
Definition: sqlwriter.h:26
SQLWriter::SQLWriter
SQLWriter()
Definition: sqlwriter.cpp:173
SQLWriter::printUniqueConstraints
virtual void printUniqueConstraints(QTextStream &sql, UMLClassifierListItemList constrList)
Definition: sqlwriter.cpp:456
SQLWriter::printCheckConstraints
virtual void printCheckConstraints(QTextStream &sql, UMLClassifierListItemList constrList)
Definition: sqlwriter.cpp:630
SQLWriter::reservedKeywords
virtual QStringList reservedKeywords() const
Definition: sqlwriter.cpp:362
SQLWriter::printAutoIncrements
virtual void printAutoIncrements(QTextStream &sql, UMLEntityAttributeList entAttList)
Definition: sqlwriter.cpp:619
SQLWriter::defaultDatatypes
virtual QStringList defaultDatatypes()
Definition: sqlwriter.cpp:329
SQLWriter::printIndex
virtual void printIndex(QTextStream &sql, UMLEntity *ent, UMLEntityAttributeList entAttList)
Definition: sqlwriter.cpp:582
SQLWriter::~SQLWriter
virtual ~SQLWriter()
Definition: sqlwriter.cpp:178
SQLWriter::printForeignKeyConstraints
virtual void printForeignKeyConstraints(QTextStream &sql, UMLClassifierListItemList constrList)
Definition: sqlwriter.cpp:503
SQLWriter::m_enumsGenerated
QStringList m_enumsGenerated
Definition: sqlwriter.h:42
SQLWriter::writeClass
virtual void writeClass(UMLClassifier *c)
Definition: sqlwriter.cpp:186
SQLWriter::m_pEntity
UMLEntity * m_pEntity
Definition: sqlwriter.h:43
SQLWriter::language
virtual Uml::ProgrammingLanguage::Enum language() const
Definition: sqlwriter.cpp:321
SQLWriter::printEntityAttributes
virtual void printEntityAttributes(QTextStream &sql, UMLEntityAttributeList entityAttributeList)
Definition: sqlwriter.cpp:380
SimpleCodeGenerator
Definition: simplecodegenerator.h:30
UMLClassifierListItemList
Definition: umlclassifierlistitemlist.h:22
UMLClassifier
Information for a non-graphical Concept/Class.
Definition: classifier.h:35
UMLEntityAttributeList
Definition: umlentityattributelist.h:20
UMLEntity
Non-graphical Information for an Entity.
Definition: entity.h:30
Uml::ProgrammingLanguage::Enum
Enum
Definition: basictypes.h:291
simplecodegenerator.h
umlattributelist.h