JNGL
Easy to use cross-platform 2D game library
|
Contains jngl::Job class and related functions. More...
Go to the source code of this file.
Classes | |
class | Job |
Background job which stays part of the main loop independent of the active jngl::Work. More... | |
Namespaces | |
namespace | jngl |
JNGL's main namespace. | |
Functions | |
void | addJob (std::shared_ptr< Job > job) |
Add a new Job which will be always be stepped and drawn by App::mainLoop() | |
template<class T , class... Args> | |
void | addJob (Args &&... args) |
The same as addJob(std::shared_ptr<Job>) but creates the Job for you. | |
void | removeJob (Job *) |
Removes the passed Job after all Jobs have been stepped. | |
std::shared_ptr< Job > | getJob (const std::function< bool(Job &)> &predicate) |
Returns the first Job for which predicate returned true. | |
template<class T > | |
std::shared_ptr< T > | getJob () |
Returns the first Job that is a T. | |