Claypool

Courses

Publications

Students

Projects

Service

Downloads

Misc


Dragonfly: InputManager.h Source File
Dragonfly 2.2
A text-based game engine

InputManager.h

00001 ///
00002 /// The input manager
00003 ///
00004 
00005 #ifndef __INPUT_MANAGER_H__
00006 #define __INPUT_MANAGER_H__
00007 
00008 #include "Manager.h"
00009 
00010 class InputManager : public Manager {
00011 
00012  private:
00013   InputManager();                      ///< Private since a singleton.
00014   InputManager (InputManager const&);  ///< Don't allow copy.
00015   void operator=(InputManager const&); ///< Don't allow assignment.
00016 
00017  public:
00018   ~InputManager();
00019 
00020   /// Get the one and only instance of the GraphicsManager.
00021   static InputManager &getInstance();
00022 
00023   /// \brief Input manager only accepts keyboard and mouse events.
00024   /// Return false if not one of them.
00025   bool isValid(string event_name);
00026 
00027   /// Get terminal ready to capture input.  Return 0 if ok, else negative num1.
00028   int startUp();
00029 
00030   /// Revert back to normal terminal mode.
00031   void shutDown();
00032 
00033   /// \brief Get input from the keyboard and mouse.
00034   /// For each object interested, pass event along.
00035   void getInput();
00036 };
00037 
00038 #endif //__INPUT_MANAGER_H__
00039 
 All Classes Functions Variables Friends