#include <InputNode.h>
Inheritance diagram for cmil::NodeSequencer:
Public Member Functions | |
NodeSequencer (System *const sys) | |
virtual | ~NodeSequencer () |
std::string | getName () const |
bool | imp_handle (const ModData &input) |
bool | imp_handle (const InputData &input) |
Private Member Functions | |
Ev::Sequence * | capture (const ModData &input) |
This should return a non-null sequence once a valid one is received. | |
bool | imp_addNormal (const Ev::Sequence &seq) |
bool | imp_removeNormal (const Ev::Sequence &seq) |
bool | imp_addCombo (const Ev::Sequence &seq) |
bool | isCombo (const Ev::Sequence &seq) const |
This function should provide validation of combo style sequences for clients. | |
bool | isNormal (const Ev::Sequence &seq) const |
This function should provide validation of regular sequences for clients. | |
Private Attributes | |
ComboHandler | m_chandler |
NormalHandler | m_nhandler |
This my first stab at fast/optomized random accessed handling sequences, though one could very easily impliment a simpler, possibly slower sequencer which just compares plain event sequences instead.
Definition at line 257 of file InputNode.h.
cmil::NodeSequencer::NodeSequencer | ( | System *const | sys | ) | [inline] |
virtual cmil::NodeSequencer::~NodeSequencer | ( | ) | [inline, virtual] |
Ev::Sequence * cmil::NodeSequencer::capture | ( | const ModData & | input | ) | [private, virtual] |
This should return a non-null sequence once a valid one is received.
If it's an active input, add it to the sequence.
It's inactive, run the stop action and return whatever sequence was provided
still capturing
Implements cmil::InputSequencer.
Definition at line 672 of file InputNode.cpp.
References cmil::InputData::createEv(), cmil::InputData::getState(), cmil::InputSequencer::m_captured, cmil::InputSequencer::m_stop_capture_action, and cmil::tInputData< ActionType >::run().
00672 { 00674 if(input.getState()) { 00675 if(m_captured == NULL) 00676 m_captured = new Ev::Sequence(); 00677 00678 m_captured->push_back(input.createEv()); 00679 } 00680 else { 00682 00683 input.run(m_stop_capture_action); 00684 00685 if(m_captured) 00686 return m_captured; 00687 } 00688 00690 return NULL; 00691 };
Here is the call graph for this function:
std::string cmil::NodeSequencer::getName | ( | ) | const [inline, virtual] |
bool cmil::NodeSequencer::imp_addCombo | ( | const Ev::Sequence & | seq | ) | [inline, private, virtual] |
Implements cmil::InputSequencer.
Definition at line 293 of file InputNode.h.
References cmil::ComboHandler::add(), and m_chandler.
00293 { 00294 return m_chandler.add(seq); 00295 }
Here is the call graph for this function:
bool cmil::NodeSequencer::imp_addNormal | ( | const Ev::Sequence & | seq | ) | [inline, private, virtual] |
Implements cmil::InputSequencer.
Definition at line 285 of file InputNode.h.
References cmil::NormalHandler::add(), and m_nhandler.
00285 { 00286 return m_nhandler.add(seq); 00287 }
Here is the call graph for this function:
bool cmil::NodeSequencer::imp_handle | ( | const InputData & | input | ) | [inline, virtual] |
Implements cmil::InputSequencer.
Definition at line 274 of file InputNode.h.
References cmil::ComboHandler::handle(), cmil::NormalHandler::handle(), m_chandler, and m_nhandler.
00274 { 00275 bool normal_success, combo_success; 00276 00277 //return m_nhandler.handle(input); 00278 normal_success = m_nhandler.handle(input); 00279 combo_success = m_chandler.handle(input); 00280 return (combo_success || normal_success); 00281 }
Here is the call graph for this function:
bool cmil::NodeSequencer::imp_handle | ( | const ModData & | input | ) | [inline, virtual] |
Implements cmil::InputSequencer.
Definition at line 265 of file InputNode.h.
References cmil::ComboHandler::handle(), cmil::NormalHandler::handle(), m_chandler, and m_nhandler.
00265 { 00266 bool normal_success, combo_success; 00267 00268 //return m_nhandler.handle(input); 00269 normal_success = m_nhandler.handle(input); 00270 combo_success = m_chandler.handle(input); 00271 return (combo_success || normal_success); 00272 }
Here is the call graph for this function:
bool cmil::NodeSequencer::imp_removeNormal | ( | const Ev::Sequence & | seq | ) | [inline, private, virtual] |
Implements cmil::InputSequencer.
Definition at line 289 of file InputNode.h.
References m_nhandler, and cmil::NormalHandler::remove().
00289 { 00290 return m_nhandler.remove(seq); 00291 }
Here is the call graph for this function:
bool cmil::NodeSequencer::isCombo | ( | const Ev::Sequence & | seq | ) | const [inline, private, virtual] |
This function should provide validation of combo style sequences for clients.
Implements cmil::InputSequencer.
Definition at line 297 of file InputNode.h.
References cmil::ComboHandler::isCombo(), and m_chandler.
00297 { 00298 return m_chandler.isCombo(seq); 00299 }
Here is the call graph for this function:
bool cmil::NodeSequencer::isNormal | ( | const Ev::Sequence & | seq | ) | const [inline, private, virtual] |
This function should provide validation of regular sequences for clients.
Implements cmil::InputSequencer.
Definition at line 301 of file InputNode.h.
References cmil::NormalHandler::isNormal(), and m_nhandler.
00301 { 00302 return m_nhandler.isNormal(seq); 00303 }
Here is the call graph for this function:
ComboHandler cmil::NodeSequencer::m_chandler [private] |
Definition at line 305 of file InputNode.h.
Referenced by imp_addCombo(), imp_handle(), and isCombo().
NormalHandler cmil::NodeSequencer::m_nhandler [private] |
Definition at line 306 of file InputNode.h.
Referenced by imp_addNormal(), imp_handle(), imp_removeNormal(), and isNormal().