InputDevice.h

Go to the documentation of this file.
00001 
00005 /* Copyright © 2009, 2010 James Legg.
00006     This program is free software: you can redistribute it and/or modify
00007     it under the terms of the GNU General Public License as published by
00008     the Free Software Foundation, either version 3 of the License, or
00009     (at your option) any later version.
00010 */
00011 #ifndef INPUTDEVICE_H_
00012 #define INPUTDEVICE_H_
00013 
00014 #include "Scene.h"
00015 
00016 namespace Engine
00017 {
00018 
00019 namespace GameObjects
00020 {
00021     class Car;
00022 }
00031 class InputDevice
00032 {
00033 public:
00034     InputDevice();
00035     virtual ~InputDevice();
00042     virtual int get_acceleration() = 0;
00048     virtual int get_slide() = 0;
00053     virtual int get_steering() = 0;
00054     
00057     virtual void poll() {};
00058     
00059     virtual void set_scene(Scene & scene);
00060     
00061     virtual void set_car(GameObjects::Car * car);
00062     
00063     std::set<InputDevice *>::iterator get_handle() const;
00064 protected:
00065     Scene * scene;
00066     GameObjects::Car * car;
00067     std::set<InputDevice *>::iterator handler_reference;
00072     void report(InputReport::ReportType type, int value = 0);
00073 };
00074 
00075 }
00076 
00077 #endif /*INPUTDEVICE_H_*/

Get Racer at SourceForge.net. Fast, secure and Free Open Source software downloads

Generated at Mon Sep 6 00:41:12 2010 by Doxygen version 1.4.7 for Racer version svn335.