#include #include extern "C" { #include } namespace Poincare { template BoundedStaticHierarchy::BoundedStaticHierarchy() : StaticHierarchy(), m_numberOfOperands(0) { } template BoundedStaticHierarchy::BoundedStaticHierarchy(const Expression * const * operands, int numberOfOperands, bool cloneOperands) : m_numberOfOperands(numberOfOperands) { StaticHierarchy::build(operands, numberOfOperands, cloneOperands); } template<> BoundedStaticHierarchy<2>::BoundedStaticHierarchy(const Expression * e1, const Expression * e2, bool cloneOperands) : BoundedStaticHierarchy(ExpressionArray(e1, e2).array(), 2, cloneOperands) { } template<> BoundedStaticHierarchy<2>::BoundedStaticHierarchy(const Expression * e, bool cloneOperands) : BoundedStaticHierarchy((Expression **)&e, 1, cloneOperands) { } template void BoundedStaticHierarchy::setArgument(ListData * listData, int numberOfOperands, bool clone) { StaticHierarchy::setArgument(listData, numberOfOperands, clone); m_numberOfOperands = listData->numberOfOperands(); } template bool BoundedStaticHierarchy::hasValidNumberOfOperands(int numberOfOperands) const { return numberOfOperands >= 1 && numberOfOperands <= T; } template class Poincare::BoundedStaticHierarchy<2>; }