zenilib: Zeni::Gamestate Class Reference

zenilib 0.5.3.0

- Main Page
- Modules
- Namespaces
- Classes
- Files

- Class List
- Class Index
- Class Hierarchy
- Class Members

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Public Member Functions | List of all members
Zeni::Gamestate Class Reference
Zenilib

A smartpointer for a Gamestate_Base. More...

`#include <Gamestate.h>`

## Public Member Functions

| Gamestate ()
| Gamestate (Gamestate_Base *const &state)
| Gamestate (const Gamestate &state)
| ~Gamestate ()
Gamestate_Base & | get ()
const bool & | is_pausable () const
void | on_cover ()
void | on_event (const SDL_Event &event)
void | on_pop ()
void | on_push ()
void | on_uncover ()
Gamestate & | operator= (const Gamestate &state)
void | perform_logic ()
void | prerender ()
void | render ()

## Detailed Description

A smartpointer for a Gamestate_Base.

A Gamestate also allows one to call the same functions provided by Gamestate_Base indirectly. Any functions provided by derivations of Gamestate_Base will, of course, require you to get the internal pointer and dynamic cast it to the correct type. (Or static cast if you're absolutely sure...)

Note
  A Gamestate is returned by Game::pop_state(). You can later push the state back onto the stack if you so desire.

Author
  bazald

Contact: bazal.nosp@m.d@ze.nosp@m.nipex.nosp@m..com

Definition at line 169 of file Gamestate.h.

## Constructor & Destructor Documentation

Zeni::Gamestate::Gamestate | ( |  | ) |

inline

Definition at line 42 of file Gamestate.hxx.

Zeni::Gamestate::Gamestate | ( | Gamestate_Base *const & | state | ) |

inline

Definition at line 47 of file Gamestate.hxx.

References assert.

Zeni::Gamestate::~Gamestate | ( |  | ) |

Definition at line 1113 of file Gamestate.cpp.

Zeni::Gamestate::Gamestate | ( | const Gamestate & | state | ) |

inline

Definition at line 56 of file Gamestate.hxx.

## Member Function Documentation

Gamestate_Base & Zeni::Gamestate::get | ( |  | ) |

inline

Definition at line 117 of file Gamestate.hxx.

const bool & Zeni::Gamestate::is_pausable | ( |  | ) | const

inline

Definition at line 113 of file Gamestate.hxx.

References Zeni::Gamestate_Base::is_pausable().

void Zeni::Gamestate::on_cover | ( |  | ) |

inline

Definition at line 101 of file Gamestate.hxx.

References Zeni::Gamestate_Base::on_cover().

void Zeni::Gamestate::on_event | ( | const SDL_Event & | event | ) |

inline

Definition at line 80 of file Gamestate.hxx.

References Zeni::Gamestate_Base::on_event().

Referenced by Zeni::Game::on_event(), and Zeni::Popup_State::on_key().

void Zeni::Gamestate::on_pop | ( |  | ) |

inline

Definition at line 109 of file Gamestate.hxx.

References Zeni::Gamestate_Base::on_pop().

Referenced by Zeni::Game::pop_state().

void Zeni::Gamestate::on_push | ( |  | ) |

inline

Definition at line 97 of file Gamestate.hxx.

References Zeni::Gamestate_Base::on_push().

void Zeni::Gamestate::on_uncover | ( |  | ) |

inline

Definition at line 105 of file Gamestate.hxx.

References Zeni::Gamestate_Base::on_uncover().

Gamestate & Zeni::Gamestate::operator= | ( | const Gamestate & | state | ) |

inline

Definition at line 63 of file Gamestate.hxx.

void Zeni::Gamestate::perform_logic | ( |  | ) |

inline

Definition at line 85 of file Gamestate.hxx.

References Zeni::Gamestate_Base::perform_logic().

Referenced by Zeni::Game::perform_logic().

void Zeni::Gamestate::prerender | ( |  | ) |

inline

Definition at line 89 of file Gamestate.hxx.

References Zeni::Gamestate_Base::prerender().

Referenced by Zeni::Game::prerender().

void Zeni::Gamestate::render | ( |  | ) |

inline

Definition at line 93 of file Gamestate.hxx.

References Zeni::Gamestate_Base::render().

Referenced by Zeni::Game::render().

The documentation for this class was generated from the following files:

- zenilib/jni/external/zenilib/zeni_rest/Zeni/Gamestate.h
- zenilib/jni/external/zenilib/zeni_rest/Gamestate.cpp
- zenilib/jni/external/zenilib/zeni_rest/Zeni/Gamestate.hxx