Khangai Robot Play - Naive
01
THe naive play of the Khangai Robot
state.h
Go to the documentation of this file.
1
#ifndef _STATE_H_
2
#define _STATE_H_
3
4
void
null_func
(
void
);
5
6
class
State
7
{
8
public
:
9
State
(
int
id
,
void
(*func)(
void
) =
null_func
) {
10
id_
= id;
11
func_
= func;
12
}
13
State
() =
default
;
14
State
(
State
&&) =
default
;
15
State
(
const
State
&) =
default
;
16
State
&
operator=
(
State
&&) =
default
;
17
State
&
operator=
(
const
State
&) =
default
;
18
~State
() { }
19
20
int
get_ID
()
const
{
return
id_
; }
21
void
call_StateFunc
()
const
{
func_
(); }
22
23
private
:
24
int
id_
;
25
void (*
func_
)(void);
26
};
27
28
#endif // !_STATE_H_
State
Definition:
state.h:6
State::call_StateFunc
void call_StateFunc() const
Definition:
state.h:21
State::id_
int id_
Definition:
state.h:24
State::State
State(int id, void(*func)(void)=null_func)
Definition:
state.h:9
State::get_ID
int get_ID() const
Definition:
state.h:20
State::~State
~State()
Definition:
state.h:18
State::operator=
State & operator=(State &&)=default
State::State
State()=default
null_func
void null_func(void)
Definition:
state.cpp:3
State::func_
void(* func_)(void)
Definition:
state.h:25
Core
Inc
utils
math
state.h
Generated by
1.8.15