IODA
|
#include <Selection.hpp>
Public Member Functions | |
SelectCounter () | |
void | reset (const SelectionModes mode, const std::vector< std::size_t > &digit_sizes_) |
allocate n digits for counter and set count to zero More... | |
void | inc () |
increment counter More... | |
bool | finished () const |
returns true when inc attempts to go past final state of counter More... | |
const std::vector< std::size_t > & | count () const |
return current counter value More... | |
Private Attributes | |
SelectionModes | mode_ = SelectionModes::ALL |
mode of selection More... | |
std::vector< std::size_t > | digits_ |
counter digits More... | |
std::size_t | icount_ = 0 |
index to counter digit More... | |
std::size_t | ndigits_ = 0 |
number of digits in counter More... | |
std::vector< std::size_t > | digit_sizes_ |
size (range) for each digit place More... | |
bool | counter_end_ = false |
true when finished counting More... | |
Definition at line 59 of file Selection.hpp.
ioda::ObsStore::SelectCounter::SelectCounter | ( | ) |
Definition at line 25 of file Engines/ObsStore/Selection.cpp.
const std::vector< std::size_t > & ioda::ObsStore::SelectCounter::count | ( | ) | const |
return current counter value
Definition at line 70 of file Engines/ObsStore/Selection.cpp.
bool ioda::ObsStore::SelectCounter::finished | ( | ) | const |
returns true when inc attempts to go past final state of counter
Definition at line 68 of file Engines/ObsStore/Selection.cpp.
void ioda::ObsStore::SelectCounter::inc | ( | ) |
increment counter
Definition at line 35 of file Engines/ObsStore/Selection.cpp.
void ioda::ObsStore::SelectCounter::reset | ( | const SelectionModes | mode, |
const std::vector< std::size_t > & | digit_sizes_ | ||
) |
allocate n digits for counter and set count to zero
Most significant digit is at the front (position 0) and the least significant digit is at the back (position n-1).
Definition at line 27 of file Engines/ObsStore/Selection.cpp.
|
private |
true when finished counting
Definition at line 73 of file Selection.hpp.
|
private |
size (range) for each digit place
Definition at line 71 of file Selection.hpp.
|
private |
counter digits
Definition at line 65 of file Selection.hpp.
|
private |
index to counter digit
Definition at line 67 of file Selection.hpp.
|
private |
mode of selection
Definition at line 62 of file Selection.hpp.
|
private |
number of digits in counter
Definition at line 69 of file Selection.hpp.