Public Member Functions | Protected Attributes | Private Attributes

test_utils::event_node Class Reference

Base class for all event nodes to be used to fire fake input events. More...

#include <fake_event_source.hpp>

Inheritance diagram for test_utils::event_node:
Inheritance graph
[legend]

List of all members.

Public Member Functions

 event_node (const size_t time, const SDL_Event &event)
 Base class for all event nodes to be used to fire fake input events.
virtual ~event_node ()
virtual void fire_event ()
 Used to fire sdl event stored in this object.
bool test_if_should_fire (const size_t frame_count) const
 Test if this event should fire now.
bool is_fired () const
bool operator< (const event_node &o) const
 We want the smallestat the top.

Protected Attributes

SDL_Event event_

Private Attributes

size_t time_
bool fired_

Detailed Description

Base class for all event nodes to be used to fire fake input events.

Definition at line 40 of file fake_event_source.hpp.


Constructor & Destructor Documentation

test_utils::event_node::event_node ( const size_t  time,
const SDL_Event &  event 
)

Base class for all event nodes to be used to fire fake input events.

Definition at line 26 of file fake_event_source.cpp.

test_utils::event_node::~event_node (  )  [virtual]

Definition at line 29 of file fake_event_source.cpp.


Member Function Documentation

void test_utils::event_node::fire_event (  )  [virtual]

Used to fire sdl event stored in this object.

Child class may extend or override functionality

Reimplemented in test_utils::event_node_keyboard, test_utils::event_node_mouse_motion, test_utils::event_node_mouse_click, and test_utils::end_position_collector.

Definition at line 32 of file fake_event_source.cpp.

References event_, fired_, and mask.

bool test_utils::event_node::is_fired (  )  const
Returns:
true if this event has fired

Definition at line 48 of file fake_event_source.cpp.

References fired_.

bool test_utils::event_node::operator< ( const event_node o  )  const

We want the smallestat the top.

Definition at line 56 of file fake_event_source.cpp.

References time_.

bool test_utils::event_node::test_if_should_fire ( const size_t  frame_count  )  const

Test if this event should fire now.

Returns:
true if this should stop firing events

Definition at line 43 of file fake_event_source.cpp.

References time_.


Member Data Documentation

SDL_Event test_utils::event_node::event_ [protected]

Definition at line 44 of file fake_event_source.hpp.

Referenced by fire_event(), and is_fired().

Definition at line 43 of file fake_event_source.hpp.

Referenced by operator<(), and test_if_should_fire().


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Generated by doxygen 1.7.1 on Thu May 24 2012 01:26:07 for The Battle for Wesnoth
Gna! | Forum | Wiki | CIA | devdocs