![]() |
|
This class allows for construction of iterable ranges of input values. More...
#include <readIteratorRange.h>
This class allows for construction of iterable ranges of input values.
The underlying iterator used is VdfReadIterator. The VdfReadIteratorRange::begin() and VdfReadIteatorRange::end() methods return an instance of VdfReadIterator<T> denoting the iterable range. The class satisfies the STL API requirements that make it suitable for use in range- based for loops.
For example:
This class can also be used to copy ranges of input values into STL containers. It can be used in range constructors, for example.
Determining the number of input values in a range is not trivial, and might be costly. Invoking std::distance on VdfReadIterator is slightly more expensive than calling VdfReadIteratorRange::ComputeSize() (i.e. VdfReadIterator::ComputeSize().)