summaryrefslogtreecommitdiff
path: root/impl/Variable.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'impl/Variable.hpp')
-rw-r--r--impl/Variable.hpp22
1 files changed, 22 insertions, 0 deletions
diff --git a/impl/Variable.hpp b/impl/Variable.hpp
new file mode 100644
index 0000000..0ba13e9
--- /dev/null
+++ b/impl/Variable.hpp
@@ -0,0 +1,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