2 * Copyright (C) 2012-2021 Euclid Science Ground Segment
4 * This library is free software; you can redistribute it and/or modify it under
5 * the terms of the GNU Lesser General Public License as published by the Free
6 * Software Foundation; either version 3.0 of the License, or (at your option)
9 * This library is distributed in the hope that it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
11 * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
14 * You should have received a copy of the GNU Lesser General Public License
15 * along with this library; if not, write to the Free Software Foundation, Inc.,
16 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
21//-----------------------------------------------------------------------------
22// Implementation of the iterator
25Photometry::PhotometryIterator<Const>::PhotometryIterator(const filters_iter_t& filters_iter, const values_iter_t& values_iter)
26 : m_filters_iter{filters_iter}, m_values_iter{values_iter} {}
29Photometry::PhotometryIterator<Const>::PhotometryIterator(const PhotometryIterator<false>& other)
30 : m_filters_iter{other.m_filters_iter}, m_values_iter{other.m_values_iter} {}
33Photometry::PhotometryIterator<Const>& Photometry::PhotometryIterator<Const>::operator++() {
40bool Photometry::PhotometryIterator<Const>::operator==(const PhotometryIterator& other) const {
41 return m_filters_iter == other.m_filters_iter;
45bool Photometry::PhotometryIterator<Const>::operator!=(const PhotometryIterator& other) const {
46 return m_filters_iter != other.m_filters_iter;
50auto Photometry::PhotometryIterator<Const>::operator*() -> reference {
51 return *m_values_iter;
55auto Photometry::PhotometryIterator<Const>::operator->() -> pointer {
56 return m_values_iter.operator->();
60ssize_t Photometry::PhotometryIterator<Const>::operator-(const PhotometryIterator& other) const {
61 return m_values_iter - other.m_values_iter;
65const std::string& Photometry::PhotometryIterator<Const>::filterName() const {
66 return *m_filters_iter;