diff options
author | Carlo Zancanaro <carlo@carlo-laptop> | 2012-04-26 16:15:17 +1000 |
---|---|---|
committer | Carlo Zancanaro <carlo@carlo-laptop> | 2012-04-26 16:15:17 +1000 |
commit | 63a10756032fa5c677787fba209706b8bf1e4bef (patch) | |
tree | 705ee15011d9aaeec3b921c3f808427c8aa00589 /impl/ExpressionFactory.hpp | |
parent | a9de4273bf8377aeab7d3f76a6d8bc0c89b42f79 (diff) |
A bunch of modifications working to a good solver.
Diffstat (limited to 'impl/ExpressionFactory.hpp')
-rw-r--r-- | impl/ExpressionFactory.hpp | 19 |
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 |