Audacity  2.2.2
WaveTrackLocation.h
Go to the documentation of this file.
1 /**********************************************************************
2 
3 Audacity: A Digital Audio Editor
4 
5 WaveTrackLocation.h
6 
7 Paul Licameli -- split from WaveTrack.h
8 
9 **********************************************************************/
10 
11 #ifndef __AUDACITY_WAVE_TRACK_LOCATION__
12 #define __AUDACITY_WAVE_TRACK_LOCATION__
13 
15 
16  enum LocationType {
19  };
20 
21  explicit
23  (double pos_ = 0.0, LocationType typ_ = locationCutLine,
24  int clipidx1_ = -1, int clipidx2_ = -1)
25  : pos(pos_), typ(typ_), clipidx1(clipidx1_), clipidx2(clipidx2_)
26  {}
27 
28  // Position of track location
29  double pos;
30 
31  // Type of track location
33 
34  // Only for typ==locationMergePoint
35  int clipidx1; // first clip (left one)
36  int clipidx2; // second clip (right one)
37 };
38 
39 inline
41 {
42  return a.pos == b.pos &&
43  a.typ == b.typ &&
44  a.clipidx1 == b.clipidx1 &&
45  a.clipidx2 == b.clipidx2;
46 }
47 
48 inline
50 {
51  return !( a == b );
52 }
53 
54 #endif
WaveTrackLocation(double pos_=0.0, LocationType typ_=locationCutLine, int clipidx1_=-1, int clipidx2_=-1)
bool operator==(const WaveTrackLocation &a, const WaveTrackLocation &b)
bool operator!=(const WaveTrackLocation &a, const WaveTrackLocation &b)