summaryrefslogtreecommitdiff
path: root/impl/ExpressionFactory.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'impl/ExpressionFactory.hpp')
-rw-r--r--impl/ExpressionFactory.hpp19
1 files changed, 19 insertions, 0 deletions
diff --git a/impl/ExpressionFactory.hpp b/impl/ExpressionFactory.hpp
new file mode 100644
index 0000000..605dd9e
--- /dev/null
+++ b/impl/ExpressionFactory.hpp
@@ -0,0 +1,19 @@
+#ifndef EXPRESSION_FACTORY_HPP
+#define EXPRESSION_FACTORY_HPP
+
+#include "Expression.hpp"
+
+template<typename T>
+struct ExpressionFactory {
+ ExpressionFactory() : id(0) { }
+ Expression<T> createExpression(Operator<T>* op, std::vector< Expression<T> > args) {
+ return Expression<T>(id++, op, args);
+ }
+ unsigned int count() const {
+ return id;
+ }
+ private:
+ unsigned int id;
+};
+
+#endif