![]() |
Exiv2
|
#include <slice.hpp>
Public Types | |
using | iterator |
using | const_iterator |
using | value_type |
![]() | |
using | iterator = typename ConstSliceBase<storage_type, data_type>::iterator |
using | const_iterator = typename ConstSliceBase<storage_type, data_type>::const_iterator |
using | value_type = typename ConstSliceBase<storage_type, data_type>::value_type |
![]() | |
using | iterator = typename storage_type<data_type>::iterator |
using | const_iterator = typename storage_type<data_type>::const_iterator |
using | value_type = typename storage_type<data_type>::value_type |
![]() | |
using | iterator |
using | const_iterator |
using | value_type |
Public Member Functions | |
Slice (const T *ptr, size_t begin, size_t end) | |
Slice< const T * > | subSlice (size_t begin, size_t end) const |
Slice | subSlice (size_t begin, size_t end) |
Slice< const const T * > | subSlice (size_t begin, size_t end) const |
![]() | |
value_type & | at (size_t index) |
const value_type & | at (size_t index) const |
iterator | begin () noexcept |
iterator | end () noexcept |
![]() | |
ConstSliceBase (data_type &data, size_t begin, size_t end) | |
const value_type & | at (size_t index) const |
const_iterator | cbegin () const noexcept |
const_iterator | cend () const noexcept |
template<typename slice_type> | |
slice_type | subSlice (size_t begin, size_t end) const |
![]() | |
SliceBase (size_t begin, size_t end) | |
size_t | size () const noexcept |
![]() | |
ConstSliceBase (const T *&data, size_t begin, size_t end) | |
const value_type & | at (size_t index) const |
const_iterator | cbegin () const noexcept |
const_iterator | cend () const noexcept |
slice_type | subSlice (size_t begin, size_t end) const |
Additional Inherited Members | |
![]() | |
using | base_type = ConstSliceBase<storage_type, data_type> |
![]() | |
ConstSliceBase< storage_type, const data_type > | to_const_base () const noexcept |
template<typename slice_type> | |
slice_type | subSlice (size_t begin, size_t end) |
![]() | |
void | rangeCheck (size_t index) const |
![]() | |
storage_type< data_type > | storage_ |
![]() | |
size_t | begin_ |
size_t | end_ |
![]() | |
Internal::PtrSliceStorage< const T * > | storage_ |
Specialization of slices for constant C-arrays.
These have exactly the same interface as the slices for STL-containers, with the crucial exception, that the slice's constructor cannot make a proper bounds check! It can only verify that you didn't accidentally swap begin and end!
|
inline |
Constructor.
[in] | ptr | C-array of which a slice should be constructed. Must not be a null pointer. |
[in] | begin | Index of the first element in the slice. |
[in] | end | Index of the first element that is no longer in the slice. |
Please note that the constructor has no way how to verify that begin
and end
are not out of bounds of the provided array!
References Exiv2::Internal::MutableSliceBase< storage_type, data_type >::begin(), Exiv2::Internal::ConstSliceBase< Internal::PtrSliceStorage, const T * >::ConstSliceBase(), and Exiv2::Internal::MutableSliceBase< storage_type, data_type >::end().
|
inline |
Construct a sub-slice of this slice with the given bounds. The bounds are evaluated with respect to the current slice.
[in] | begin | First element in the new slice. |
[in] | end | First element beyond the new slice. |
std::out_of_range | when begin or end are invalid |
|
inlinenodiscard |
Constructs a new constant subSlice. Behaves otherwise exactly like the non-const version.