00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017 #ifndef TSE3_PART_H
00018 #define TSE3_PART_H
00019
00020 #include "tse3/listen/Part.h"
00021
00022 #include "tse3/Notifier.h"
00023 #include "tse3/Playable.h"
00024 #include "tse3/Serializable.h"
00025 #include "tse3/listen/Phrase.h"
00026 #include "tse3/listen/MidiFilter.h"
00027 #include "tse3/listen/MidiParams.h"
00028 #include "tse3/listen/DisplayParams.h"
00029
00030 namespace TSE3
00031 {
00032 class Part;
00033 class Track;
00034
00071 class Part : public Playable,
00072 public Listener<PhraseListener>,
00073 public Listener<MidiFilterListener>,
00074 public Listener<MidiParamsListener>,
00075 public Listener<DisplayParamsListener>,
00076 public Serializable,
00077 public Notifier<PartListener>
00078 {
00079 public:
00080
00088 Part();
00089
00094 Part(Clock start, Clock end);
00095
00096 Part(const Part &p);
00097 virtual ~Part();
00098
00099 Part &operator=(const Part &);
00100
00107 MidiFilter *filter();
00108
00115 MidiParams *params();
00116
00122 DisplayParams *displayParams();
00123
00131 Phrase *phrase() const;
00132
00146 void setPhrase(Phrase *p);
00147
00155 Track *parent() const;
00156
00169 Clock start() const;
00170
00189 void setStart(Clock c);
00190
00201 Clock end() const;
00202
00221 void setEnd(Clock c);
00222
00244 void setStartEnd(Clock start, Clock end);
00245
00254 Clock repeat() const;
00255
00262 void setRepeat(Clock r);
00263
00267 virtual void Notifier_Deleted(Phrase *phrase);
00268
00272 virtual void Phrase_Reparented(Phrase *);
00273
00277 virtual PlayableIterator *iterator(Clock index);
00278
00282 virtual Clock lastClock() const;
00283
00287 virtual void save(std::ostream &o, int i) const;
00288
00292 virtual void load(std::istream &in, SerializableLoadInfo &info);
00293
00297 virtual void MidiFilter_Altered(MidiFilter *, int what);
00298
00302 virtual void MidiParams_Altered(MidiParams *, int what);
00303
00307 virtual void DisplayParams_Altered(DisplayParams *);
00308
00313 friend class Track;
00314
00315 private:
00316
00328 void setParentTrack(Track *parent);
00329
00330 class PartImpl *pimpl;
00331 };
00332 }
00333
00334 #endif