Home | Namespaces | Hierarchy | Alphabetical List | Class list | Files | Namespace Members | Class members | File members
E:/Programming/MyProject/K_Game_hg/GameEngine/include/input/InputManager.h
Go to the documentation of this file.
00001 // Copyright 2006-2011 by Kat'Oun
00002 
00003 #ifndef _INPUT_MANAGER_H_
00004 #define _INPUT_MANAGER_H_
00005 
00006 #include <EngineConfig.h>
00007 #include <core/Types.h>
00008 #include <core/Singleton.h>
00009 #include <core/Position2d.h>
00010 #include <engine/Object.h>
00011 
00012 #include <map>
00013 
00014 namespace input
00015 {
00016 
00017 class Cursor;
00018 class InputDriver;
00019 class InputDevice;
00020 enum InputType;
00021 
00022 class ENGINE_PUBLIC_EXPORT InputManager: public engine::Object, public core::Singleton<InputManager>
00023 {
00024 public:
00025         
00027         InputManager();
00028 
00029         ~InputManager();
00030 
00031         void start();
00032 
00033         void stop();
00034 
00036         s32 numJoySticks();
00037 
00039         s32 numMice();
00040 
00042         s32 numKeyboards();
00043 
00044         InputDevice* createInputDevice(InputType type, bool buffered);
00045 
00046         void removeInputDevice(InputDevice* device);
00047         void removeInputDevice(const u32& id);
00048 
00049         void removeAllInputDevices();
00050 
00051         Cursor* getCursor();
00052 
00053         void setInputDriver(InputDriver* driver);
00054         void removeInputDriver();
00055 
00056         static InputManager* getInstance();
00057 
00058 protected:
00059 
00060         void initializeImpl();
00061         void uninitializeImpl();
00062         void updateImpl(f32 elapsedTime);
00063 
00064         std::map<u32, InputDevice*> mInputDevices;
00065 
00066         Cursor* mCursor;
00067 
00068         core::position2d mCursorCenter;
00069 
00070         InputDriver* mInputDriver;
00071 };
00072 
00073 } // end namespace input
00074 
00075 #endif

The KG Game Engine
The KG Game Engine Documentation © 2006-2011 by Kat'Oun. Generated on Sat Jul 2 2011 00:50:04 by Doxygen (1.7.4)