Numworks Epsilon
1.4.1
Graphing Calculator Operating System
app.h
Go to the documentation of this file.
1
#ifndef PROBABILITY_PROBABILITY_APP_H
2
#define PROBABILITY_PROBABILITY_APP_H
3
4
#include <
escher.h
>
5
#include <
poincare.h
>
6
#include "
law_controller.h
"
7
#include "
calculation_controller.h
"
8
#include "
parameters_controller.h
"
9
#include "../shared/text_field_delegate_app.h"
10
#include "
law/binomial_law.h
"
11
#include "
law/exponential_law.h
"
12
#include "
law/normal_law.h
"
13
#include "
law/poisson_law.h
"
14
#include "
law/uniform_law.h
"
15
#include "
calculation/left_integral_calculation.h
"
16
#include "
calculation/right_integral_calculation.h
"
17
#include "
calculation/finite_integral_calculation.h
"
18
19
constexpr
static
size_t
max(
const
int
*
data
,
int
seed = 0) {
20
return
(*
data
== 0 ? seed : max(
data
+1, *
data
> seed ? *
data
: seed));
21
}
22
23
namespace
Probability
{
24
25
class
App
:
public
Shared::TextFieldDelegateApp
{
26
public
:
27
class
Descriptor
:
public
::App::Descriptor
{
28
public
:
29
I18n::Message
name
()
override
;
30
I18n::Message
upperName
()
override
;
31
const
Image
*
icon
()
override
;
32
};
33
class
Snapshot
:
public
::App::Snapshot
{
34
public
:
35
enum class
Page
{
36
Law
,
37
Parameters
,
38
Calculations
39
};
40
Snapshot
();
41
~Snapshot
();
42
App
*
unpack
(
Container
*
container
)
override
;
43
Descriptor
*
descriptor
()
override
;
44
void
reset
()
override
;
45
Law
*
law
();
46
Calculation
*
calculation
();
47
Page
activePage
();
48
void
setActivePage
(
Page
activePage
);
49
private
:
50
constexpr
static
int
k_lawSizes[] = {
sizeof
(
BinomialLaw
),
sizeof
(
ExponentialLaw
),
sizeof
(
NormalLaw
),
sizeof
(
PoissonLaw
),
sizeof
(
UniformLaw
), 0};
51
constexpr
static
size_t
k_lawSize = max(k_lawSizes);
52
char
m_law[k_lawSize];
53
constexpr
static
int
k_calculationSizes[] = {
sizeof
(
LeftIntegralCalculation
),
sizeof
(
FiniteIntegralCalculation
),
sizeof
(
RightIntegralCalculation
), 0};
54
constexpr
static
size_t
k_calculationSize = max(k_calculationSizes);
55
char
m_calculation[k_calculationSize];
56
Page
m_activePage;
57
};
58
private
:
59
App
(
Container
*
container
, Snapshot *
snapshot
);
60
CalculationController m_calculationController;
61
ParametersController m_parametersController;
62
LawController m_lawController;
63
StackViewController
m_stackViewController;
64
};
65
66
}
67
68
#endif
Probability::FiniteIntegralCalculation
Definition:
finite_integral_calculation.h:8
Probability::App::Snapshot::Page
Page
Definition:
app.h:35
right_integral_calculation.h
poincare.h
Probability
Definition:
app.cpp:8
i18n.data
def data
Definition:
i18n.py:176
Probability::BinomialLaw
Definition:
binomial_law.h:8
Probability::App::Descriptor
Definition:
app.h:27
Probability::App::Snapshot::Page::Law
normal_law.h
Probability::App::Snapshot::Page::Calculations
Probability::RightIntegralCalculation
Definition:
right_integral_calculation.h:8
Container
Definition:
container.h:18
App::snapshot
Snapshot * snapshot()
Definition:
app.cpp:41
Probability::App::Snapshot::Page::Parameters
Probability::App::Snapshot::calculation
Calculation * calculation()
Definition:
app.cpp:58
Probability::App::Snapshot::descriptor
Descriptor * descriptor() override
Definition:
app.cpp:41
finite_integral_calculation.h
Probability::NormalLaw
Definition:
normal_law.h:8
Probability::App::Snapshot::~Snapshot
~Snapshot()
Definition:
app.cpp:32
escher.h
Image
Definition:
image.h:6
Probability::Law
Definition:
law.h:12
Probability::LeftIntegralCalculation
Definition:
left_integral_calculation.h:8
Calculation
Definition:
app.cpp:10
Probability::App::Snapshot::activePage
Page activePage()
Definition:
app.cpp:66
uniform_law.h
calculation_controller.h
StackViewController
Definition:
stack_view_controller.h:10
Probability::App::Snapshot::Snapshot
Snapshot()
Definition:
app.cpp:22
left_integral_calculation.h
law_controller.h
Probability::App::Snapshot::unpack
App * unpack(Container *container) override
Definition:
app.cpp:37
Probability::ExponentialLaw
Definition:
exponential_law.h:8
Shared::TextFieldDelegateApp
Definition:
text_field_delegate_app.h:12
App
Definition:
app.h:23
Probability::App::Descriptor::name
I18n::Message name() override
Definition:
app.cpp:10
binomial_law.h
Probability::App::Snapshot::reset
void reset() override
Definition:
app.cpp:46
Probability::PoissonLaw
Definition:
poisson_law.h:8
Probability::App
Definition:
app.h:25
Probability::App::Snapshot::law
Law * law()
Definition:
app.cpp:54
Probability::App::Descriptor::icon
const Image * icon() override
Definition:
app.cpp:18
Probability::App::Snapshot::setActivePage
void setActivePage(Page activePage)
Definition:
app.cpp:62
poisson_law.h
parameters_controller.h
exponential_law.h
Shared::TextFieldDelegateApp::container
AppsContainer * container()
Definition:
text_field_delegate_app.cpp:20
Probability::App::Snapshot
Definition:
app.h:33
Probability::App::Descriptor::upperName
I18n::Message upperName() override
Definition:
app.cpp:14
Probability::UniformLaw
Definition:
uniform_law.h:8
epsilon
apps
probability
app.h
Generated by
1.8.14