From 63a10756032fa5c677787fba209706b8bf1e4bef Mon Sep 17 00:00:00 2001 From: Carlo Zancanaro Date: Thu, 26 Apr 2012 16:15:17 +1000 Subject: A bunch of modifications working to a good solver. --- impl/ExpressionFactory.hpp | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 impl/ExpressionFactory.hpp (limited to 'impl/ExpressionFactory.hpp') 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 +struct ExpressionFactory { + ExpressionFactory() : id(0) { } + Expression createExpression(Operator* op, std::vector< Expression > args) { + return Expression(id++, op, args); + } + unsigned int count() const { + return id; + } + private: + unsigned int id; +}; + +#endif -- cgit v1.2.3