Numworks Epsilon  1.4.1
Graphing Calculator Operating System
static_hierarchy.h
Go to the documentation of this file.
1 #ifndef POINCARE_STATIC_HIERARCHY_H
2 #define POINCARE_STATIC_HIERARCHY_H
3 
4 #include <poincare/expression.h>
5 #include <poincare/list_data.h>
6 
7 namespace Poincare {
8 
9 template<int T>
10 class StaticHierarchy : public Expression {
11 public:
13  StaticHierarchy(const Expression * const * operands, bool cloneOperands = true);
14  StaticHierarchy(const Expression * expression, bool cloneOperands = true); // Specialized constructor for StaticHierarchy<1>
15  StaticHierarchy(const Expression * expression1, const Expression * expression2, bool cloneOperands = true); // Specialized constructor for StaticHierarchy<2>
17  StaticHierarchy(const StaticHierarchy & other) = delete;
18  StaticHierarchy(StaticHierarchy && other) = delete;
19  StaticHierarchy& operator=(const StaticHierarchy & other) = delete;
20  StaticHierarchy& operator=(StaticHierarchy && other) = delete;
21 
22  virtual void setArgument(ListData * listData, int numberOfEntries, bool clone);
23  int numberOfOperands() const override { return T; }
24  const Expression * const * operands() const override { return m_operands; }
25  virtual bool hasValidNumberOfOperands(int numberOfOperands) const;
26 protected:
27  void build(const Expression * const * operands, int numberOfOperands, bool cloneOperands);
28  int simplificationOrderSameType(const Expression * e, bool canBeInterrupted) const override;
30 };
31 
32 }
33 
34 #endif
virtual void setArgument(ListData *listData, int numberOfEntries, bool clone)
StaticHierarchy & operator=(const StaticHierarchy &other)=delete
#define T(x)
Definition: events.cpp:26
const Expression *const * operands() const override
virtual Expression * clone() const =0
int simplificationOrderSameType(const Expression *e, bool canBeInterrupted) const override
void build(const Expression *const *operands, int numberOfOperands, bool cloneOperands)
virtual bool hasValidNumberOfOperands(int numberOfOperands) const
const Expression * m_operands[T]
int numberOfOperands() const override