umbrello 2.34.70-5524f40e1
Umbrello UML Modeller is a Unified Modelling Language (UML) diagram program based on KDE Technology
|
#include <sqlwriter.h>
Public Member Functions | |
SQLWriter () | |
virtual | ~SQLWriter () |
virtual void | writeClass (UMLClassifier *c) |
virtual Uml::ProgrammingLanguage::Enum | language () const |
virtual QStringList | defaultDatatypes () const |
virtual QStringList | reservedKeywords () const |
![]() | |
SimpleCodeGenerator (bool createDirHierarchyForPackages=true) | |
virtual | ~SimpleCodeGenerator () |
void | writeCodeToFile (UMLClassifierList &concepts) |
void | writeCodeToFile () |
![]() | |
CodeGenerator () | |
virtual | ~CodeGenerator () |
bool | addCodeDocument (CodeDocument *add_object) |
bool | removeCodeDocument (CodeDocument *remove_object) |
CodeDocumentList * | getCodeDocumentList () |
QString | getUniqueID (CodeDocument *codeDoc) |
virtual void | saveToXMI (QXmlStreamWriter &writer) |
CodeDocument * | findCodeDocumentByID (const QString &id) |
void | setIncludeHeadings (bool i) |
bool | includeHeadings () const |
void | setHeadingFileDir (const QString &) |
QString | headingFileDir () const |
void | setForceDoc (bool f) |
bool | forceDoc () const |
void | setForceSections (bool f) |
bool | forceSections () const |
virtual QString | getHeadingFile (const QString &file) |
QString | findFileName (CodeDocument *codeDocument) |
virtual void | loadFromXMI (QDomElement &element) |
CodeDocument * | findCodeDocumentByClassifier (UMLClassifier *classifier) |
virtual bool | isReservedKeyword (const QString &keyword) |
virtual void | createDefaultStereotypes () |
Protected Member Functions | |
virtual void | printEntityAttributes (QTextStream &sql, UMLEntityAttributeList entityAttributeList) |
virtual void | printUniqueConstraints (QTextStream &sql, UMLClassifierListItemList constrList) |
virtual void | printForeignKeyConstraints (QTextStream &sql, UMLClassifierListItemList constrList) |
virtual void | printCheckConstraints (QTextStream &sql, UMLClassifierListItemList constrList) |
virtual void | printIndex (QTextStream &sql, UMLEntity *ent, UMLEntityAttributeList entAttList) |
virtual void | printAutoIncrements (QTextStream &sql, UMLEntityAttributeList entAttList) |
![]() | |
QString | findFileName (UMLPackage *concept, const QString &ext) |
QString | overwritableName (UMLPackage *concept, const QString &name, const QString &ext) |
bool | hasDefaultValueAttr (UMLClassifier *c) |
bool | hasAbstractOps (UMLClassifier *c) |
QString | indent () |
virtual void | initFromParentDocument () |
![]() | |
QString | overwritableName (const QString &name, const QString &extension) |
bool | openFile (QFile &file, const QString &name) |
void | writeListedCodeDocsToFile (CodeDocumentList *docs) |
virtual void | finalizeRun () |
Protected Attributes | |
QStringList | m_enumsGenerated |
UMLEntity * | m_pEntity |
![]() | |
QString | className_ |
QString | fileName_ |
QMap< UMLPackage *, QString > | m_fileMap |
bool | m_createDirHierarchyForPackages |
QString | m_indentation |
int | m_indentLevel |
QString | m_endl |
![]() | |
QHash< QString, CodeDocument * > | m_codeDocumentDictionary |
bool | m_applyToAllRemaining |
UMLDoc * | m_document |
Additional Inherited Members | |
![]() | |
enum | GenerationState { Generated , Failed , Skipped } |
![]() | |
virtual void | syncCodeToDocument () |
![]() | |
virtual void | syncCodeToDocument () |
![]() | |
void | codeGenerated (UMLClassifier *concept, bool generated) |
void | codeGenerated (UMLClassifier *concept, CodeGenerator::GenerationState result) |
void | showGeneratedFile (const QString &filename) |
![]() | |
static QString | cleanName (const QString &name) |
static QString | formatDoc (const QString &text, const QString &linePrefix=QLatin1String(" *"), int lineWidth=80) |
static QString | formatSourceCode (const QString &code, const QString &indentation) |
static void | findObjectsRelated (UMLClassifier *c, UMLPackageList &cList) |
Class SQLWriter is a code generator for UMLClassifier objects. Create an instance of this class, and feed it a UMLClassifier when calling writeClass and it will generate a sql source file for that concept.
SQLWriter::SQLWriter | ( | ) |
|
virtual |
|
virtual |
Reimplement method from CodeGenerator.
Reimplemented from CodeGenerator.
Reimplemented in MySQLWriter, and PostgreSQLWriter.
|
virtual |
|
protectedvirtual |
Handles AutoIncrements. The derived classes provide the actual body.
sql | The Stream we should print to |
entAttList | The List of Entity Attributes that we want to auto increment |
Reimplemented in MySQLWriter, and PostgreSQLWriter.
|
protectedvirtual |
Prints out Check Constraints as "ALTER TABLE" statements.
sql | The stream we should print to |
constrList | The checkConstraints to be printed |
Reimplemented in MySQLWriter.
|
protectedvirtual |
Prints out attributes as columns in the table.
sql | the stream we should print to |
entityAttributeList | the attributes to be printed |
|
protectedvirtual |
Prints out foreign key constraints as "ALTER TABLE" statements.
sql | the stream we should print to |
constrList | the foreignkey constraints to be printed |
Reimplemented in MySQLWriter.
|
protectedvirtual |
Prints out Indexes as "CREATE INDEX " statements.
sql | The Stream we should print to |
ent | The Entity's attributes on which we want to create an Index |
entAttList | The list of entityattributes to create an index upon |
|
protectedvirtual |
Prints out unique constraints (including primary key) as "ALTER TABLE" statements.
sql | the stream we should print to |
constrList | the unique constraints to be printed |
|
virtual |
Get list of reserved keywords.
Reimplemented from CodeGenerator.
|
virtual |
Call this method to generate sql code for a UMLClassifier.
c | the class to generate code for |
Implements SimpleCodeGenerator.
|
protected |
|
protected |