Cheetah - SKA - PSS - Prototype Time Domain Search Pipeline
DmTimeIterator.h
1 #ifndef SKA_CHEETAH_DATA_DMTIMEITERATOR_H
2 #define SKA_CHEETAH_DATA_DMTIMEITERATOR_H
3 
4 #include "cheetah/data/DmTime.h"
5 #include "cheetah/data/detail/DmTimeSlice.h"
6 #include <cstddef>
7 #include <memory>
8 
9 namespace ska {
10 namespace cheetah {
11 namespace data {
12 
13 template <typename DmTrialsType>
14 class DmTime;
15 
16 namespace detail {
17 
27 template <typename DmTimeType>
29 {
30  public:
31  typedef typename DmTimeType::SliceType SliceType;
32 
33  public:
41  DmTimeIterator(std::size_t current_dm_idx,
42  std::size_t number_dms_per_slice,
43  std::shared_ptr<DmTimeType> parent);
44  ~DmTimeIterator();
45 
53 
60  std::shared_ptr<SliceType> operator*() const;
61 
69  bool operator!=(DmTimeIterator const& other) const;
70 
78  bool operator==(DmTimeIterator const& other) const;
79 
87  bool operator<(DmTimeIterator const& other) const;
88 
96  bool operator>(DmTimeIterator const& other) const;
97 
98  private:
99  std::size_t _current_dm_idx;
100  std::size_t _number_dms_per_slice;
101  std::shared_ptr<DmTimeType> _parent;
102 };
103 
104 } // namespace detail
105 } // namespace data
106 } // namespace cheetah
107 } // namespace ska
108 
109 #include "cheetah/data/detail/DmTimeIterator.cpp"
110 
111 #endif // SKA_CHEETAH_DATA_DMTIMEITERATOR_H
DmTimeIterator & operator++()
Increment the iterator.
Provides an iterator over a DmTime in slices of DMs.
bool operator!=(DmTimeIterator const &other) const
Test if another DmTimeIterator is different to this one.
bool operator<(DmTimeIterator const &other) const
Test if another DmTimeIterator is the before this one.
Some limits and constants for FLDO.
Definition: Brdz.h:35
bool operator==(DmTimeIterator const &other) const
Test if another DmTimeIterator is the same as this one.
bool operator>(DmTimeIterator const &other) const
Test if another DmTimeIterator is the after this one.
DmTimeIterator(std::size_t current_dm_idx, std::size_t number_dms_per_slice, std::shared_ptr< DmTimeType > parent)
Create a new instances.
A wrapper class for a list of DmTime instances.
std::shared_ptr< SliceType > operator*() const
Dereference the iterator.