Toolbox snapshot
The Reactive C++ Toolbox
Loading...
Searching...
No Matches
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
toolbox::hdr::Iterator Class Reference

Iterator is the base iterator for all iterator types. More...

#include <toolbox/hdr/Iterator.hpp>

Inheritance diagram for toolbox::hdr::Iterator:
Inheritance graph
[legend]
Collaboration diagram for toolbox::hdr::Iterator:
Collaboration graph
[legend]

Public Member Functions

 Iterator (const Histogram &h) noexcept
 
virtual ~Iterator ()
 
 Iterator (const Iterator &)=delete
 
Iteratoroperator= (const Iterator &)=delete
 
 Iterator (Iterator &&) noexcept=default
 
Iteratoroperator= (Iterator &&)=delete
 
std::int64_t count () const noexcept
 Value directly from array for the current counts_index.
 
std::int64_t cumulative_count () const noexcept
 Sum of all of the counts up to and including the count at this index.
 
std::int64_t value () const noexcept
 The current value based on counts_index.
 
std::int64_t highest_equivalent_value () const noexcept
 
bool next () noexcept
 

Protected Member Functions

bool has_buckets () const noexcept
 
bool has_next () const noexcept
 
std::int64_t peek_next_value_from_index () const noexcept
 
bool next_value_greater_than_reporting_level_upper_bound (std::int64_t reporting_level_upper_bound) const noexcept
 
bool basic_next () noexcept
 
bool move_next () noexcept
 
void update_iterated_values (std::int64_t new_value_iterated_to) noexcept
 
virtual bool do_next () noexcept
 

Protected Attributes

const Histogramh_
 
std::int32_t counts_index_
 Raw index into the counts array.
 
std::int64_t total_count_
 Snapshot of the length at the time the iterator is created.
 
std::int64_t count_
 
std::int64_t cumulative_count_
 
std::int64_t value_
 
std::int64_t highest_equivalent_value_
 
std::int64_t lowest_equivalent_value_
 
std::int64_t median_equivalent_value_
 
std::int64_t value_iterated_from_
 
std::int64_t value_iterated_to_
 

Detailed Description

Iterator is the base iterator for all iterator types.

Definition at line 28 of file Iterator.hpp.

Constructor & Destructor Documentation

◆ Iterator() [1/3]

toolbox::hdr::Iterator::Iterator ( const Histogram h)
explicitnoexcept

Construct iterator.

Parameters
hThe histogram to iterate over.

Definition at line 26 of file Iterator.cpp.

◆ ~Iterator()

toolbox::hdr::Iterator::~Iterator ( )
virtualdefault

◆ Iterator() [2/3]

toolbox::hdr::Iterator::Iterator ( const Iterator )
delete

◆ Iterator() [3/3]

toolbox::hdr::Iterator::Iterator ( Iterator &&  )
defaultnoexcept

Member Function Documentation

◆ operator=() [1/2]

Iterator & toolbox::hdr::Iterator::operator= ( const Iterator )
delete

◆ operator=() [2/2]

Iterator & toolbox::hdr::Iterator::operator= ( Iterator &&  )
delete

◆ count()

std::int64_t toolbox::hdr::Iterator::count ( ) const
inlinenoexcept

Value directly from array for the current counts_index.

Definition at line 45 of file Iterator.hpp.

◆ cumulative_count()

std::int64_t toolbox::hdr::Iterator::cumulative_count ( ) const
inlinenoexcept

Sum of all of the counts up to and including the count at this index.

Definition at line 47 of file Iterator.hpp.

◆ value()

std::int64_t toolbox::hdr::Iterator::value ( ) const
inlinenoexcept

The current value based on counts_index.

Definition at line 49 of file Iterator.hpp.

◆ highest_equivalent_value()

std::int64_t toolbox::hdr::Iterator::highest_equivalent_value ( ) const
inlinenoexcept

Definition at line 50 of file Iterator.hpp.

◆ next()

bool toolbox::hdr::Iterator::next ( )
inlinenoexcept

Iterate to the next value for the iterator. If there are no more values available return false.

Returns
false if there are no values remaining for this iterator.

Definition at line 56 of file Iterator.hpp.

◆ has_buckets()

bool toolbox::hdr::Iterator::has_buckets ( ) const
protectednoexcept

Definition at line 50 of file Iterator.cpp.

Referenced by move_next().

◆ has_next()

bool toolbox::hdr::Iterator::has_next ( ) const
protectednoexcept

◆ peek_next_value_from_index()

int64_t toolbox::hdr::Iterator::peek_next_value_from_index ( ) const
protectednoexcept

Definition at line 60 of file Iterator.cpp.

◆ next_value_greater_than_reporting_level_upper_bound()

bool toolbox::hdr::Iterator::next_value_greater_than_reporting_level_upper_bound ( std::int64_t  reporting_level_upper_bound) const
protectednoexcept

◆ basic_next()

bool toolbox::hdr::Iterator::basic_next ( )
protectednoexcept

◆ move_next()

bool toolbox::hdr::Iterator::move_next ( )
protectednoexcept

◆ update_iterated_values()

void toolbox::hdr::Iterator::update_iterated_values ( std::int64_t  new_value_iterated_to)
protectednoexcept

◆ do_next()

bool toolbox::hdr::Iterator::do_next ( )
protectedvirtualnoexcept

Member Data Documentation

◆ h_

const Histogram& toolbox::hdr::Iterator::h_
protected

◆ counts_index_

std::int32_t toolbox::hdr::Iterator::counts_index_
protected

Raw index into the counts array.

Definition at line 73 of file Iterator.hpp.

Referenced by basic_next(), toolbox::hdr::PercentileIterator::do_next(), has_buckets(), move_next(), and peek_next_value_from_index().

◆ total_count_

std::int64_t toolbox::hdr::Iterator::total_count_
protected

Snapshot of the length at the time the iterator is created.

Definition at line 75 of file Iterator.hpp.

Referenced by has_next().

◆ count_

std::int64_t toolbox::hdr::Iterator::count_
protected

◆ cumulative_count_

std::int64_t toolbox::hdr::Iterator::cumulative_count_
protected

Definition at line 77 of file Iterator.hpp.

Referenced by toolbox::hdr::PercentileIterator::do_next(), has_next(), and move_next().

◆ value_

std::int64_t toolbox::hdr::Iterator::value_
protected

◆ highest_equivalent_value_

std::int64_t toolbox::hdr::Iterator::highest_equivalent_value_
protected

Definition at line 79 of file Iterator.hpp.

Referenced by move_next().

◆ lowest_equivalent_value_

std::int64_t toolbox::hdr::Iterator::lowest_equivalent_value_
protected

Definition at line 80 of file Iterator.hpp.

Referenced by move_next().

◆ median_equivalent_value_

std::int64_t toolbox::hdr::Iterator::median_equivalent_value_
protected

Definition at line 81 of file Iterator.hpp.

Referenced by move_next().

◆ value_iterated_from_

std::int64_t toolbox::hdr::Iterator::value_iterated_from_
protected

Definition at line 82 of file Iterator.hpp.

◆ value_iterated_to_

std::int64_t toolbox::hdr::Iterator::value_iterated_to_
protected

Definition at line 83 of file Iterator.hpp.


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