2 * Copyright (C) 2012-2020 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
19 #ifdef PHOTOMETRY_IMPL
21 //-----------------------------------------------------------------------------
22 // Implementation of the iterator
25 Photometry::PhotometryIterator<Const>::PhotometryIterator(const filters_iter_t& filters_iter,
26 const values_iter_t& values_iter)
27 : m_filters_iter{filters_iter}, m_values_iter{values_iter} {
31 Photometry::PhotometryIterator<Const>::PhotometryIterator(const PhotometryIterator<false>& other)
32 : m_filters_iter{other.m_filters_iter}, m_values_iter{other.m_values_iter} {
36 Photometry::PhotometryIterator<Const>& Photometry::PhotometryIterator<Const>::operator++() {
43 bool Photometry::PhotometryIterator<Const>::operator==(const PhotometryIterator& other) const {
44 return m_filters_iter == other.m_filters_iter;
48 bool Photometry::PhotometryIterator<Const>::operator!=(const PhotometryIterator& other) const {
49 return m_filters_iter != other.m_filters_iter;
53 auto Photometry::PhotometryIterator<Const>::operator*() -> reference {
54 return *m_values_iter;
58 auto Photometry::PhotometryIterator<Const>::operator->() -> pointer {
59 return m_values_iter.operator->();
63 ssize_t Photometry::PhotometryIterator<Const>::operator-(const PhotometryIterator& other) const {
64 return m_values_iter - other.m_values_iter;
68 const std::string& Photometry::PhotometryIterator<Const>::filterName() const {
69 return *m_filters_iter;