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
Collaboration diagram for df::InputManager:
Collaboration graph

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 since a singleton.

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

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 ( )

Get the one and only instance of the InputManager.

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

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 &  )

Don't allow assignment.

void df::InputManager::shutDown ( )

Revert back to normal window mode.

Reimplemented from df::Manager.

int df::InputManager::startUp ( )

Get window ready to capture input.

Return 0 if ok, else return -1;

Reimplemented from df::Manager.