Core main class. More...
#include <qb/main.h>
Classes | |
class | CoreBuilder |
Helper to build Actors in VirtualCore. More... | |
Public Member Functions | |
Main (CoreSet const &core_set) | |
Main (std::unordered_set< uint8_t > const &core_set) | |
void | start (bool async=true) const |
Start the engine. More... | |
void | join () const |
Wait until engine terminates. More... | |
template<typename _Actor , typename ... _Args> | |
ActorId | addActor (std::size_t index, _Args &&...args) |
Create new _Actor. More... | |
CoreBuilder | core (uint16_t const index) |
Get CoreBuilder from index. More... | |
Static Public Member Functions | |
static bool | hasError () |
static void | stop () |
Stop the engine. More... | |
void qb::Main::start | ( | bool | async = true | ) | const |
Start the engine.
async | has blocking execution |
|
static |
Stop the engine.
void qb::Main::join | ( | ) | const |
Wait until engine terminates.
ActorId qb::Main::addActor | ( | std::size_t | index, |
_Args &&... | args | ||
) |
Create new _Actor.
_Actor | DerivedActor type |
index | VirtualCore index |
args | arguments to forward to the constructor of the _Actor |
create new _Actor on VirtualCore index.
example:
CoreBuilder qb::Main::core | ( | uint16_t const | index | ) |
Get CoreBuilder from index.
index | VirtualCore index |