#include <InputArbitrator.h>
Inheritance diagram for cmil::InputArbitrator:


Public Member Functions | |
| InputData *const | getData (const Ev &event) const |
| ~InputArbitrator () | |
| std::string | getDefaultDevice () const |
| std::string | getName () const |
| void | quit () |
Protected Member Functions | |
| void | registerDevice (InputDevice &dev) |
| void | registerDevices (DeviceRegistry &dev) |
| const bool | isActionCompatible (int id, InputAction *action) const |
| const int | getID (const Ev &event) const |
| InputData *const | getData (int id) const |
| int | getSize () const |
| void | update (const InputData &input) |
| void | update (const ModData &input) |
| void | attach (InputActor *const actor) |
Private Member Functions | |
| InputArbitrator (DeviceRegistry *reg) | |
| InputArbitrator () | |
| InputArbitrator (const InputArbitrator &) | |
| InputArbitrator & | operator= (const InputArbitrator &) |
Private Attributes | |
| DeviceRegistry * | m_registry |
| InputActor * | m_pActor |
Friends | |
| class | InputTranslator |
| class | System |
Definition at line 26 of file InputArbitrator.h.
| cmil::InputArbitrator::~InputArbitrator | ( | ) | [inline] |
Definition at line 32 of file InputArbitrator.h.
References cmil::DeviceRegistry::cleanup(), Logger::log_debug(), and m_registry.
00032 { 00033 log_debug("dtor"); 00034 m_registry->cleanup() ; delete m_registry; 00035 };
Here is the call graph for this function:

| cmil::InputArbitrator::InputArbitrator | ( | DeviceRegistry * | reg | ) | [inline, private] |
| cmil::InputArbitrator::InputArbitrator | ( | ) | [inline, private] |
Definition at line 65 of file InputArbitrator.h.
00065 : m_registry(new DeviceRegistry()), m_pActor(NULL) {};
| cmil::InputArbitrator::InputArbitrator | ( | const InputArbitrator & | ) | [private] |
| void cmil::InputArbitrator::attach | ( | InputActor *const | actor | ) | [protected] |
Definition at line 69 of file InputArbitrator.cpp.
References m_pActor.
Referenced by cmil::System::attach().
00069 { 00070 m_pActor = actor; 00071 }
Here is the caller graph for this function:

| InputData *const cmil::InputArbitrator::getData | ( | int | id | ) | const [protected] |
Definition at line 46 of file InputArbitrator.cpp.
References cmil::DeviceRegistry::getData(), and m_registry.
00046 { 00047 return m_registry->getData(id); 00048 }
Here is the call graph for this function:

Definition at line 50 of file InputArbitrator.cpp.
References cmil::DeviceRegistry::getData(), and m_registry.
Referenced by cmil::System::getData(), and isActionCompatible().
00050 { 00051 return m_registry->getData(event); 00052 }
Here is the call graph for this function:

Here is the caller graph for this function:

| string cmil::InputArbitrator::getDefaultDevice | ( | ) | const |
Definition at line 42 of file InputArbitrator.cpp.
References cmil::DeviceRegistry::getDefaultDevice(), and m_registry.
00042 { 00043 return m_registry->getDefaultDevice(); 00044 }
Here is the call graph for this function:

| const int cmil::InputArbitrator::getID | ( | const Ev & | event | ) | const [protected] |
Definition at line 54 of file InputArbitrator.cpp.
References cmil::DeviceRegistry::getID(), and m_registry.
Referenced by cmil::System::getID().
00054 { 00055 return m_registry->getID(event); 00056 }
Here is the call graph for this function:

Here is the caller graph for this function:

| std::string cmil::InputArbitrator::getName | ( | ) | const [inline, virtual] |
| int cmil::InputArbitrator::getSize | ( | ) | const [protected] |
Definition at line 58 of file InputArbitrator.cpp.
References cmil::DeviceRegistry::getSize(), and m_registry.
Referenced by cmil::System::getSize().
00058 { 00059 return m_registry->getSize(); 00060 }
Here is the call graph for this function:

Here is the caller graph for this function:

| const bool cmil::InputArbitrator::isActionCompatible | ( | int | id, | |
| InputAction * | action | |||
| ) | const [protected] |
Definition at line 62 of file InputArbitrator.cpp.
References getData(), cmil::InputData::getName(), cmil::InputData::isActionCompatible(), and Logger::log_debug().
Referenced by cmil::System::isActionCompatible().
00062 { 00063 std::ostringstream debug_ss; 00064 debug_ss << "isActionCompatible() deferring to data with id: " << id << "and name: " << getData(id)->getName(); 00065 log_debug(debug_ss.str() ); 00066 return getData(id)->isActionCompatible(action); 00067 }
Here is the call graph for this function:

Here is the caller graph for this function:

| InputArbitrator& cmil::InputArbitrator::operator= | ( | const InputArbitrator & | ) | [private] |
| void cmil::InputArbitrator::quit | ( | ) |
Definition at line 96 of file InputArbitrator.cpp.
References Logger::log_debug(), m_pActor, and cmil::InputActor::quit().
Referenced by cmil::System::quit().
00096 { 00097 if(m_pActor) 00098 m_pActor->quit(); 00099 else 00100 log_debug( "update() no InputActor set, can't send quit signal." ); 00101 }
Here is the call graph for this function:

Here is the caller graph for this function:

| void cmil::InputArbitrator::registerDevice | ( | InputDevice & | dev | ) | [protected] |
Definition at line 78 of file InputArbitrator.cpp.
References m_registry, and cmil::DeviceRegistry::registerDevice().
00078 { 00079 m_registry->registerDevice(dev); 00080 }
Here is the call graph for this function:

| void cmil::InputArbitrator::registerDevices | ( | DeviceRegistry & | dev | ) | [protected] |
Definition at line 73 of file InputArbitrator.cpp.
References Logger::log_debug(), m_registry, and cmil::DeviceRegistry::mergeRegistry().
Referenced by cmil::System::registerDevices().
00073 { 00074 log_debug("registerDevices()"); 00075 m_registry->mergeRegistry(dev); 00076 }
Here is the call graph for this function:

Here is the caller graph for this function:

| void cmil::InputArbitrator::update | ( | const ModData & | input | ) | [protected] |
Definition at line 82 of file InputArbitrator.cpp.
References Logger::log_debug(), m_pActor, and cmil::InputActor::update().
00082 { 00083 if(m_pActor) 00084 m_pActor->update(input); 00085 else 00086 log_debug("update() no InputActor set, can't update." ); 00087 }
Here is the call graph for this function:

| void cmil::InputArbitrator::update | ( | const InputData & | input | ) | [protected] |
Definition at line 89 of file InputArbitrator.cpp.
References Logger::log_debug(), m_pActor, and cmil::InputActor::update().
Referenced by cmil::System::update().
00089 { 00090 if(m_pActor) 00091 m_pActor->update(input); 00092 else 00093 log_debug( "update() no InputActor set, can't update." ); 00094 }
Here is the call graph for this function:

Here is the caller graph for this function:

friend class InputTranslator [friend] |
Definition at line 45 of file InputArbitrator.h.
friend class System [friend] |
Definition at line 46 of file InputArbitrator.h.
InputActor* cmil::InputArbitrator::m_pActor [private] |
DeviceRegistry* cmil::InputArbitrator::m_registry [private] |
Definition at line 65 of file InputArbitrator.h.
Referenced by getData(), getDefaultDevice(), getID(), getSize(), registerDevice(), registerDevices(), and ~InputArbitrator().
1.4.7