#include <InputContext.h>
Inheritance diagram for cmil::defaultContext:
Public Member Functions | |
defaultContext (System *const sys) | |
Use the NodeSequencer by default. | |
virtual | ~defaultContext () |
std::string | getName () const |
void | captureNormal (ModAction *action) |
Ev::Sequence * | getCaptured () const |
bool | addCombo (const Ev &event) |
bool | addNormal (const Ev &event) |
bool | removeNormal (const Ev &event) |
void | update (const InputData &input) |
void | update (const ModData &input) |
Private Attributes | |
InputSequencer *const | m_sequencer |
Definition at line 42 of file InputContext.h.
cmil::defaultContext::defaultContext | ( | System *const | sys | ) | [inline] |
Use the NodeSequencer by default.
Definition at line 45 of file InputContext.h.
00045 : m_sequencer(new NodeSequencer(sys)) {};
virtual cmil::defaultContext::~defaultContext | ( | ) | [inline, virtual] |
Definition at line 47 of file InputContext.h.
References m_sequencer.
00047 { 00048 delete m_sequencer; 00049 }
bool cmil::defaultContext::addCombo | ( | const Ev & | event | ) | [virtual] |
Implements cmil::InputContext.
Definition at line 30 of file InputContext.cpp.
References cmil::InputSequencer::addCombo(), Logger::log_debug(), Logger::log_error(), and m_sequencer.
00030 { 00031 std::ostringstream seq_add_ss; 00032 seq_add_ss << "addCombo( sequence ) : deferring to sequencer->addCombo()."; 00033 log_debug(seq_add_ss.str()); 00034 log_debug(""); 00035 00036 if(!m_sequencer->addCombo(event)) { 00037 log_error("addCombo( sequence ) : sequence found invalid by sequencer, not adding."); 00038 return false; 00039 } 00040 00041 return true; 00042 }
Here is the call graph for this function:
bool cmil::defaultContext::addNormal | ( | const Ev & | event | ) | [virtual] |
Implements cmil::InputContext.
Definition at line 45 of file InputContext.cpp.
References cmil::InputSequencer::addNormal(), Logger::log_debug(), Logger::log_error(), and m_sequencer.
00045 { 00046 std::ostringstream seq_add_ss; 00047 seq_add_ss << "addNormal( sequence ) : deferring to sequencer->addNormal."; 00048 log_debug(seq_add_ss.str()); 00049 00050 if(!m_sequencer->addNormal(event)) { 00051 log_error("addNormal( sequence ) : sequence found invalid by sequencer, not adding."); 00052 return false; 00053 } 00054 00055 return true; 00056 }
Here is the call graph for this function:
void cmil::defaultContext::captureNormal | ( | ModAction * | action | ) | [virtual] |
Implements cmil::InputContext.
Definition at line 58 of file InputContext.cpp.
References cmil::InputSequencer::captureNormal(), and m_sequencer.
00058 { 00059 m_sequencer->captureNormal(action); 00060 }
Here is the call graph for this function:
Ev::Sequence * cmil::defaultContext::getCaptured | ( | ) | const [virtual] |
Implements cmil::InputContext.
Definition at line 62 of file InputContext.cpp.
References cmil::InputSequencer::getCaptured(), and m_sequencer.
00062 { 00063 return m_sequencer->getCaptured(); 00064 }
Here is the call graph for this function:
std::string cmil::defaultContext::getName | ( | ) | const [virtual] |
bool cmil::defaultContext::removeNormal | ( | const Ev & | event | ) | [virtual] |
Implements cmil::InputContext.
Definition at line 66 of file InputContext.cpp.
References Logger::log_debug(), Logger::log_error(), m_sequencer, and cmil::InputSequencer::removeNormal().
00066 { 00067 std::ostringstream seq_remove_ss; 00068 seq_remove_ss << "removeNormal( sequence ) : deferring to sequencer->removeNormal."; 00069 log_debug(seq_remove_ss.str()); 00070 00071 if(!m_sequencer->removeNormal(event)) { 00072 log_error("removeNormal( sequence ) : sequence found invalid by sequencer, not removeing."); 00073 return false; 00074 } 00075 00076 return true; 00077 }
Here is the call graph for this function:
void cmil::defaultContext::update | ( | const ModData & | input | ) | [virtual] |
Implements cmil::InputContext.
Definition at line 87 of file InputContext.cpp.
References cmil::InputSequencer::handle(), and m_sequencer.
00087 { 00088 m_sequencer->handle(input); 00089 }
Here is the call graph for this function:
void cmil::defaultContext::update | ( | const InputData & | input | ) | [virtual] |
Implements cmil::InputContext.
Definition at line 83 of file InputContext.cpp.
References cmil::InputSequencer::handle(), and m_sequencer.
00083 { 00084 m_sequencer->handle(input); 00085 }
Here is the call graph for this function:
InputSequencer* const cmil::defaultContext::m_sequencer [private] |
Definition at line 65 of file InputContext.h.
Referenced by addCombo(), addNormal(), captureNormal(), getCaptured(), removeNormal(), update(), and ~defaultContext().