LSST Applications 27.0.0,g0265f82a02+469cd937ee,g02d81e74bb+21ad69e7e1,g1470d8bcf6+cbe83ee85a,g2079a07aa2+e67c6346a6,g212a7c68fe+04a9158687,g2305ad1205+94392ce272,g295015adf3+81dd352a9d,g2bbee38e9b+469cd937ee,g337abbeb29+469cd937ee,g3939d97d7f+72a9f7b576,g487adcacf7+71499e7cba,g50ff169b8f+5929b3527e,g52b1c1532d+a6fc98d2e7,g591dd9f2cf+df404f777f,g5a732f18d5+be83d3ecdb,g64a986408d+21ad69e7e1,g858d7b2824+21ad69e7e1,g8a8a8dda67+a6fc98d2e7,g99cad8db69+f62e5b0af5,g9ddcbc5298+d4bad12328,ga1e77700b3+9c366c4306,ga8c6da7877+71e4819109,gb0e22166c9+25ba2f69a1,gb6a65358fc+469cd937ee,gbb8dafda3b+69d3c0e320,gc07e1c2157+a98bf949bb,gc120e1dc64+615ec43309,gc28159a63d+469cd937ee,gcf0d15dbbd+72a9f7b576,gdaeeff99f8+a38ce5ea23,ge6526c86ff+3a7c1ac5f1,ge79ae78c31+469cd937ee,gee10cc3b42+a6fc98d2e7,gf1cff7945b+21ad69e7e1,gfbcc870c63+9a11dc8c8f
LSST Data Management Base Package
Loading...
Searching...
No Matches
Public Types | Public Member Functions | List of all members
lsst::afw::table::python::PyCatalogIndexIterator< Record > Class Template Reference

#include <catalog.h>

Public Types

using value_type = std::shared_ptr<Record>
 
using reference = std::shared_ptr<Record>
 
using difference_type = std::ptrdiff_t
 
using iterator_category = std::input_iterator_tag
 

Public Member Functions

 PyCatalogIndexIterator (CatalogT< Record > const *catalog, std::size_t index)
 
std::shared_ptr< Record > operator* () const
 
PyCatalogIndexIteratoroperator++ ()
 
bool operator== (PyCatalogIndexIterator const &other) const
 
bool operator!= (PyCatalogIndexIterator const &other) const
 

Detailed Description

template<typename Record>
class lsst::afw::table::python::PyCatalogIndexIterator< Record >

Definition at line 122 of file catalog.h.

Member Typedef Documentation

◆ difference_type

template<typename Record >
using lsst::afw::table::python::PyCatalogIndexIterator< Record >::difference_type = std::ptrdiff_t

Definition at line 127 of file catalog.h.

◆ iterator_category

template<typename Record >
using lsst::afw::table::python::PyCatalogIndexIterator< Record >::iterator_category = std::input_iterator_tag

Definition at line 128 of file catalog.h.

◆ reference

template<typename Record >
using lsst::afw::table::python::PyCatalogIndexIterator< Record >::reference = std::shared_ptr<Record>

Definition at line 126 of file catalog.h.

◆ value_type

template<typename Record >
using lsst::afw::table::python::PyCatalogIndexIterator< Record >::value_type = std::shared_ptr<Record>

Definition at line 125 of file catalog.h.

Constructor & Destructor Documentation

◆ PyCatalogIndexIterator()

template<typename Record >
lsst::afw::table::python::PyCatalogIndexIterator< Record >::PyCatalogIndexIterator ( CatalogT< Record > const * catalog,
std::size_t index )
inline

Definition at line 130 of file catalog.h.

130: _catalog(catalog), _index(index) {}

Member Function Documentation

◆ operator!=()

template<typename Record >
bool lsst::afw::table::python::PyCatalogIndexIterator< Record >::operator!= ( PyCatalogIndexIterator< Record > const & other) const
inline

Definition at line 150 of file catalog.h.

150 {
151 return !(*this == other);
152 }

◆ operator*()

template<typename Record >
std::shared_ptr< Record > lsst::afw::table::python::PyCatalogIndexIterator< Record >::operator* ( ) const
inline

Definition at line 132 of file catalog.h.

132 {
133 if (_index < _catalog->size()) {
134 return _catalog->get(_index);
135 }
136 throw std::out_of_range(
137 "Catalog shrunk during iteration, invalidating this iterator."
138 );
139 }
std::shared_ptr< RecordT > const get(size_type i) const
Return a pointer to the record at index i.
Definition Catalog.h:463

◆ operator++()

template<typename Record >
PyCatalogIndexIterator & lsst::afw::table::python::PyCatalogIndexIterator< Record >::operator++ ( )
inline

Definition at line 141 of file catalog.h.

141 {
142 ++_index;
143 return *this;
144 }

◆ operator==()

template<typename Record >
bool lsst::afw::table::python::PyCatalogIndexIterator< Record >::operator== ( PyCatalogIndexIterator< Record > const & other) const
inline

Definition at line 146 of file catalog.h.

146 {
147 return _catalog == other._catalog && _index == other._index;
148 }

The documentation for this class was generated from the following file: