#include <src/ois/OISInputManager.h>
Public Types | |
enum | AddOnFactories { AddOn_All = 0, AddOn_LIRC = 1, AddOn_WiiMote = 2 } |
All generic devices OIS supports internally (if they are compiled in). More... | |
Public Member Functions | |
void | addFactoryCreator (FactoryCreator *factory) |
Object * | createInputObject (Type iType, bool bufferMode, const std::string &vendor="") |
void | destroyInputObject (Object *obj) |
void | enableAddOnFactory (AddOnFactories factory) |
int | getNumberOfDevices (Type iType) |
const std::string & | getVersionName () |
const std::string & | inputSystemName () |
DeviceList | listFreeDevices () |
void | removeFactoryCreator (FactoryCreator *factory) |
Static Public Member Functions | |
static InputManager * | createInputSystem (ParamList ¶mList) |
static InputManager * | createInputSystem (std::size_t winHandle) |
static void | destroyInputSystem (InputManager *manager) |
static unsigned int | getVersionNumber () |
Protected Member Functions | |
virtual void | _initialize (ParamList ¶mList)=0 |
InputManager (const std::string &name) | |
virtual | ~InputManager () |
Protected Attributes | |
LIRCFactoryCreator * | m_lircSupport |
Extra factory (not enabled by default). | |
const std::string | m_VersionName |
OIS Version name. | |
WiiMoteFactoryCreator * | m_wiiMoteSupport |
FactoryList | mFactories |
FactoryCreator list. | |
FactoryCreatedObject | mFactoryObjects |
Factory created objects - useful so we can find creator to send destruction request to. | |
const std::string | mInputSystemName |
Name of the input system. |
All generic devices OIS supports internally (if they are compiled in).
InputManager::InputManager | ( | const std::string & | name | ) | [protected] |
InputManager::~InputManager | ( | ) | [protected, virtual] |
References m_lircSupport, and m_wiiMoteSupport.
virtual void OIS::InputManager::_initialize | ( | ParamList & | paramList | ) | [protected, pure virtual] |
Implemented in OIS::LinuxInputManager, OIS::MacInputManager, and OIS::Win32InputManager.
Referenced by createInputSystem().
void InputManager::addFactoryCreator | ( | FactoryCreator * | factory | ) |
factory | Factory instance to add Make sure you do not delete the factory before devices created from the factory are destroyed (either by calling RemoveFactoryCreator, or shutting down the input system). Order should be something like the following: Create Input System Create Factory Instance AddFactoryCreator(factory) Create a device from the InputManager (device created by factory) One of the follwoing: removeFactoryCreator(factory) inputManager->destroyInputObject(obj) destroyInputSystem(inputManager) destroy Factory Instance You can safely delete the factory instance once you have removed it or shut down the input manager. |
References mFactories.
Referenced by enableAddOnFactory().
Object * InputManager::createInputObject | ( | Type | iType, | |
bool | bufferMode, | |||
const std::string & | vendor = "" | |||
) |
References OIS::Object::_initialize(), destroyInputObject(), OIS::E_InputDeviceNonExistant, mFactories, mFactoryObjects, and OIS_EXCEPT.
Referenced by orxonox::InputManager::_initialiseJoySticks(), orxonox::InputManager::_initialiseKeyboard(), and orxonox::InputManager::_initialiseMouse().
InputManager * InputManager::createInputSystem | ( | ParamList & | paramList | ) | [static] |
paramList | ParamList contains OS specific info (such as HWND and HINSTANCE for window apps), and access mode. |
References _initialize(), OIS::E_General, and OIS_EXCEPT.
InputManager * InputManager::createInputSystem | ( | std::size_t | winHandle | ) | [static] |
winHandle | Contains OS specific window handle (such as HWND or X11 Window) |
Referenced by orxonox::InputManager::initialise().
void InputManager::destroyInputObject | ( | Object * | obj | ) |
References OIS::E_General, mFactoryObjects, and OIS_EXCEPT.
Referenced by orxonox::InputManager::_destroyJoySticks(), orxonox::InputManager::_destroyKeyboard(), orxonox::InputManager::_destroyMouse(), and createInputObject().
void InputManager::destroyInputSystem | ( | InputManager * | manager | ) | [static] |
manager | Manager to destroy |
References mFactoryObjects.
Referenced by orxonox::InputManager::_reload(), orxonox::InputManager::initialise(), and orxonox::InputManager::~InputManager().
void InputManager::enableAddOnFactory | ( | AddOnFactories | factory | ) |
References addFactoryCreator(), AddOn_All, AddOn_LIRC, AddOn_WiiMote, m_lircSupport, and m_wiiMoteSupport.
int InputManager::getNumberOfDevices | ( | Type | iType | ) |
iType | Type that you are interested in |
References mFactories.
Referenced by orxonox::InputManager::_initialiseJoySticks(), orxonox::InputManager::_initialiseKeyboard(), and orxonox::InputManager::_initialiseMouse().
const std::string & InputManager::getVersionName | ( | ) |
References m_VersionName.
unsigned int InputManager::getVersionNumber | ( | ) | [static] |
References OIS_VERSION.
const std::string & InputManager::inputSystemName | ( | ) |
DeviceList InputManager::listFreeDevices | ( | ) |
References mFactories.
void InputManager::removeFactoryCreator | ( | FactoryCreator * | factory | ) |
factory | Factory object to remove. Removing a factory will automatically destroy any Objects created from the factory |
References mFactories, and mFactoryObjects.
LIRCFactoryCreator* OIS::InputManager::m_lircSupport [protected] |
const std::string OIS::InputManager::m_VersionName [protected] |
WiiMoteFactoryCreator* OIS::InputManager::m_wiiMoteSupport [protected] |
Referenced by enableAddOnFactory(), and ~InputManager().
FactoryList OIS::InputManager::mFactories [protected] |
Factory created objects - useful so we can find creator to send destruction request to.
Referenced by createInputObject(), destroyInputObject(), destroyInputSystem(), and removeFactoryCreator().
const std::string OIS::InputManager::mInputSystemName [protected] |
Name of the input system.
Referenced by OIS::Win32InputManager::freeDeviceList(), OIS::MacInputManager::freeDeviceList(), OIS::LinuxInputManager::freeDeviceList(), inputSystemName(), OIS::Win32InputManager::vendorExist(), OIS::MacInputManager::vendorExist(), and OIS::LinuxInputManager::vendorExist().