#ifndef VARIABLE_HPP #define VARIABLE_HPP #include #include "Operator.hpp" template struct Variable : public Operator { 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* >& args, const VariableAssignment& ass) const { //assert(args.size() == 0) return ass[*this]; } private: const unsigned int _id; const std::string _name; }; #endif