Dragonfly  4.3
A text-based game engine
Public Member Functions | Static Public Member Functions | Private Member Functions | List of all members
df::InputManager Class Reference
Inheritance diagram for df::InputManager:
Inheritance graph
[legend]
Collaboration diagram for df::InputManager:
Collaboration graph
[legend]

Public Member Functions

bool isValid (std::string event_type) const
 
int startUp ()
 
void shutDown ()
 
void getInput ()
 
- Public Member Functions inherited from df::Manager
std::string getType () const
 
bool isStarted () const
 
int onEvent (const Event *p_event) const
 
int registerInterest (Object *p_o, std::string event_type)
 
int unregisterInterest (Object *p_o, std::string event_type)
 

Static Public Member Functions

static InputManagergetInstance ()
 

Private Member Functions

 InputManager ()
 
 InputManager (InputManager const &)
 
void operator= (InputManager const &)
 

Additional Inherited Members

- Protected Member Functions inherited from df::Manager
void setType (std::string new_type)
 

Constructor & Destructor Documentation

df::InputManager::InputManager ( )
private

Private since a singleton.

df::InputManager::InputManager ( InputManager const &  )
private

Don't allow copy.

Member Function Documentation

void df::InputManager::getInput ( )

Get input from the keyboard and mouse.

Pass event along to all interested Objects.

static InputManager& df::InputManager::getInstance ( )
static

Get the one and only instance of the InputManager.

bool df::InputManager::isValid ( std::string  event_type) const
virtual

Input manager only accepts keyboard and mouse events.

Return false if not one of them.

Reimplemented from df::Manager.

void df::InputManager::operator= ( InputManager const &  )
private

Don't allow assignment.

void df::InputManager::shutDown ( )
virtual

Revert back to normal window mode.

Reimplemented from df::Manager.

int df::InputManager::startUp ( )
virtual

Get window ready to capture input.

Return 0 if ok, else return -1;

Reimplemented from df::Manager.