diff options
Diffstat (limited to 'impl/Variable.hpp')
-rw-r--r-- | impl/Variable.hpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/impl/Variable.hpp b/impl/Variable.hpp index 2386e7a..c46db02 100644 --- a/impl/Variable.hpp +++ b/impl/Variable.hpp @@ -1,23 +1,28 @@ #ifndef VARIABLE_HPP #define VARIABLE_HPP +#include <string> #include "Operator.hpp" template<typename T> struct Variable : public Operator<T> { - Variable(unsigned int id) - : _id(id) { } + Variable(unsigned int id, const std::string& name) + : _id(id), _name(name) { } Variable(const Variable& other) : _id(other._id) { } unsigned int id() const { return _id; } + std::string name() const { + return _name; + } T operator() (const std::vector< Expression<T>* >& args, const VariableAssignment<T>& ass) const { //assert(args.size() == 0) return ass[*this]; } private: const unsigned int _id; + const std::string _name; }; #endif |