Main Page | Namespace List | Class Hierarchy | Alphabetical List | Compound List | File List | Namespace Members | Compound Members | File Members

/home/pete/Work/TSE3.svn/tse3/src/tse3/TempoTrack.h

Go to the documentation of this file.
00001 /*
00002  * @(#)TempoTrack.h 3.00 24 May 1999
00003  *
00004  * Copyright (c) 2000 Pete Goodliffe (pete@cthree.org)
00005  *
00006  * This file is part of TSE3 - the Trax Sequencer Engine version 3.00.
00007  *
00008  * This library is modifiable/redistributable under the terms of the GNU
00009  * General Public License.
00010  *
00011  * You should have received a copy of the GNU General Public License along
00012  * with this program; see the file COPYING. If not, write to the Free Software
00013  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
00014  *
00015  */
00016 
00017 #ifndef TSE3_TEMPOTRACK_H
00018 #define TSE3_TEMPOTRACK_H
00019 
00020 #include "tse3/listen/TempoTrack.h"
00021 
00022 #include "tse3/Notifier.h"
00023 #include "tse3/Playable.h"
00024 #include "tse3/Serializable.h"
00025 #include "tse3/EventTrack.h"
00026 
00027 namespace TSE3
00028 {
00049     class Tempo
00050     {
00051         public:
00052 
00058             Tempo(int t = 120) : tempo(t) {}
00059 
00060             int tempo;
00061 
00062             int operator==(const Tempo &f) const { return tempo == f.tempo; }
00063     };
00064 
00077     class TempoTrack : public EventTrack<Tempo>,
00078                        public Serializable
00079     {
00080         public:
00081 
00085             TempoTrack();
00086             virtual ~TempoTrack();
00087 
00097             bool status() const { return _status; }
00098 
00105             void setStatus(bool s) { _status = s; }
00106 
00110             virtual PlayableIterator *iterator(Clock index);
00111 
00115             virtual Clock lastClock() const;
00116 
00120             virtual void save(std::ostream &o, int i) const;
00121 
00125             virtual void load(std::istream &i, SerializableLoadInfo &info);
00126 
00127         private:
00128 
00129             TempoTrack &operator=(const TempoTrack &);
00130             TempoTrack(const TempoTrack &);
00131 
00135             void loadEvents(std::istream &i, int filePPQN);
00136 
00137             bool _status;
00138     };
00139 }
00140 
00141 #endif

Generated on Wed May 25 14:45:08 2005 for TSE3 by doxygen 1.3.2