Tekkotsu Homepage | Demos | Overview | Downloads | Dev. Resources | Reference | Credits |
EventGeneratorBase Class Reference#include <EventGeneratorBase.h>
Inheritance diagram for EventGeneratorBase:
![]() Detailed DescriptionA simple convenience class for event generators.Note that you don't need to inherit from this class to be able to send events! Any code can send any event any time, just by calling one of the EventRouter::postEvent() functions. Uses a BehaviorBase base class so that you can start and stop it. Allows variable settings of the generator id and source id for outgoing events as well as automatic handling of listening/unlistening for a single optional event source. If you want something more fancy that that though, you'll have to override DoStart/DoStop yourself. (or extend/modify this class...) Definition at line 21 of file EventGeneratorBase.h.
Member Enumeration Documentationlets you specify what level of filtering should be done
Definition at line 63 of file EventGeneratorBase.h.
Constructor & Destructor Documentation
Definition at line 92 of file EventGeneratorBase.h.
Definition at line 95 of file EventGeneratorBase.h.
Definition at line 98 of file EventGeneratorBase.h.
Definition at line 101 of file EventGeneratorBase.h.
Member Function Documentation
By default, merely adds to the reference counter (through AddReference()); Note you should still call this from your overriding methods.
Reimplemented from BehaviorBase. Reimplemented in PitchDetector, BufferedImageGenerator, CDTGenerator, and RawCameraGenerator. Definition at line 7 of file EventGeneratorBase.cc. Referenced by RawCameraGenerator::DoStart(), PitchDetector::DoStart(), CDTGenerator::DoStart(), and BufferedImageGenerator::DoStart().
By default, subtracts from the reference counter (RemoveReference()), and thus may deletex if zero; Don't forget to still call this when you override this; Warning: call this at the end of your DoStop(), not beginning (it might
Reimplemented from BehaviorBase. Reimplemented in PitchDetector. Definition at line 17 of file EventGeneratorBase.cc. Referenced by PitchDetector::DoStop().
if autolistening, will receive EventRouter events concerning our own listeners This will automatically reduce overhead by eliminating chains of events thrown that don't have any end listeners. However, this might mean your subclass's processEvent will be receiving the events from erouterEGID, and will need to call EventGeneratorBase::processEvent() in order to allow them to be used Reimplemented from BehaviorBase. Reimplemented in PitchDetector, BallDetectionGenerator, BufferedImageGenerator, CDTGenerator, FilterBankGenerator, InterleavedYUVGenerator, JPEGGenerator, PNGGenerator, RawCameraGenerator, RegionGenerator, RLEGenerator, and SegmentedColorGenerator. Definition at line 24 of file EventGeneratorBase.cc. Referenced by RawCameraGenerator::processEvent(), PitchDetector::processEvent(), FilterBankGenerator::processEvent(), CDTGenerator::processEvent(), BufferedImageGenerator::processEvent(), and BallDetectionGenerator::processEvent().
return the generator ID that will be broadcast from
Definition at line 45 of file EventGeneratorBase.h. Referenced by DoStart(), hasListeners(), SegmentedColorGenerator::processEvent(), RLEGenerator::processEvent(), RegionGenerator::processEvent(), RawCameraGenerator::processEvent(), PNGGenerator::processEvent(), JPEGGenerator::processEvent(), InterleavedYUVGenerator::processEvent(), processEvent(), CDTGenerator::processEvent(), BufferedImageGenerator::processEvent(), and setAutoListen().
set the generator ID that will be broadcast from (typically it's a bad idea to call this...)
Definition at line 47 of file EventGeneratorBase.h.
return the source ID that will be broadcast on
Definition at line 50 of file EventGeneratorBase.h. Referenced by hasListeners(), SegmentedColorGenerator::processEvent(), RLEGenerator::processEvent(), RegionGenerator::processEvent(), RawCameraGenerator::processEvent(), PNGGenerator::processEvent(), JPEGGenerator::processEvent(), InterleavedYUVGenerator::processEvent(), CDTGenerator::processEvent(), and BufferedImageGenerator::processEvent().
return true if this generator has listeners
Definition at line 94 of file EventGeneratorBase.cc. Referenced by DoStart(), processEvent(), and setAutoListen().
returns the current specificity level, to modify this, call the appropriate version of setAutoListen()
Definition at line 69 of file EventGeneratorBase.h.
turns on auto listening to make it easier to set up dependancies between vision filters
Definition at line 37 of file EventGeneratorBase.cc.
turns on auto listening to make it easier to set up dependancies between vision filters
Definition at line 53 of file EventGeneratorBase.cc.
turns on auto listening to make it easier to set up dependancies between vision filters
Definition at line 70 of file EventGeneratorBase.cc.
turns off auto listening
Definition at line 88 of file EventGeneratorBase.cc. Referenced by BufferedImageGenerator::BufferedImageGenerator(), CDTGenerator::CDTGenerator(), and RawCameraGenerator::RawCameraGenerator().
returns the generator ID that will be listened for (not the generator of the FilterBankEvent to be created - that depends on the subclass)
Definition at line 81 of file EventGeneratorBase.h. Referenced by addSrcListener(), SegmentedColorGenerator::processEvent(), RLEGenerator::processEvent(), RegionGenerator::processEvent(), RawCameraGenerator::processEvent(), PNGGenerator::processEvent(), JPEGGenerator::processEvent(), InterleavedYUVGenerator::processEvent(), FilterBankGenerator::processEvent(), CDTGenerator::processEvent(), BufferedImageGenerator::processEvent(), BallDetectionGenerator::processEvent(), and removeSrcListener().
returns the source ID that will be listened for (not the source of the FilterBankEvent to be created - that depends on the subclass)
Definition at line 83 of file EventGeneratorBase.h. Referenced by addSrcListener(), SegmentedColorGenerator::processEvent(), RLEGenerator::processEvent(), RegionGenerator::processEvent(), RawCameraGenerator::processEvent(), PNGGenerator::processEvent(), JPEGGenerator::processEvent(), InterleavedYUVGenerator::processEvent(), FilterBankGenerator::processEvent(), CDTGenerator::processEvent(), BufferedImageGenerator::processEvent(), BallDetectionGenerator::processEvent(), and removeSrcListener().
returns the type ID that will be listened for (not the type of the FilterBankEvent to be created - that depends on the subclass)
Definition at line 85 of file EventGeneratorBase.h. Referenced by addSrcListener(), and removeSrcListener().
subscribe this generator to its source
Definition at line 99 of file EventGeneratorBase.cc. Referenced by RawCameraGenerator::DoStart(), DoStart(), CDTGenerator::DoStart(), BufferedImageGenerator::DoStart(), processEvent(), and setAutoListen().
unsubscribe this generator from its source
Definition at line 119 of file EventGeneratorBase.cc. Referenced by processEvent(), setAutoListen(), and unsetAutoListen().
Member Data Documentationthe generator ID to broadcast on
Definition at line 112 of file EventGeneratorBase.h. Referenced by getGeneratorID(), and setGeneratorID().
the source ID to broadcast on
Definition at line 113 of file EventGeneratorBase.h. Referenced by BallDetectionGenerator::createEvent(), getSourceID(), and setSourceID().
if true, will automatically start listening for EventBase(genID,sourceID) events
Definition at line 114 of file EventGeneratorBase.h. Referenced by DoStart(), processEvent(), setAutoListen(), and unsetAutoListen().
true if listening triggered by autoListen
Definition at line 115 of file EventGeneratorBase.h. Referenced by addSrcListener(), DoStop(), and removeSrcListener(). the generator ID to listen for (typically the source that this filter works on)
Definition at line 116 of file EventGeneratorBase.h. Referenced by getListenGeneratorID(), and setAutoListen().
the source ID to listen for
Definition at line 117 of file EventGeneratorBase.h. Referenced by getListenSourceID(), and setAutoListen(). the type ID to listen for
Definition at line 118 of file EventGeneratorBase.h. Referenced by getListenTypeID(), and setAutoListen().
the level of event specificity that is being listened for, so when autoListen is triggered, we can subscribe to the right level of event stream
Definition at line 119 of file EventGeneratorBase.h. Referenced by addSrcListener(), getSpecificity(), removeSrcListener(), and setAutoListen().
The documentation for this class was generated from the following files: |
Tekkotsu v4.0 |
Generated Thu Nov 22 00:58:19 2007 by Doxygen 1.5.4 |