summaryrefslogtreecommitdiff
path: root/impl/Variable.hpp
blob: 2386e7a9af0de094f462700f2a1927874cc67af7 (about) (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#ifndef VARIABLE_HPP
#define VARIABLE_HPP

#include "Operator.hpp"

template<typename T>
struct Variable : public Operator<T> {
  Variable(unsigned int id)
    : _id(id) { }
  Variable(const Variable& other)
    : _id(other._id) { }
  unsigned int id() const {
    return _id;
  }
  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;
};

#endif