mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-03-23 15:50:49 +01:00
AllocationFail
This commit is contained in:
22
allocation_failed_expression_node.h
Normal file
22
allocation_failed_expression_node.h
Normal file
@@ -0,0 +1,22 @@
|
||||
#ifndef ALLOCATION_FAILED_EXPRESSION_NODE_H
|
||||
#define ALLOCATION_FAILED_EXPRESSION_NODE_H
|
||||
|
||||
#include "expression_node.h"
|
||||
|
||||
class AllocationFailedExpressionNode : public ExpressionNode {
|
||||
public:
|
||||
// ExpressionNode
|
||||
float approximate() override { return -1; } // Should return nan
|
||||
|
||||
// TreeNode
|
||||
size_t size() const override { return sizeof(AllocationFailedExpressionNode); }
|
||||
const char * description() const override { return "Allocation Failed"; }
|
||||
int numberOfChildren() const override { return 0; }
|
||||
};
|
||||
|
||||
class AllocationFailedExpressionRef : public ExpressionReference<AllocationFailedExpressionNode> {
|
||||
public:
|
||||
AllocationFailedExpressionRef() : ExpressionReference<AllocationFailedExpressionNode>() {}
|
||||
};
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user