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

Records a sequence of button state changes. More...

#include <GainputInputRecorder.h>

Public Member Functions

 InputRecorder (InputManager &manager)
 Initializes the recorder. More...
 
 ~InputRecorder ()
 Destructs the recorder.
 
void Start ()
 Starts recording. More...
 
void Stop ()
 Stops recording.
 
bool IsRecording () const
 Returns if the recorder is currently recording.
 
void AddDeviceToRecord (DeviceId device)
 Adds a device to record the button state changes of. More...
 
bool IsDeviceToRecord (DeviceId device)
 Returns if the given device should be recorded. More...
 
InputRecordingGetRecording ()
 Returns the recording that is being recorded to, may be 0.
 
const InputRecordingGetRecording () const
 Returns the recording that is being recorded to, may be 0.
 
uint64_t GetStartTime () const
 Returns the time the recording was started.
 

Detailed Description

Records a sequence of button 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

◆ InputRecorder()

gainput::InputRecorder::InputRecorder ( InputManager manager)

Initializes the recorder.

Parameters
managerThe InputManager to receive button state changes from.

Member Function Documentation

◆ AddDeviceToRecord()

void gainput::InputRecorder::AddDeviceToRecord ( DeviceId  device)
inline

Adds a device to record the button state changes of.

If no device is set, all devices are recorded.

Parameters
deviceThe ID of the device to record.
Examples:
/samples/recording/recordingsample.cpp.

◆ IsDeviceToRecord()

bool gainput::InputRecorder::IsDeviceToRecord ( DeviceId  device)
inline

Returns if the given device should be recorded.

Parameters
deviceThe ID of the device to check.

◆ Start()

void gainput::InputRecorder::Start ( )

Starts recording.

Also clears the InputRecording that is being recorded to so that it's not possible to resume recording after stopping to record.

Examples:
/samples/recording/recordingsample.cpp.

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