8 DataCoord(Timestamp time
= 0, double data
= 0.0) : m_time(time
), m_data(data
) {}
14 Timestamp
&time() { return m_time
; }
15 const Timestamp
&time() const { return m_time
; }
16 void setTime(Timestamp time
) { m_time
= time
; }
18 double &data() { return m_data
; }
19 const double &data() const { return m_data
; }
20 void setData(double data
) { m_data
= data
; }
22 DataCoord
operator+(const DataCoord
&other
) const {
23 return DataCoord(m_time
+ other
.m_time
, m_data
+ other
.m_data
);
25 DataCoord
operator-(const DataCoord
&other
) const {
26 return DataCoord(m_time
- other
.m_time
, m_data
- other
.m_data
);
29 DataCoord
&operator+=(const DataCoord
&other
) {
30 m_time
+= other
.m_time
;
31 m_data
+= other
.m_data
;