UFO
ufo::PrimitiveVariablesIterator Class Reference

Iterator over the names and values of primitive variables held in a Variables object. More...

#include <PrimitiveVariables.h>

Collaboration diagram for ufo::PrimitiveVariablesIterator:

Classes

struct  BeginTag
 
struct  EndTag
 

Public Types

typedef ptrdiff_t difference_type
 
typedef PrimitiveVariable value_type
 
typedef PrimitiveVariable reference
 
typedef ArrowProxy< PrimitiveVariablepointer
 
typedef std::forward_iterator_tag iterator_category
 

Public Member Functions

 PrimitiveVariablesIterator (const Variables &variables, const ObsFilterData &data, BeginTag)
 Create an iterator pointing to the first primitive variable in variables. More...
 
 PrimitiveVariablesIterator (const Variables &variables, const ObsFilterData &data, EndTag)
 Create an iterator pointing past the range of primitive variables in variables. More...
 
PrimitiveVariable operator* () const
 Dereference the iterator, returning a proxy object whose methods such as name(), group() and values() can be called to get access to the name, group and values of the primitive variable pointed to by the iterator. More...
 
ArrowProxy< PrimitiveVariableoperator-> () const
 
PrimitiveVariablesIteratoroperator++ ()
 
bool operator== (const PrimitiveVariablesIterator &other) const
 
bool operator!= (const PrimitiveVariablesIterator &other) const
 

Private Member Functions

void loadCurrentVariable ()
 

Private Attributes

const Variablesvariables_
 
const ObsFilterDatadata_
 
size_t variableIndex_
 
size_t channelIndex_
 
std::unique_ptr< ioda::ObsDataVector< float > > vector_
 

Detailed Description

Iterator over the names and values of primitive variables held in a Variables object.

See also
PrimitiveVariables

Note: this iterator exists to support range-based for loops, but it doesn't have a copy constructor (it would need to be very costly – requiring a copy of the ObsDataVector stored in the iterator), so it can't be passed to STL algorithms that take iterators by value.

Definition at line 66 of file src/ufo/utils/PrimitiveVariables.h.

Member Typedef Documentation

◆ difference_type

◆ iterator_category

typedef std::forward_iterator_tag ufo::PrimitiveVariablesIterator::iterator_category

Definition at line 72 of file src/ufo/utils/PrimitiveVariables.h.

◆ pointer

◆ reference

◆ value_type

Constructor & Destructor Documentation

◆ PrimitiveVariablesIterator() [1/2]

ufo::PrimitiveVariablesIterator::PrimitiveVariablesIterator ( const Variables variables,
const ObsFilterData data,
BeginTag   
)
inline

Create an iterator pointing to the first primitive variable in variables.

Definition at line 78 of file src/ufo/utils/PrimitiveVariables.h.

Here is the call graph for this function:

◆ PrimitiveVariablesIterator() [2/2]

ufo::PrimitiveVariablesIterator::PrimitiveVariablesIterator ( const Variables variables,
const ObsFilterData data,
EndTag   
)
inline

Create an iterator pointing past the range of primitive variables in variables.

Definition at line 85 of file src/ufo/utils/PrimitiveVariables.h.

Member Function Documentation

◆ loadCurrentVariable()

void ufo::PrimitiveVariablesIterator::loadCurrentVariable ( )
private

Definition at line 14 of file PrimitiveVariables.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ operator!=()

bool ufo::PrimitiveVariablesIterator::operator!= ( const PrimitiveVariablesIterator other) const
inline

Definition at line 119 of file src/ufo/utils/PrimitiveVariables.h.

Here is the call graph for this function:

◆ operator*()

PrimitiveVariable ufo::PrimitiveVariablesIterator::operator* ( ) const
inline

Dereference the iterator, returning a proxy object whose methods such as name(), group() and values() can be called to get access to the name, group and values of the primitive variable pointed to by the iterator.

Definition at line 92 of file src/ufo/utils/PrimitiveVariables.h.

◆ operator++()

PrimitiveVariablesIterator& ufo::PrimitiveVariablesIterator::operator++ ( )
inline

Definition at line 100 of file src/ufo/utils/PrimitiveVariables.h.

Here is the call graph for this function:

◆ operator->()

ArrowProxy<PrimitiveVariable> ufo::PrimitiveVariablesIterator::operator-> ( ) const
inline

Definition at line 96 of file src/ufo/utils/PrimitiveVariables.h.

◆ operator==()

bool ufo::PrimitiveVariablesIterator::operator== ( const PrimitiveVariablesIterator other) const
inline

Definition at line 112 of file src/ufo/utils/PrimitiveVariables.h.

Here is the caller graph for this function:

Member Data Documentation

◆ channelIndex_

size_t ufo::PrimitiveVariablesIterator::channelIndex_
private

Definition at line 130 of file src/ufo/utils/PrimitiveVariables.h.

◆ data_

const ObsFilterData& ufo::PrimitiveVariablesIterator::data_
private

Definition at line 128 of file src/ufo/utils/PrimitiveVariables.h.

◆ variableIndex_

size_t ufo::PrimitiveVariablesIterator::variableIndex_
private

Definition at line 129 of file src/ufo/utils/PrimitiveVariables.h.

◆ variables_

const Variables& ufo::PrimitiveVariablesIterator::variables_
private

Definition at line 127 of file src/ufo/utils/PrimitiveVariables.h.

◆ vector_

std::unique_ptr<ioda::ObsDataVector<float> > ufo::PrimitiveVariablesIterator::vector_
private

Definition at line 131 of file src/ufo/utils/PrimitiveVariables.h.


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