Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

listeners.h

Go to the documentation of this file.
00001 
00006 #ifndef LISTENERS_H
00007 #define LISTENERS_H
00008 
00009 #include "Control.h"
00010 #include "cthread.h"
00011 
00012 namespace annie {
00013 
00017 struct RigidVisualiser : ValueUpdateListener    {
00018     virtual void valueChanged(const Value &val);
00019 };
00020 
00024 struct SimpleVisualiser : RigidVisualiser {
00025     virtual void valueChanged(const Value &val);
00026 };
00027 
00028 
00029 //depends on cthread...
00030 
00031 struct Redrawer : ValueUpdateListener   {
00032     Redrawer(const char *triggeringValue) : _triggeringValue(triggeringValue) {}
00033     virtual void valueChanged(const Value &val) {
00034         if(val.name() == _triggeringValue)
00035             forceRedraw();
00036     }
00037   protected:    
00038     const char *_triggeringValue;
00039 };
00040 
00044 struct Stepper: ValueUpdateListener {
00045     virtual void valueChanged(const Value &val) {
00046         if(val.name() == "epoch" && !!control["stepped"])
00047             waitForKey();
00048     }
00049 };
00050 
00051 class TrainingSet;
00055 struct Shuffler : public ValueUpdateListener{
00056     Shuffler(TrainingSet &ts, Creal shufflePeriod) : _ts(ts),  _shufflePeriod(shufflePeriod)    {}
00057     virtual void valueChanged(const Value &val);
00058   protected:
00059     TrainingSet &_ts;
00060     Creal _shufflePeriod;
00061 };
00062 
00063 
00064 }   //annie
00065 
00066 #endif  //H

Generated on Fri Jun 18 13:18:10 2004 for Annie by doxygen 1.3.5