Marsyas
0.6.0-alpha
|
00001 /* 00002 ** Copyright (C) 1998-2005 George Tzanetakis <gtzan@cs.uvic.ca> 00003 ** 00004 ** This program is free software; you can redistribute it and/or modify 00005 ** it under the terms of the GNU General Public License as published by 00006 ** the Free Software Foundation; either version 2 of the License, or 00007 ** (at your option) any later version. 00008 ** 00009 ** This program is distributed in the hope that it will be useful, 00010 ** but WITHOUT ANY WARRANTY; without even the implied warranty of 00011 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00012 ** GNU General Public License for more details. 00013 ** 00014 ** You should have received a copy of the GNU General Public License 00015 ** along with this program; if not, write to the Free Software 00016 ** Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 00017 */ 00018 00019 00020 #ifndef MARSYAS_EV_GETUPD_H 00021 #define MARSYAS_EV_GETUPD_H 00022 00023 #include <marsyas/sched/EvEvent.h> 00024 #include <marsyas/system/MarControl.h> 00025 00026 #include <string> 00027 #include <iostream> 00028 00029 namespace Marsyas 00030 { 00039 class MarSystem; // forward declaration 00040 00041 class EvGetUpd : public EvEvent { 00042 protected: 00043 MarSystem* source_; 00044 MarSystem* target_; 00045 std::string src_cname_; 00046 std::string tgt_cname_; 00047 00048 public: 00049 // Constructors 00050 EvGetUpd(MarSystem* src, std::string scname, MarSystem* tgt, std::string tcname); 00051 EvGetUpd(EvGetUpd& e); 00052 virtual ~EvGetUpd(); 00053 00054 // Set/Get methods 00055 std::string getSrcCName() const {return tgt_cname_;}; 00056 std::string getTgtCName() const {return src_cname_;}; 00057 MarSystem* getSource() const {return source_;}; 00058 MarSystem* getTarget() const {return target_;}; 00059 00060 void setSrcCName(std::string cname) {src_cname_=cname;}; 00061 void setTgtCName(std::string cname) {tgt_cname_=cname;}; 00062 void setSource(MarSystem* ms) {source_=ms;}; 00063 void setTarget(MarSystem* ms) {target_=ms;}; 00064 void setEvent(MarSystem* src, std::string scname, MarSystem* tgt, std::string tcname); 00065 00066 // Event dispatch 00067 void dispatch(); 00068 00069 virtual EvGetUpd* clone(); 00070 00071 // the usual stream IO 00072 friend std::ostream& operator<<(std::ostream&, EvEvent&); 00073 friend std::istream& operator>>(std::istream&, EvEvent&); 00074 }; 00075 00076 }//namespace Marsyas 00077 00078 #endif