Files
Upsilon/expression_node.h
Romain Goyet 3cd1015614 Initial import
2018-06-12 13:56:20 +02:00

23 lines
476 B
C++

#ifndef EXPRESSION_NODE_H
#define EXPRESSION_NODE_H
#include "tree_node.h"
class TreePool;
class ExpressionNode : public TreeNode {
public:
ExpressionNode(int identifier) : TreeNode(identifier) {}
static TreePool * Pool() {
static TreePool pool;
return &pool;
}
virtual float approximate() = 0;
int numberOfOperands() { return numberOfChildren(); }
ExpressionNode * operand(int i) { return static_cast<ExpressionNode *>(childAtIndex(i)); }
};
#endif