|
HDK
|
#include <readWriteIteratorRange.h>
This class allows for construction of iterable ranges of input/output values. The underlying iterator used is VdfReadWriteIterator. The VdfReadWriteIteratorRange::begin() and VdfReadIteatorRange::end() methods return an instance of VdfReadWriteIterator<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: ```{.cpp} VdfReadWriteIteratorRange<double> range(context); for (const double x : range) { ... } ```
This class can also be used to copy ranges of input/output values into STL containers. It can be used in range constructors, for example.
```{.cpp} VdfReadWriteIteratorRange<double> range(context); std::vector<double> values(range.begin(), range.end()); ```
It can also be used in STL algorithms that modify the iterated values:
```{.cpp} VdfReadWriteIteratorRange<double> range(context); std::copy(values.begin(), values.end(), range.begin()); ```