SuperTuxKart
Loading...
Searching...
No Matches
Public Member Functions | List of all members
EventRewinder Class Referenceabstract

A simple class that defines an interface to event rewinding: an undo() function when going back in time, and a replay() function when going forward, replaying the event. More...

#include <event_rewinder.hpp>

Inheritance diagram for EventRewinder:
Inheritance graph
[legend]

Public Member Functions

 EventRewinder ()
 Constructor.
 
virtual ~EventRewinder ()
 Destructor.
 
virtual void undo (BareNetworkString *buffer)=0
 Called when an event needs to be undone.
 
virtual void rewind (BareNetworkString *buffer)=0
 Called when an event needs to be replayed.
 

Detailed Description

A simple class that defines an interface to event rewinding: an undo() function when going back in time, and a replay() function when going forward, replaying the event.

Constructor & Destructor Documentation

◆ EventRewinder()

EventRewinder::EventRewinder ( )

Constructor.

It will add this object to the list of all rewindable objects in the rewind manager.

Member Function Documentation

◆ rewind()

virtual void EventRewinder::rewind ( BareNetworkString buffer)
pure virtual

Called when an event needs to be replayed.

This is called during rewind, i.e. when going forward in time again.

Implemented in GameProtocol, and DummyRewinder.

◆ undo()

virtual void EventRewinder::undo ( BareNetworkString buffer)
pure virtual

Called when an event needs to be undone.

This is called while going backwards for rewinding - all stored events will get an 'undo' call.

Implemented in GameProtocol, and DummyRewinder.


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