[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Usata-commits] Changes to usata2/src/input-system.hpp
From: |
David Lau |
Subject: |
[Usata-commits] Changes to usata2/src/input-system.hpp |
Date: |
Fri, 25 Feb 2005 14:50:49 -0500 |
Index: usata2/src/input-system.hpp
diff -u usata2/src/input-system.hpp:1.3 usata2/src/input-system.hpp:1.4
--- usata2/src/input-system.hpp:1.3 Tue Jan 25 19:26:33 2005
+++ usata2/src/input-system.hpp Fri Feb 25 19:50:47 2005
@@ -10,7 +10,7 @@
// included in the software distribution, or visit
// http://www.fsf.org/licenses/gpl.html.
//
-// $Id: input-system.hpp,v 1.3 2005/01/25 19:26:33 skunix Exp $
+// $Id: input-system.hpp,v 1.4 2005/02/25 19:50:47 skunix Exp $
#ifndef USATA_INPUT_SYSTEM_HPP
#define USATA_INPUT_SYSTEM_HPP
@@ -93,35 +93,26 @@
{
};
-
class Driver
{
- std::string mName;
+ protected:
+ std::string mName;
public:
+ Driver(const std::string& pName);
+ virtual ~Driver();
+ virtual Event* next()=0;
+ virtual void update()=0;
- typedef enum { KEYBOARD, MOUSE, JOYSTICK }
DeviceType;
- Driver(const std::string& name);
- virtual ~Driver() throw();
-
- virtual bool supports(DeviceType type)=0;
- virtual bool enable(DeviceType type, bool)=0;
- virtual void configure() = 0;
-
- virtual void update() = 0;
- virtual Event* next() = 0;
-
- };
- typedef boost::shared_ptr<Driver> Driver_sp;
- class Translator
- {
+ const std::string& name();
};
+
+ typedef boost::shared_ptr<Driver> Driver_sp;
class Manager
{
- typedef std::vector<Driver_sp> DriversV;
-
+ typedef std::vector<Driver_sp> DriversV;
+
DriversV mDrivers;
-
public:
typedef boost::function<void(Event*)>
EventHandler;
@@ -135,13 +126,14 @@
void trim(void);
void add_driver(Driver*);
+
void process();
~Manager();
private:
EventHandlerStack mEvhStack;
};
- Driver * default_driver();
+ Driver *default_driver();
}
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Usata-commits] Changes to usata2/src/input-system.hpp,
David Lau <=