Rally X
ELEN3009 Project by Justin Wernick and David Schneider
Public Member Functions | Private Attributes | Static Private Attributes
AllegroKeyboardInit Class Reference

Class ensures that Allegro's keyboard is installed and uninstalled when appropriate. More...

#include <AllegroWrappers.h>

List of all members.

Public Member Functions

 AllegroKeyboardInit ()
 Constructor calls al_install_keyboard() if it is the first instance.
 AllegroKeyboardInit (const AllegroKeyboardInit &ref)
 Copy constructor, implemented to be included in instance count.
 ~AllegroKeyboardInit ()
 Destructor calls al_uninstall_keyboard() if it is the last instant.

Private Attributes

AllegroInit _allegro
 Depends on Allegro being initialised.

Static Private Attributes

static int _initCount = 0
 Count of the current number of initialised AllegroKeyboardInit objects.

Detailed Description

Class ensures that Allegro's keyboard is installed and uninstalled when appropriate.

Any classes that use the keyboard for input should include this class as a data member. This class includes AllegroInit, so both of them do not need to be included.

Author:
Justin Wernick
David Schneider

Definition at line 57 of file AllegroWrappers.h.


Constructor & Destructor Documentation

AllegroKeyboardInit::AllegroKeyboardInit ( )

Constructor calls al_install_keyboard() if it is the first instance.

Definition at line 41 of file AllegroWrappers.cpp.

AllegroKeyboardInit::AllegroKeyboardInit ( const AllegroKeyboardInit ref)

Copy constructor, implemented to be included in instance count.

Definition at line 53 of file AllegroWrappers.cpp.

AllegroKeyboardInit::~AllegroKeyboardInit ( )

Destructor calls al_uninstall_keyboard() if it is the last instant.

Definition at line 65 of file AllegroWrappers.cpp.


Member Data Documentation

Depends on Allegro being initialised.

Definition at line 74 of file AllegroWrappers.h.

int AllegroKeyboardInit::_initCount = 0 [static, private]

Count of the current number of initialised AllegroKeyboardInit objects.

Definition at line 73 of file AllegroWrappers.h.


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