![]() |
Exiv2
|
#include <slice.hpp>
Public Member Functions | |
SliceBase (size_t begin, size_t end) | |
size_t | size () const throw () |
Protected Member Functions | |
void | rangeCheck (size_t index) const |
Protected Attributes | |
const size_t | begin_ |
const size_t | end_ |
Common base class of all slice implementations.
Implements only the most basic functions, which do not require any knowledge about the stored data.
|
inlineprotected |
Throw an exception when index is too large.
std::out_of_range | when index will access an element outside of the slice |
References size().
Referenced by Exiv2::Internal::ConstSliceBase< Internal::PtrSliceStorage, const T *>::at(), Exiv2::Internal::MutableSliceBase< Internal::ContainerStorage, T >::at(), Exiv2::Internal::ConstSliceBase< Internal::PtrSliceStorage, const T *>::subSlice(), and Exiv2::Internal::MutableSliceBase< Internal::ContainerStorage, T >::subSlice().
|
inline |
Return the number of elements in the slice.
References begin_.
Referenced by Exiv2::makeSlice(), Exiv2::makeSliceFrom(), Exiv2::IptcData::printStructure(), and rangeCheck().
|
protected |
lower and upper bounds of the slice with respect to the container/array stored in storage_
Referenced by Exiv2::Internal::ConstSliceBase< Internal::PtrSliceStorage, const T *>::at(), Exiv2::Internal::MutableSliceBase< Internal::ContainerStorage, T >::at(), Exiv2::Internal::MutableSliceBase< Internal::ContainerStorage, T >::begin(), Exiv2::Internal::ConstSliceBase< Internal::PtrSliceStorage, const T *>::cbegin(), size(), Exiv2::Internal::ConstSliceBase< Internal::PtrSliceStorage, const T *>::subSlice(), Exiv2::Internal::MutableSliceBase< Internal::ContainerStorage, T >::subSlice(), and Exiv2::Internal::MutableSliceBase< Internal::ContainerStorage, T >::to_const_base().