Tekkotsu Homepage | Demos | Overview | Downloads | Dev. Resources | Reference | Credits |
BehaviorBase::MonitorMotion Class ReferenceAn instance is created for each motion activated through addMotion(), listening in case the motion is removed by some other means, thus invalidating the MC_ID. More...
Inheritance diagram for BehaviorBase::MonitorMotion:
Detailed DescriptionAn instance is created for each motion activated through addMotion(), listening in case the motion is removed by some other means, thus invalidating the MC_ID. This specifically addresses the use of prunable motions, which could disappear any time. We don't want BehaviorBase::autoMotions filling up with dead MC_IDs, which would cause trouble when the behavior ends and it tries to re-remove the motions. (Particularly causing trouble if the MC_ID has since been reassigned to someone else!) Definition at line 195 of file BehaviorBase.h.
Constructor & Destructor Documentation
Constructor, no-op; expects a call to monitor(). Definition at line 198 of file BehaviorBase.h.
Copy constructor (shallow copy), begins monitoring the same MC_ID, on the assumption the original will be going away. Definition at line 200 of file BehaviorBase.h.
Destructor, if mcid is still valid (not invalid_MC_ID), then it removes it from owner->autoMotions. Definition at line 156 of file BehaviorBase.cc. Member Function Documentation
Begins listening for a (motmanEGID, mcid, deactivate) event, storing the owner so it can be updated when the motion is removed. Definition at line 164 of file BehaviorBase.cc. Referenced by MonitorMotion(), and operator=().
Assignment (shallow copy), begins monitoring the same MC_ID, on the assumption the original will be going away. Definition at line 202 of file BehaviorBase.h.
Assumes the event indicates the motion has been removed, so sets mcid to invalid_MC_ID and removes it from owner->autoMotions. Note that as a result of removing the BehaviorBase::autoMotions entry, this class has also been destructed, so nothing else should happen afterward. Implements EventListener. Definition at line 171 of file BehaviorBase.cc. Member Data Documentation
the motion which is being monitored for removal Definition at line 213 of file BehaviorBase.h. Referenced by monitor(), MonitorMotion(), operator=(), processEvent(), and ~MonitorMotion().
keep a reference to the motion region Definition at line 214 of file BehaviorBase.h. Referenced by monitor(), MonitorMotion(), operator=(), processEvent(), and ~MonitorMotion().
the behavior which created the motion in mcid Definition at line 212 of file BehaviorBase.h. Referenced by monitor(), MonitorMotion(), operator=(), and processEvent(). The documentation for this class was generated from the following files: |
Tekkotsu v5.1CVS |
Generated Mon May 9 04:59:05 2016 by Doxygen 1.6.3 |