summaryrefslogtreecommitdiffstats
path: root/umbrello/umbrello/codegenerators/pascalwriter.h
diff options
context:
space:
mode:
authortoma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2009-11-25 17:56:58 +0000
committertoma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2009-11-25 17:56:58 +0000
commitbd9e6617827818fd043452c08c606f07b78014a0 (patch)
tree425bb4c3168f9c02f10150f235d2cb998dcc6108 /umbrello/umbrello/codegenerators/pascalwriter.h
downloadtdesdk-bd9e6617827818fd043452c08c606f07b78014a0.tar.gz
tdesdk-bd9e6617827818fd043452c08c606f07b78014a0.zip
Copy the KDE 3.5 branch to branches/trinity for new KDE 3.5 features.
BUG:215923 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdesdk@1054174 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'umbrello/umbrello/codegenerators/pascalwriter.h')
-rw-r--r--umbrello/umbrello/codegenerators/pascalwriter.h86
1 files changed, 86 insertions, 0 deletions
diff --git a/umbrello/umbrello/codegenerators/pascalwriter.h b/umbrello/umbrello/codegenerators/pascalwriter.h
new file mode 100644
index 00000000..bc34d762
--- /dev/null
+++ b/umbrello/umbrello/codegenerators/pascalwriter.h
@@ -0,0 +1,86 @@
+/***************************************************************************
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * copyright (C) 2006 *
+ * Umbrello UML Modeller Authors <uml-devel@uml.sf.net> *
+ ***************************************************************************/
+
+#ifndef PASCALWRITER_H
+#define PASCALWRITER_H
+
+#include "simplecodegenerator.h"
+
+class UMLAssociation;
+class UMLOperation;
+
+/**
+ * Pascal class writer
+ * @author Oliver Kellogg
+ * Bugs and comments to uml-devel@lists.sf.net or http://bugs.kde.org
+ */
+class PascalWriter : public SimpleCodeGenerator {
+ Q_OBJECT
+public:
+
+ /**
+ * Basic Constructor
+ */
+ PascalWriter ();
+
+ /**
+ * Empty Destructor
+ */
+ virtual ~PascalWriter ();
+
+ /**
+ * call this method to generate Ada code for a UMLClassifier
+ * @param c the class to generate code for
+ */
+ virtual void writeClass (UMLClassifier *c);
+
+ /**
+ * returns "Pascal"
+ */
+ virtual Uml::Programming_Language getLanguage();
+
+ QStringList defaultDatatypes();
+
+ /**
+ * Check whether the given string is a reserved word for the
+ * language of this code generator
+ *
+ * @param rPossiblyReservedKeyword The string to check.
+ */
+ virtual bool isReservedKeyword(const QString & rPossiblyReservedKeyword);
+
+ /**
+ * get list of reserved keywords
+ */
+ virtual const QStringList reservedKeywords() const;
+
+private:
+
+ /**
+ * write one operation
+ * @param op the class for which we are generating code
+ * @param ada the stream associated with the output file
+ */
+ void writeOperation (UMLOperation *op, QTextStream &ada, bool is_comment = false);
+
+ void computeAssocTypeAndRole (UMLAssociation *a, QString& typeName, QString& roleName);
+
+ bool isOOClass (UMLClassifier *c);
+
+ QString qualifiedName
+ (UMLPackage *p, bool withType = false, bool byValue = false);
+
+ static const QString defaultPackageSuffix;
+
+};
+
+#endif // PASCALWRITER_H
+