OpenEnroth 73e68f7
Loading...
Searching...
No Matches
Public Member Functions | Private Member Functions | Private Attributes | Friends | List of all members
EngineTraceSimplePlayer Class Reference

#include <EngineTraceSimplePlayer.h>

Inheritance diagram for EngineTraceSimplePlayer:
PlatformApplicationAware

Public Member Functions

 EngineTraceSimplePlayer ()
 
 ~EngineTraceSimplePlayer ()
 
void playTrace (EngineController *game, std::vector< std::unique_ptr< PlatformEvent > > events, std::string_view traceDisplayPath, EngineTracePlaybackFlags flags)
 
bool isPlaying () const
 

Private Member Functions

void checkTime (const PaintEvent *paintEvent)
 
void checkRng (const PaintEvent *paintEvent)
 
- Private Member Functions inherited from PlatformApplicationAware
 ~PlatformApplicationAware ()=default
 
PlatformApplicationapplication () const
 
template<class T >
T * component () const
 
virtual void installNotify ()
 
virtual void removeNotify ()
 

Private Attributes

bool _playing = false
 
std::string _traceDisplayPath
 
EngineTracePlaybackFlags _flags
 

Friends

class PlatformIntrospection
 

Detailed Description

Component that can be used to play recorded events.

Note that this component is intentionally very dumb. Calling playTrace just plays all the passed events in sequence.

See also
EngineTracePlayer

Constructor & Destructor Documentation

◆ EngineTraceSimplePlayer()

EngineTraceSimplePlayer::EngineTraceSimplePlayer ( )
default

◆ ~EngineTraceSimplePlayer()

EngineTraceSimplePlayer::~EngineTraceSimplePlayer ( )
default

Member Function Documentation

◆ checkRng()

void EngineTraceSimplePlayer::checkRng ( const PaintEvent paintEvent)
private

◆ checkTime()

void EngineTraceSimplePlayer::checkTime ( const PaintEvent paintEvent)
private

◆ isPlaying()

bool EngineTraceSimplePlayer::isPlaying ( ) const
inline

◆ playTrace()

void EngineTraceSimplePlayer::playTrace ( EngineController game,
std::vector< std::unique_ptr< PlatformEvent > >  events,
std::string_view  traceDisplayPath,
EngineTracePlaybackFlags  flags 
)
Parameters
gameEngine controller.
eventsVector of events to play. Passed vector is consumed by this function.
traceDisplayPathPath to trace file that the events were loaded from. Used only for error reporting.
flagsPlayback flags.

Friends And Related Function Documentation

◆ PlatformIntrospection

friend class PlatformIntrospection
friend

Member Data Documentation

◆ _flags

EngineTracePlaybackFlags EngineTraceSimplePlayer::_flags
private

◆ _playing

bool EngineTraceSimplePlayer::_playing = false
private

◆ _traceDisplayPath

std::string EngineTraceSimplePlayer::_traceDisplayPath
private

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