mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-03-20 14:20:39 +01:00
[poincare] Add files to temporary Makefile
This commit is contained in:
@@ -11,6 +11,10 @@ objs += $(addprefix poincare/src/,\
|
||||
subtraction.o\
|
||||
undefined.o\
|
||||
infinity.o\
|
||||
integer.o\
|
||||
opposite.o\
|
||||
decimal.o\
|
||||
rational.o\
|
||||
)
|
||||
|
||||
objsExpected += $(addprefix poincare/src/,\
|
||||
|
||||
@@ -26,8 +26,11 @@ public:
|
||||
int serialize(char * buffer, int bufferSize, Preferences::PrintFloatMode floatDisplayMode, int numberOfSignificantDigits) const override;
|
||||
bool isCollapsable(int * numberOfOpenParenthesis, bool goingLeft) const override;
|
||||
|
||||
// TreeNode
|
||||
// AllocationFailure
|
||||
static CharLayoutNode * FailedAllocationStaticNode();
|
||||
CharLayoutNode * failedAllocationStaticNode() override { return FailedAllocationStaticNode(); }
|
||||
|
||||
// TreeNode
|
||||
size_t size() const override { return sizeof(CharLayoutNode); }
|
||||
int numberOfChildren() const override { return 0; }
|
||||
#if TREE_LOG
|
||||
|
||||
@@ -11,6 +11,10 @@ class FractionLayoutNode : public LayoutNode {
|
||||
public:
|
||||
using LayoutNode::LayoutNode;
|
||||
|
||||
// AllocationFailure
|
||||
static FractionLayoutNode * FailedAllocationStaticNode();
|
||||
FractionLayoutNode * failedAllocationStaticNode() override { return FailedAllocationStaticNode(); }
|
||||
|
||||
// LayoutNode
|
||||
void moveCursorLeft(LayoutCursor * cursor, bool * shouldRecomputeLayout) override;
|
||||
void moveCursorRight(LayoutCursor * cursor, bool * shouldRecomputeLayout) override;
|
||||
@@ -54,7 +58,7 @@ private:
|
||||
class FractionLayoutRef : public LayoutReference {
|
||||
public:
|
||||
FractionLayoutRef(LayoutRef numerator, LayoutRef denominator) :
|
||||
LayoutReference(TreePool::sharedPool()->createTreeNode<FractionLayoutNode>(), true)
|
||||
LayoutReference(TreePool::sharedPool()->createTreeNode<FractionLayoutNode>())
|
||||
{
|
||||
replaceChildAtIndexInPlace(0, numerator);
|
||||
replaceChildAtIndexInPlace(1, denominator);
|
||||
|
||||
@@ -10,6 +10,11 @@ namespace Poincare {
|
||||
|
||||
static inline KDCoordinate max(KDCoordinate x, KDCoordinate y) { return x > y ? x : y; }
|
||||
|
||||
FractionLayoutNode * FractionLayoutNode::FailedAllocationStaticNode() {
|
||||
static AllocationFailureLayoutNode<FractionLayoutNode> failure;
|
||||
return &failure;
|
||||
}
|
||||
|
||||
void FractionLayoutNode::moveCursorLeft(LayoutCursor * cursor, bool * shouldRecomputeLayout) {
|
||||
if (cursor->position() == LayoutCursor::Position::Left
|
||||
&& ((numeratorLayout() && cursor->layoutNode() == numeratorLayout())
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#include <poincare/integer.h>
|
||||
#include <poincare/ieee754.h>
|
||||
#include <poincare/layout_helper.h>
|
||||
//#include <poincare/char_layout_node.h>
|
||||
#include <poincare/char_layout_node.h>
|
||||
#include <poincare/rational.h>
|
||||
#include <cmath>
|
||||
#include <utility>
|
||||
|
||||
Reference in New Issue
Block a user