95 : seconds_(secs), epoch_(epoch) {}
101 : seconds_(std::move(secs)), epoch_(epoch) {}
115 size_t size() const noexcept {
return seconds_.size(); }
116 bool empty() const noexcept {
return seconds_.empty(); }
118 void resize(
size_t n) { seconds_.resize(n); }
119 void reserve(
size_t n) { seconds_.reserve(n); }
120 void clear() { seconds_.clear(); }
127 void push_back(
const TimePoint& tp) { seconds_.push_back(tp - epoch_); }
128 void pop_back() { seconds_.pop_back(); }
134 const TimePoint& epoch()
const {
return epoch_; }
146 std::vector<double>& seconds() noexcept {
return seconds_; }
147 const std::vector<double>& seconds() const noexcept {
return seconds_; }
182 using iterator_category = std::random_access_iterator_tag;
184 using difference_type = std::ptrdiff_t;
191 : data_(data), epoch_(epoch) {}
200 const_iterator operator++(
int) {
auto tmp = *
this; ++data_;
return tmp; }
201 const_iterator& operator--() { --data_;
return *
this; }
202 const_iterator operator--(
int) {
auto tmp = *
this; --data_;
return tmp; }
203 const_iterator& operator+=(difference_type n) { data_ += n;
return *
this; }
204 const_iterator& operator-=(difference_type n) { data_ -= n;
return *
this; }
206 const_iterator operator+(difference_type n)
const {
return {data_ + n, epoch_}; }
207 const_iterator operator-(difference_type n)
const {
return {data_ - n, epoch_}; }
208 difference_type operator-(
const const_iterator& o)
const {
return data_ - o.data_; }
210 bool operator==(
const const_iterator& o)
const {
return data_ == o.data_; }
211 bool operator!=(
const const_iterator& o)
const {
return data_ != o.data_; }
212 bool operator< (
const const_iterator& o)
const {
return data_ < o.data_; }
213 bool operator> (
const const_iterator& o)
const {
return data_ > o.data_; }
214 bool operator<=(
const const_iterator& o)
const {
return data_ <= o.data_; }
215 bool operator>=(
const const_iterator& o)
const {
return data_ >= o.data_; }
218 const double* data_ =
nullptr;
219 const TimePoint* epoch_ =
nullptr;
228 using iterator = const_iterator;
230 using size_type = size_t;
231 using difference_type = std::ptrdiff_t;
233 iterator begin() {
return {seconds_.data(), &epoch_}; }
234 iterator end() {
return {seconds_.data() + seconds_.size(), &epoch_}; }
235 const_iterator begin()
const {
return {seconds_.data(), &epoch_}; }
236 const_iterator end()
const {
return {seconds_.data() + seconds_.size(), &epoch_}; }
237 const_iterator cbegin()
const {
return begin(); }
238 const_iterator cend()
const {
return end(); }
241 std::vector<double> seconds_;
ๆถ้ดๅบ้ด
ๅฎไน TimeInterval.hpp:60
้ๆบ่ฎฟ้ฎๅธธ้่ฟญไปฃๅจ
ๅฎไน TimeList.hpp:180
TimePoint operator*() const
่งฃๅผ็จ๏ผ่ฎก็ฎ epoch_->shiftedBySecond(*data_)
ๅฎไน TimeList.hpp:194
TimePoint operator[](difference_type n) const
ไธๆ ่ฎฟ้ฎ
ๅฎไน TimeList.hpp:197
ๆถ้ด็นๅ่กจ
ๅฎไน TimeList.hpp:49
TimeList(const TimeList &)=default
ๆท่ดๆ้
~TimeList()=default
ๆๆๅฝๆฐ
TimePoint operator[](size_t i) const
่ฎฟ้ฎ็ฌฌ i ไธชๆถ้ด็น๏ผๆ ่พน็ๆฃๆฅ๏ผ
ๅฎไน TimeList.hpp:164
void setEpoch(const TimePoint &epoch)
่ฎพ็ฝฎๅ่ๅๅ
ๅฎไน TimeList.hpp:140
TimePoint timePoint(size_t i) const
่ทๅ็ฌฌ i ไธชๅ
็ด ๅฏนๅบ็็ปๅฏนๆถ้ด็น
ๅฎไน TimeList.hpp:156
TimeList(const TimePoint &epoch)
ไปๅ่ๅๅ
ๆ้ ็ฉบๅ่กจ
ๅฎไน TimeList.hpp:105
TimePoint at(size_t i) const
่ฎฟ้ฎ็ฌฌ i ไธชๆถ้ด็น๏ผ่พน็ๆฃๆฅ๏ผ
ๅฎไน TimeList.hpp:170
TimeList & operator=(const TimeList &)=default
ๆท่ด่ตๅผ
TimeList(const TimePoint &epoch, std::vector< double > &&secs)
ไปๅ่ๅๅ
ๅ็งๅ็งป้ๅ่กจ็งปๅจๆ้
ๅฎไน TimeList.hpp:100
TimeList(TimeList &&) noexcept=default
็งปๅจๆ้
TimeList()=default
้ป่ฎคๆ้ ๅฝๆฐ
friend const_iterator operator+(typename const_iterator::difference_type n, const const_iterator &it)
difference_type + const_iterator๏ผ้ๆๅ่ฟ็ฎ็ฌฆ๏ผ
ๅฎไน TimeList.hpp:223
็ปๅฏนๆถ้ด็น
ๅฎไน TimePoint.hpp:107
TimePoint shiftedBySecond(double second) const
่ฎก็ฎๆถ้ด็นๅ็งปๅ็ๆฐๆถ้ด็น๏ผๆ้ป่ฎคๆถ้ดๅฐบๅบฆ่ฟ่กๆถ้ดๅ็งป
ๅฎไน TimePoint.hpp:296