Gainput  v1.0.0
Public Member Functions | List of all members
gainput::InputPlayer Class Reference

Plays back a previously recorded sequence of device state changes. More...

#include <GainputInputPlayer.h>

Inheritance diagram for gainput::InputPlayer:
gainput::DeviceStateModifier

Public Member Functions

 InputPlayer (InputManager &manager, InputRecording *recording=0)
 Initializes the player. More...
 
 ~InputPlayer ()
 Destructs the player.
 
void Update (InputDeltaState *delta)
 Updates the player, called internally from InputManager::Update().
 
void Start ()
 Starts the playback. More...
 
void Stop ()
 Stops the Playback.
 
bool IsPlaying () const
 Returns if the player is currently playing.
 
void SetRecording (InputRecording *recording)
 Sets the recording to play.
 
InputRecordingGetRecording ()
 Returns the currently set recording.
 
const InputRecordingGetRecording () const
 Returns the currently set recording.
 

Detailed Description

Plays back a previously recorded sequence of device state changes.

In order for input recording to be available, Gainput must have been built with GAINPUT_ENABLE_RECORDER defined.

Examples:
/samples/recording/recordingsample.cpp.

Constructor & Destructor Documentation

◆ InputPlayer()

gainput::InputPlayer::InputPlayer ( InputManager manager,
InputRecording recording = 0 
)

Initializes the player.

Parameters
managerThe manager to receive the device state changes.
recordingThe recording to play, may be 0.

Member Function Documentation

◆ Start()

void gainput::InputPlayer::Start ( )

Starts the playback.

A recording must have been provided before doing this, either through the constructor or SetRecording().

Examples:
/samples/recording/recordingsample.cpp.

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