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

#include "Operator.hpp"

template<typename T>
struct Variable : public Operator<T> {
  unsigned int id() const {
    return _id;
  }
  unsigned int id(unsigned int id) {
    return (_id = id);
  }
  T operator() (const std::vector< Expression<T>* >& args, const VariableAssignment<T>& ass) const {
    //assert(args.size() == 0)
    return ass[*this];
  }
  private:
  unsigned int _id;
};

#endif