JNGL
Easy to use cross-platform 2D game library
Loading...
Searching...
No Matches
Classes | Namespaces | Functions
job.hpp File Reference

Contains jngl::Job class and related functions. More...

#include <functional>
#include <memory>
Include dependency graph for job.hpp:
This graph shows which files directly or indirectly include this file:

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< JobgetJob (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.
 

Detailed Description

Contains jngl::Job class and related functions.

Definition in file job.hpp.