PURIFY
Next-generation radio interferometric imaging
Public Types | Public Member Functions | List of all members
purify::casa::MeasurementSet::const_iterator Class Reference

#include <casacore.h>

Public Types

typedef MeasurementSet::ChannelWrapper value_type
 Convenience wrapper to access values associated with a single channel. More...
 
typedef std::shared_ptr< value_type const > pointer
 
typedef value_type const & reference
 
typedef t_int difference_type
 

Public Member Functions

 const_iterator (t_int channel, MeasurementSet const &ms, std::string const &filter="")
 
pointer operator-> () const
 
reference operator* () const
 
const_iteratoroperator++ ()
 
const_iterator operator++ (int)
 
const_iteratoroperator+= (difference_type n)
 
const_iteratoroperator-= (difference_type n)
 
const_iterator operator+ (difference_type n) const
 
const_iterator operator- (difference_type n) const
 
bool operator> (const_iterator const &c) const
 
bool operator>= (const_iterator const &c) const
 
bool operator< (const_iterator const &c) const
 
bool operator<= (const_iterator const &c) const
 
bool operator== (const_iterator const &c) const
 
bool operator!= (const_iterator const &c) const
 
bool same_measurement_set (const_iterator const &c) const
 True if iterating over the same measurement set. More...
 

Detailed Description

Definition at line 315 of file casacore.h.

Member Typedef Documentation

◆ difference_type

Definition at line 321 of file casacore.h.

◆ pointer

Definition at line 319 of file casacore.h.

◆ reference

Definition at line 320 of file casacore.h.

◆ value_type

Convenience wrapper to access values associated with a single channel.

Definition at line 318 of file casacore.h.

Constructor & Destructor Documentation

◆ const_iterator()

purify::casa::MeasurementSet::const_iterator::const_iterator ( t_int  channel,
MeasurementSet const &  ms,
std::string const &  filter = "" 
)
inline

Definition at line 323 of file casacore.h.

324  : channel_(channel),
325  ms_(ms),
326  filter_(filter),
327  wrapper_(new value_type(channel_, ms_, filter_)){};
MeasurementSet::ChannelWrapper value_type
Convenience wrapper to access values associated with a single channel.
Definition: casacore.h:318

Referenced by operator+(), and operator-().

Member Function Documentation

◆ operator!=()

bool purify::casa::MeasurementSet::const_iterator::operator!= ( const_iterator const &  c) const
inline

Definition at line 346 of file casacore.h.

346 { return not operator==(c); }
bool operator==(const_iterator const &c) const
Definition: casacore.cc:141
const t_real c
speed of light in vacuum
Definition: types.h:72

References purify::constant::c, and operator==().

◆ operator*()

reference purify::casa::MeasurementSet::const_iterator::operator* ( ) const
inline

Definition at line 330 of file casacore.h.

330 { return *wrapper_; }

◆ operator+()

const_iterator purify::casa::MeasurementSet::const_iterator::operator+ ( difference_type  n) const
inline

Definition at line 335 of file casacore.h.

335  {
336  return const_iterator(channel_ + n, ms_, filter_);
337  }
const_iterator(t_int channel, MeasurementSet const &ms, std::string const &filter="")
Definition: casacore.h:323

References const_iterator().

◆ operator++() [1/2]

MeasurementSet::const_iterator & purify::casa::MeasurementSet::const_iterator::operator++ ( )

Definition at line 130 of file casacore.cc.

130  {
131  ++channel_;
132  wrapper_ = std::make_shared<value_type>(channel_, ms_, filter_);
133  return *this;
134 }

◆ operator++() [2/2]

MeasurementSet::const_iterator purify::casa::MeasurementSet::const_iterator::operator++ ( int  )

Definition at line 136 of file casacore.cc.

136  {
137  operator++();
138  return const_iterator(channel_ - 1, ms_, filter_);
139 }

◆ operator+=()

MeasurementSet::const_iterator & purify::casa::MeasurementSet::const_iterator::operator+= ( difference_type  n)

Definition at line 379 of file casacore.cc.

379  {
380  channel_ += n;
381  return *this;
382 }

Referenced by operator-=().

◆ operator-()

const_iterator purify::casa::MeasurementSet::const_iterator::operator- ( difference_type  n) const
inline

Definition at line 338 of file casacore.h.

338  {
339  return const_iterator(channel_ - n, ms_, filter_);
340  }

References const_iterator().

◆ operator-=()

const_iterator& purify::casa::MeasurementSet::const_iterator::operator-= ( difference_type  n)
inline

Definition at line 334 of file casacore.h.

334 { return operator+=(-n); }
const_iterator & operator+=(difference_type n)
Definition: casacore.cc:379

References operator+=().

◆ operator->()

pointer purify::casa::MeasurementSet::const_iterator::operator-> ( ) const
inline

Definition at line 329 of file casacore.h.

329 { return wrapper_; }

◆ operator<()

bool purify::casa::MeasurementSet::const_iterator::operator< ( const_iterator const &  c) const
inline

Definition at line 343 of file casacore.h.

343 { return not operator>=(c); }
bool operator>=(const_iterator const &c) const
Definition: casacore.cc:390

References purify::constant::c, and operator>=().

◆ operator<=()

bool purify::casa::MeasurementSet::const_iterator::operator<= ( const_iterator const &  c) const
inline

Definition at line 344 of file casacore.h.

344 { return not operator>(c); }
bool operator>(const_iterator const &c) const
Definition: casacore.cc:384

References purify::constant::c, and operator>().

◆ operator==()

bool purify::casa::MeasurementSet::const_iterator::operator== ( const_iterator const &  c) const

Definition at line 141 of file casacore.cc.

141  {
142  if (not same_measurement_set(c))
143  throw std::runtime_error("Iterators are not over the same measurement set");
144  return channel_ == c.channel_;
145 }
bool same_measurement_set(const_iterator const &c) const
True if iterating over the same measurement set.
Definition: casacore.h:349

References purify::constant::c.

Referenced by operator!=().

◆ operator>()

bool purify::casa::MeasurementSet::const_iterator::operator> ( const_iterator const &  c) const

Definition at line 384 of file casacore.cc.

384  {
385  if (not same_measurement_set(c))
386  throw std::runtime_error("Iterators are not over the same measurement set");
387  return channel_ > c.channel_;
388 }

References purify::constant::c.

Referenced by operator<=().

◆ operator>=()

bool purify::casa::MeasurementSet::const_iterator::operator>= ( const_iterator const &  c) const

Definition at line 390 of file casacore.cc.

390  {
391  if (not same_measurement_set(c))
392  throw std::runtime_error("Iterators are not over the same measurement set");
393  return channel_ >= c.channel_;
394 }

References purify::constant::c.

Referenced by operator<().

◆ same_measurement_set()

bool purify::casa::MeasurementSet::const_iterator::same_measurement_set ( const_iterator const &  c) const
inline

True if iterating over the same measurement set.

Definition at line 349 of file casacore.h.

349  {
350  return &ms_.table() == &c.ms_.table();
351  }
::casacore::Table const & table(std::string const &name="") const
Gets table or subtable.
Definition: casacore.cc:18

References purify::constant::c, and purify::casa::MeasurementSet::table().


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