summaryrefslogtreecommitdiff
path: root/src/expression.h
diff options
context:
space:
mode:
authorkintel <kintel@b57f626f-c46c-0410-a088-ec61d464b74c>2010-01-30 04:26:05 (GMT)
committerkintel <kintel@b57f626f-c46c-0410-a088-ec61d464b74c>2010-01-30 04:26:05 (GMT)
commit191dc4857c852f1867e80cd9d03a6d1c0921dcb1 (patch)
tree4a6421d50eb6cf70924fc0ba06afccf10df00650 /src/expression.h
parent6940d171812565209efe679a5d923417c3f47d4a (diff)
header file reorg
git-svn-id: http://svn.clifford.at/openscad/trunk@365 b57f626f-c46c-0410-a088-ec61d464b74c
Diffstat (limited to 'src/expression.h')
-rw-r--r--src/expression.h40
1 files changed, 40 insertions, 0 deletions
diff --git a/src/expression.h b/src/expression.h
new file mode 100644
index 0000000..dadcea0
--- /dev/null
+++ b/src/expression.h
@@ -0,0 +1,40 @@
+#ifndef EXPRESSION_H_
+#define EXPRESSION_H_
+
+#include <QVector>
+#include <QString>
+
+class Expression
+{
+public:
+ QVector<Expression*> children;
+
+ class Value *const_value;
+ QString var_name;
+
+ QString call_funcname;
+ QVector<QString> call_argnames;
+
+ // Boolean: ! && ||
+ // Operators: * / % + -
+ // Relations: < <= == != >= >
+ // Vector element: []
+ // Condition operator: ?:
+ // Invert (prefix '-'): I
+ // Constant value: C
+ // Create Range: R
+ // Create Vector: V
+ // Create Matrix: M
+ // Lookup Variable: L
+ // Lookup member per name: N
+ // Function call: F
+ QString type;
+
+ Expression();
+ ~Expression();
+
+ Value evaluate(const class Context *context) const;
+ QString dump() const;
+};
+
+#endif
contact: Jan Huwald // Impressum