Nebula
Loading...
Searching...
No Matches
Game::ProcessorBuilder Class Reference

#include <processor.h>

Public Member Functions

 ProcessorBuilder ()=delete
 ProcessorBuilder (Game::World *world, Util::StringAtom processorName)
template<typename LAMBDA>
ProcessorBuilderFunc (LAMBDA)
 which function to run with the processor
template<typename ... COMPONENTS>
ProcessorBuilderFunc (std::function< void(World *, COMPONENTS...)> func)
 which function to run with the processor
template<typename ... COMPONENTS>
ProcessorBuilderIncluding ()
 entities must have these components
template<typename ... COMPONENTS>
ProcessorBuilderExcluding ()
 entities must not have any of these components
ProcessorBuilderExcluding (std::initializer_list< ComponentId >)
 entities must not have any of these components
ProcessorBuilderOn (Util::StringAtom eventName)
 select on which event the processor is executed
ProcessorBuilderAsync ()
 processor should run async
ProcessorBuilderOnlyModified ()
 entities must be marked as modified for them to actually be processed
ProcessorBuilderOrder (int order)
 Set the sorting order for the processor.
ProcessorBuilderRunInEditor ()
 Processor should always run, even in editor; when the game is paused.
ProcessorBuild ()
 Build the processor and attach it to the world.

Private Attributes

Worldworld
Util::StringAtom name
Util::StringAtom onEvent
std::function< void(World *, Dataset::View const &)> func = nullptr
std::function< void(World *, Dataset::View const &)> funcModified = nullptr
FilterBuilder filterBuilder
bool async = false
bool onlyModified = false
int order = 100

Constructor & Destructor Documentation

◆ ProcessorBuilder() [1/2]

Game::ProcessorBuilder::ProcessorBuilder ( )
delete

◆ ProcessorBuilder() [2/2]

Game::ProcessorBuilder::ProcessorBuilder ( Game::World * world,
Util::StringAtom processorName )

Member Function Documentation

◆ Async()

ProcessorBuilder & Game::ProcessorBuilder::Async ( )

processor should run async

◆ Build()

Processor * Game::ProcessorBuilder::Build ( )

Build the processor and attach it to the world.

◆ Excluding() [1/2]

template<typename ... COMPONENTS>
ProcessorBuilder & Game::ProcessorBuilder::Excluding ( )
inline

entities must not have any of these components

◆ Excluding() [2/2]

ProcessorBuilder & Game::ProcessorBuilder::Excluding ( std::initializer_list< ComponentId > components)

entities must not have any of these components

◆ Func() [1/2]

template<typename LAMBDA>
ProcessorBuilder & Game::ProcessorBuilder::Func ( LAMBDA lambda)

which function to run with the processor

◆ Func() [2/2]

template<typename ... COMPONENTS>
ProcessorBuilder & Game::ProcessorBuilder::Func ( std::function< void(World *, COMPONENTS...)> func)
inline

which function to run with the processor

◆ Including()

template<typename ... COMPONENTS>
ProcessorBuilder & Game::ProcessorBuilder::Including ( )
inline

entities must have these components

◆ On()

ProcessorBuilder & Game::ProcessorBuilder::On ( Util::StringAtom eventName)

select on which event the processor is executed

◆ OnlyModified()

ProcessorBuilder & Game::ProcessorBuilder::OnlyModified ( )

entities must be marked as modified for them to actually be processed

◆ Order()

ProcessorBuilder & Game::ProcessorBuilder::Order ( int order)

Set the sorting order for the processor.

◆ RunInEditor()

ProcessorBuilder & Game::ProcessorBuilder::RunInEditor ( )

Processor should always run, even in editor; when the game is paused.

Member Data Documentation

◆ async

bool Game::ProcessorBuilder::async = false
private

◆ filterBuilder

FilterBuilder Game::ProcessorBuilder::filterBuilder
private

◆ func

std::function<void(World*, Dataset::View const&)> Game::ProcessorBuilder::func = nullptr
private

◆ funcModified

std::function<void(World*, Dataset::View const&)> Game::ProcessorBuilder::funcModified = nullptr
private

◆ name

Util::StringAtom Game::ProcessorBuilder::name
private

◆ onEvent

Util::StringAtom Game::ProcessorBuilder::onEvent
private

◆ onlyModified

bool Game::ProcessorBuilder::onlyModified = false
private

◆ order

int Game::ProcessorBuilder::order = 100
private

◆ world

World* Game::ProcessorBuilder::world
private

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