Application scene interface.
More...
#include <scene.hpp>
|
|
virtual | ~scene () noexcept=0 |
| | Destructor.
|
|
|
| scene () noexcept |
| | Default constructor.
|
| | scene (const scene &other) noexcept |
| | Copy constructor.
|
| | scene (scene &&other) noexcept |
| | Move constructor.
|
| auto | operator= (const scene &other) noexcept -> scene & |
| | Copy assignment operator.
|
| auto | operator= (scene &&other) noexcept -> scene & |
| | Move assignment operator.
|
| virtual void | begin (class context &ctx) |
| | Called after the previous scene has finished deactivation and before the first update.
|
| virtual constexpr auto | update (class context &ctx) -> std::optional< std::unique_ptr< scene > >=0 |
| | Called once per frame.
|
| virtual void | end (class context &ctx) |
| | Called after the last update and before the next scene begins activation.
|
Application scene interface.
- Examples
- examples/scenes.cpp.
◆ scene() [1/2]
| stellarlib::app::scene::scene |
( |
const scene & | other | ) |
|
|
nodiscardprotectednoexcept |
Copy constructor.
- Parameters
-
◆ scene() [2/2]
| stellarlib::app::scene::scene |
( |
scene && | other | ) |
|
|
nodiscardprotectednoexcept |
Move constructor.
- Parameters
-
◆ operator=() [1/2]
| auto stellarlib::app::scene::operator= |
( |
const scene & | other | ) |
-> scene & |
|
protectednoexcept |
Copy assignment operator.
- Parameters
-
- Returns
- Current instance
◆ operator=() [2/2]
| auto stellarlib::app::scene::operator= |
( |
scene && | other | ) |
-> scene & |
|
protectednoexcept |
Move assignment operator.
- Parameters
-
- Returns
- Current instance
◆ begin()
| virtual void stellarlib::app::scene::begin |
( |
class context & | ctx | ) |
|
|
protectedvirtual |
Called after the previous scene has finished deactivation and before the first update.
- Parameters
-
| ctx | Global application context |
◆ update()
| virtual constexpr auto stellarlib::app::scene::update |
( |
class context & | ctx | ) |
-> std::optional< std::unique_ptr< scene > > |
|
nodiscardconstexprprotectedpure virtual |
Called once per frame.
- Parameters
-
| ctx | Global application context |
- Returns
- std::nullopt to continue execution, a scene instance to request a transition or nullptr to terminate the application
◆ end()
| virtual void stellarlib::app::scene::end |
( |
class context & | ctx | ) |
|
|
protectedvirtual |
Called after the last update and before the next scene begins activation.
- Parameters
-
| ctx | Global application context |
The documentation for this class was generated from the following file: