mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-03-24 00:00:44 +01:00
Initial import
This commit is contained in:
22
expression_node.h
Normal file
22
expression_node.h
Normal file
@@ -0,0 +1,22 @@
|
||||
#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
|
||||
Reference in New Issue
Block a user