Public Member Functions | Public Attributes | Static Public Attributes

a5::Event Class Reference
[Event]

Base class for event messages. More...

#include <Event.hpp>

Inheritance diagram for a5::Event:
Inheritance graph

List of all members.

Public Member Functions

 Event (const Event_Source *source_, int type_id_)
 Sets the event source.
unsigned int Type () const
 Returns the Type ID of the event Returns 0 (User_Type) for all user events.
virtual unsigned int SubType () const
 Returns the subtype ID of the event Returns the same as Type() for event types with no sub-types Returns 0 for all user events.
 operator ALLEGRO_EVENT * () const
 Returns a pointer to the Allegro event.
virtual ~Event ()
 Customary virtual destructor for base types.

Public Attributes

ALLEGRO_EVENT * raw
const Event_Sourcesource
 Pointer to the Event_Source that emitted the event.

Static Public Attributes

static const unsigned int User_Type = 0x00000000

Detailed Description

Base class for event messages.


Constructor & Destructor Documentation

a5::Event::Event ( const Event_Source source_,
int  type_id_ 
)

Sets the event source.

virtual a5::Event::~Event (  )  [virtual]

Customary virtual destructor for base types.


Member Function Documentation

unsigned int a5::Event::Type (  )  const

Returns the Type ID of the event Returns 0 (User_Type) for all user events.

virtual unsigned int a5::Event::SubType (  )  const [virtual]

Returns the subtype ID of the event Returns the same as Type() for event types with no sub-types Returns 0 for all user events.

Reimplemented in a5::Display::Event, a5::Keyboard::Event, a5::Mouse::Event, and a5::Timer::Event.

a5::Event::operator ALLEGRO_EVENT * (  )  const

Returns a pointer to the Allegro event.


Member Data Documentation

Pointer to the Event_Source that emitted the event.

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Defines