SimpleGL  1.1.0
A framework for platform independent rendering
Public Member Functions | Static Public Member Functions | Protected Attributes | Static Protected Attributes | List of all members
sgl::Event Class Reference

This abstract class defines a event for the application. More...

#include <event.hpp>

Inheritance diagram for sgl::Event:
sgl::KeyEvent sgl::MouseButtonEvent

Public Member Functions

 Event (EventType type)
 Creates a new event. More...
 
virtual ~Event (void)
 Deletes a event. More...
 
EventType getType ()
 Returns the event type. More...
 

Static Public Member Functions

static std::vector< Event * > getEvents ()
 Returns the list of events. More...
 
static void addEvent (Event *event)
 Adds an event to the list. More...
 
static void clearEvents ()
 Clears the event list, this should be called after every loop. More...
 

Protected Attributes

EventType type
 Stores the event type. More...
 

Static Protected Attributes

static std::vector< Event * > events
 Stores the events that got received. More...
 

Detailed Description

This abstract class defines a event for the application.

Definition at line 42 of file event.hpp.

Constructor & Destructor Documentation

sgl::Event::Event ( EventType  type)

Creates a new event.

Parameters
typeThe event type of this event.

Definition at line 28 of file event.cpp.

sgl::Event::~Event ( void  )
virtual

Deletes a event.

Definition at line 33 of file event.cpp.

Member Function Documentation

void sgl::Event::addEvent ( Event event)
static

Adds an event to the list.

Parameters
eventThe event to add.

Definition at line 17 of file event.cpp.

void sgl::Event::clearEvents ( )
static

Clears the event list, this should be called after every loop.

Definition at line 23 of file event.cpp.

std::vector< Event * > sgl::Event::getEvents ( )
static

Returns the list of events.

Returns
The list of events.

Definition at line 13 of file event.cpp.

EventType sgl::Event::getType ( )

Returns the event type.

Returns
The event type.

Definition at line 37 of file event.cpp.

Member Data Documentation

std::vector< Event * > sgl::Event::events
staticprotected

Stores the events that got received.

Definition at line 46 of file event.hpp.

EventType sgl::Event::type
protected

Stores the event type.

Definition at line 49 of file event.hpp.


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