~ubuntu-branches/ubuntu/intrepid/kdesdk/intrepid-updates

« back to all changes in this revision

Viewing changes to umbrello/umbrello/codegenerators/mysqlwriter.h

  • Committer: Bazaar Package Importer
  • Author(s): Jonathan Riddell
  • Date: 2008-05-28 10:11:43 UTC
  • mto: This revision was merged to the branch mainline in revision 37.
  • Revision ID: james.westby@ubuntu.com-20080528101143-gzc3styjz1b70zxu
Tags: upstream-4.0.80
ImportĀ upstreamĀ versionĀ 4.0.80

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/***************************************************************************
 
2
 *                                                                         *
 
3
 *   This program is free software; you can redistribute it and/or modify  *
 
4
 *   it under the terms of the GNU General Public License as published by  *
 
5
 *   the Free Software Foundation; either version 2 of the License, or     *
 
6
 *   (at your option) any later version.                                   *
 
7
 *                                                                         *
 
8
 *   copyright (C) 2002-2007                                               *
 
9
 *   Umbrello UML Modeller Authors <uml-devel@uml.sf.net>                  *
 
10
 ***************************************************************************/
 
11
 
 
12
#ifndef MYSQLWRITER_H
 
13
#define MYSQLWRITER_H
 
14
 
 
15
#include "sqlwriter.h"
 
16
#include "../umlattributelist.h"
 
17
 
 
18
//forward declarations
 
19
class UMLClassifierListItemList;
 
20
 
 
21
/**
 
22
  * class MySQLWriter is a sql code generator for MySQL
 
23
  * Create an instance of this class, and feed it a UMLClassifier when
 
24
  * calling writeClass and it will generate a sql source file for
 
25
  * that concept
 
26
  */
 
27
class MySQLWriter : public SQLWriter {
 
28
    Q_OBJECT
 
29
public:
 
30
 
 
31
    MySQLWriter();
 
32
    virtual ~MySQLWriter();
 
33
 
 
34
    /**
 
35
     * returns "MySQL"
 
36
     */
 
37
    Uml::Programming_Language getLanguage();
 
38
 
 
39
    /**
 
40
     * Reimplement method from CodeGenerator.
 
41
     */
 
42
    QStringList defaultDatatypes();
 
43
 
 
44
    /**
 
45
     * Reimplemented method from SQLWriter
 
46
     */
 
47
    void printForeignKeyConstraints(QTextStream& sql, UMLClassifierListItemList constrList);
 
48
 
 
49
 
 
50
    /**
 
51
     * Reimplemented from Base Class to print warning
 
52
     */
 
53
    void printCheckConstraints(QTextStream& sql,UMLClassifierListItemList constrList);
 
54
 
 
55
protected:
 
56
 
 
57
    /**
 
58
     * Reimplement printAutoIncrements from Base Class for MySQL
 
59
     */
 
60
    void printAutoIncrements(QTextStream& sql, UMLEntityAttributeList entAttList);
 
61
 
 
62
};
 
63
 
 
64
#endif // MySQLWRITER_H