22 lines
254 B
C
22 lines
254 B
C
|
class State;
|
||
|
|
||
|
class Context
|
||
|
{
|
||
|
public:
|
||
|
Context()
|
||
|
{
|
||
|
state = nullptr;
|
||
|
}
|
||
|
void setState(State *state)
|
||
|
{
|
||
|
this->state = state;
|
||
|
}
|
||
|
State*getState()
|
||
|
{
|
||
|
return this->state;
|
||
|
}
|
||
|
|
||
|
private:
|
||
|
State *state;
|
||
|
};
|