Nebula
Loading...
Searching...
No Matches
Game::FrameEvent::Batch Class Reference

#include <frameevent.h>

Detailed Description

A batch of frame callbacks.

Public Member Functions

 Batch ()=default
 
 ~Batch ()
 
void Execute (World *world)
 
bool TryInsert (Processor *processor)
 Try to insert a processor into the batch.
 
void Prefilter (World *world, bool force=false)
 prefilter all processors. Should not be done per frame - instead use CacheTable if you need to do incremental caching
 
void CacheTable (MemDb::TableId, MemDb::TableSignature const &)
 add a table to the cache of any processors that accepts it, that is attached to this frame batch
 
Util::Array< Processor const * > GetProcessors () const
 

Public Attributes

int order = 100
 sorting order in frame event
 
bool async = false
 

Private Member Functions

void ExecuteAsync (World *world)
 
void ExecuteSequential (World *world)
 

Private Attributes

Util::Array< Processor * > processors
 

Constructor & Destructor Documentation

◆ Batch()

Game::FrameEvent::Batch::Batch ( )
default

◆ ~Batch()

Game::FrameEvent::Batch::~Batch ( )

Member Function Documentation

◆ CacheTable()

void Game::FrameEvent::Batch::CacheTable ( MemDb::TableId tid,
MemDb::TableSignature const & signature )

add a table to the cache of any processors that accepts it, that is attached to this frame batch

◆ Execute()

void Game::FrameEvent::Batch::Execute ( World * world)

◆ ExecuteAsync()

void Game::FrameEvent::Batch::ExecuteAsync ( World * world)
private

◆ ExecuteSequential()

void Game::FrameEvent::Batch::ExecuteSequential ( World * world)
private

◆ GetProcessors()

Util::Array< Processor const * > Game::FrameEvent::Batch::GetProcessors ( ) const

◆ Prefilter()

void Game::FrameEvent::Batch::Prefilter ( World * world,
bool force = false )

prefilter all processors. Should not be done per frame - instead use CacheTable if you need to do incremental caching

◆ TryInsert()

bool Game::FrameEvent::Batch::TryInsert ( Processor * processor)

Try to insert a processor into the batch.

Can reject the processor if the batch is executed async, and the processor is not allowed to run simultaneously as the other processor. In this case, use linear probing to insert the processor into a new batch

Member Data Documentation

◆ async

bool Game::FrameEvent::Batch::async = false

◆ order

int Game::FrameEvent::Batch::order = 100

sorting order in frame event

◆ processors

Util::Array<Processor*> Game::FrameEvent::Batch::processors
private

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