00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019 #ifndef MARSYAS_EV_EXPR_H
00020 #define MARSYAS_EV_EXPR_H
00021
00022 #include <string>
00023 #include <iostream>
00024
00025 #include "MarControl.h"
00026 #include "EvEvent.h"
00027 #include "TmControlValue.h"
00028 #include "Expr.h"
00029
00030 namespace Marsyas
00031 {
00041 class MarSystem;
00042 class Scheduler;
00043
00044 class EvExpr : public EvEvent {
00045 protected:
00046 Scheduler* sched_;
00047 MarSystem* target_;
00048 Expr* expr_;
00049
00050 public:
00051 EvExpr(MarSystem* target, std::string e, std::string nm="Expr");
00052 EvExpr(MarSystem* target, Ex e, Rp r, std::string nm="Expr");
00053 EvExpr(MarSystem* target, ExFile ef, std::string nm="Expr");
00054 virtual ~EvExpr();
00055
00056 void setTimer(TmTimer* t);
00057
00058
00059 void dispatch();
00060 void updctrl(std::string cname, TmControlValue value);
00061
00062 virtual EvExpr* clone();
00063 Expr* getExpression() { return expr_; }
00064
00065 virtual bool repeat();
00066 virtual std::string repeat_interval();
00067 virtual void set_repeat(Repeat r) { repeat_=r; }
00068
00069
00070 friend std::ostream& operator<<(std::ostream&, EvEvent&);
00071 friend std::istream& operator>>(std::istream&, EvEvent&);
00072 };
00073
00074 }
00075
00076 #endif