New Super Mario Bros. U Headers
Loading...
Searching...
No Matches
FState.h
Go to the documentation of this file.
1
#
pragma
once
2
3
#
include
<
state
/
FStateID
.
h
>
4
#
include
<
state
/
IState
.
h
>
5
6
template
<
typename
T>
7
class
FState
:
public
IState
8
{
9
public
:
10
FState
(T& obj)
11
:
mObject
(obj)
12
,
mStateID
(
nullptr
)
13
{
14
}
15
16
T&
getObject
()
const
{
return
mObject
; }
17
18
const
StateID
*
getStateID
()
const
override
{
return
mStateID; }
19
void
setStateID
(
const
FStateID<T>* state_id) { mStateID = state_id; }
20
21
void
initialize
()
22
{
23
mStateID->initializeState(mObject);
24
}
25
26
void
execute
()
override
27
{
28
mStateID->executeState(mObject);
29
}
30
31
void
finalize
()
32
{
33
mStateID->finalizeState(mObject);
34
}
35
36
protected
:
37
T&
mObject
;
38
const
FStateID
<
T
>*
mStateID
;
39
};
FState
Definition
FState.h:8
FState::getStateID
const StateID * getStateID() const override
Definition
FState.h:18
FState::finalize
void finalize()
Definition
FState.h:31
FState::execute
void execute() override
Definition
FState.h:26
FState::mStateID
const FStateID< T > * mStateID
Definition
FState.h:38
FState::FState
FState(T &obj)
Definition
FState.h:10
FState::initialize
void initialize()
Definition
FState.h:21
FState::getObject
T & getObject() const
Definition
FState.h:16
FState::mObject
T & mObject
Definition
FState.h:37
FState::setStateID
void setStateID(const FStateID< T > *state_id)
Definition
FState.h:19
state
FState.h
Generated by
1.14.0