Numworks Epsilon
1.4.1
Graphing Calculator Operating System
bounded_static_hierarchy.cpp
Go to the documentation of this file.
1
#include <
poincare/bounded_static_hierarchy.h
>
2
#include <
poincare/expression_array.h
>
3
extern
"C"
{
4
#include <
assert.h
>
5
}
6
7
namespace
Poincare
{
8
9
template
<
int
T>
10
BoundedStaticHierarchy<T>::BoundedStaticHierarchy
() :
11
StaticHierarchy
<
T
>(),
12
m_numberOfOperands(0)
13
{
14
}
15
16
template
<
int
T>
17
BoundedStaticHierarchy<T>::BoundedStaticHierarchy
(
const
Expression
*
const
* operands,
int
numberOfOperands,
bool
cloneOperands) :
18
m_numberOfOperands(numberOfOperands)
19
{
20
StaticHierarchy<T>::build
(operands, numberOfOperands, cloneOperands);
21
}
22
23
template
<>
24
BoundedStaticHierarchy<2>::BoundedStaticHierarchy
(
const
Expression
* e1,
const
Expression
* e2,
bool
cloneOperands) :
25
BoundedStaticHierarchy
(
ExpressionArray
(e1, e2).array(), 2, cloneOperands)
26
{
27
}
28
29
template
<>
30
BoundedStaticHierarchy<2>::BoundedStaticHierarchy
(
const
Expression
* e,
bool
cloneOperands) :
31
BoundedStaticHierarchy
((
Expression
**)&e, 1, cloneOperands)
32
{
33
}
34
35
template
<
int
T>
36
void
BoundedStaticHierarchy<T>::setArgument
(
ListData
* listData,
int
numberOfOperands,
bool
clone) {
37
StaticHierarchy<T>::setArgument
(listData, numberOfOperands, clone);
38
m_numberOfOperands = listData->
numberOfOperands
();
39
}
40
41
template
<
int
T>
42
bool
BoundedStaticHierarchy<T>::hasValidNumberOfOperands
(
int
numberOfOperands)
const
{
43
return
numberOfOperands >= 1 && numberOfOperands <=
T
;
44
}
45
46
template
class
Poincare::BoundedStaticHierarchy<2>
;
47
48
}
Poincare::BoundedStaticHierarchy::BoundedStaticHierarchy
BoundedStaticHierarchy()
Definition:
bounded_static_hierarchy.cpp:10
T
#define T(x)
Definition:
events.cpp:26
Poincare
Definition:
absolute_value.h:8
Poincare::ExpressionArray
Definition:
expression_array.h:8
assert.h
Poincare::BoundedStaticHierarchy
Definition:
bounded_static_hierarchy.h:9
Poincare::ListData::numberOfOperands
int numberOfOperands() const
Definition:
list_data.cpp:37
bounded_static_hierarchy.h
expression_array.h
Poincare::ListData
Definition:
list_data.h:8
Poincare::Expression
Definition:
expression.h:16
Poincare::StaticHierarchy
Definition:
static_hierarchy.h:10
epsilon
poincare
src
bounded_static_hierarchy.cpp
Generated by
1.8.14