Arcade architecture
IEvent Class Referenceabstract

Abstract interface for event handling. More...

#include <IEvent.hpp>

Public Types

enum  event_t {
  UP , DOWN , LEFT , RIGHT ,
  SPACE , ENTER , ESCAPE , CLOSE ,
  NEXTGAME
}
 Enumeration of standard event types. More...
 

Public Member Functions

virtual ~IEvent ()=default
 Virtual destructor for the IEvent interface. More...
 
virtual void init ()=0
 Initialize the event system. More...
 
virtual int pollEvents ()=0
 Poll for events. More...
 
virtual void cleanup ()=0
 Clean up the event system. More...
 

Detailed Description

Abstract interface for event handling.

The IEvent interface provides a contract for managing events in the application. It includes methods for initialization, polling events, and cleanup. It also defines an enumeration for standard event types.

Member Enumeration Documentation

◆ event_t

Enumeration of standard event types.

This enumeration defines various types of events that can be handled by the application.

Enumerator
UP 

Event for moving up.

DOWN 

Event for moving down.

LEFT 

Event for moving left.

RIGHT 

Event for moving right.

SPACE 

Event for the space key.

ENTER 

Event for the enter key.

ESCAPE 

Event for the escape key.

CLOSE 

Event for closing the application.

NEXTGAME 

Event for switching to the next game.

Constructor & Destructor Documentation

◆ ~IEvent()

virtual IEvent::~IEvent ( )
virtualdefault

Virtual destructor for the IEvent interface.

Ensures proper cleanup of derived classes.

Member Function Documentation

◆ cleanup()

virtual void IEvent::cleanup ( )
pure virtual

Clean up the event system.

This method releases any resources or configurations used for event handling.

◆ init()

virtual void IEvent::init ( )
pure virtual

Initialize the event system.

This method is responsible for setting up any resources or configurations required for event handling.

◆ pollEvents()

virtual int IEvent::pollEvents ( )
pure virtual

Poll for events.

This method retrieves and processes events from the event queue.

Returns
An integer representing the status or result of the polling operation.

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