This class provides the public-facing const-qualified methods of a slice. More...
#include <slice.hpp>
Public Types | |
typedef storage_type< data_type >::iterator | iterator |
typedef storage_type< data_type >::const_iterator | const_iterator |
typedef storage_type< data_type >::value_type | value_type |
Public Member Functions | |
ConstSliceBase (data_type &data, size_t begin, size_t end) | |
const value_type & | at (size_t index) const |
const_iterator | cbegin () const throw () |
const_iterator | cend () const throw () |
template<typename slice_type > | |
slice_type | subSlice (size_t begin, size_t end) const |
Public Member Functions inherited from Exiv2::Internal::SliceBase | |
SliceBase (size_t begin, size_t end) | |
size_t | size () const throw () |
Protected Attributes | |
storage_type< data_type > | storage_ |
Protected Attributes inherited from Exiv2::Internal::SliceBase | |
const size_t | begin_ |
const size_t | end_ |
Additional Inherited Members | |
Protected Member Functions inherited from Exiv2::Internal::SliceBase | |
void | rangeCheck (size_t index) const |
This class provides the public-facing const-qualified methods of a slice.
The public methods are implemented in a generic fashion using a storage_type. This type contains the actual reference to the data to which the slice points and provides the following methods:
begin
& end
to perform range checks on data
, but should not store both values. Must not take ownership of data
!data_
.
|
inline |
Default contructor, requires begin to be smaller than end, otherwise an exception is thrown. Also forwards all parameters to the constructor of storage_
|
inline |
Obtain a constant reference to the element with the specified index in the slice.
std::out_of_range | when index is out of bounds of the slice |
|
inline |
Obtain a constant iterator to the first element in the slice.
|
inline |
Obtain a constant iterator to the first beyond the slice.
|
inline |
Create a constant sub-slice with the given bounds (with respect to the current slice).
slice_type | Type of the slice that this function shall return. Provide it with the type of the class that derives from mutable_slice_base. |
|
protected |
Stores a reference to the actual data.
Referenced by Exiv2::Internal::ConstSliceBase< Internal::PtrSliceStorage, const T * >::at(), Exiv2::Internal::MutableSliceBase< Internal::PtrSliceStorage, T * >::at(), Exiv2::Internal::MutableSliceBase< Internal::PtrSliceStorage, T * >::begin(), Exiv2::Internal::ConstSliceBase< Internal::PtrSliceStorage, const T * >::cbegin(), Exiv2::Internal::ConstSliceBase< Internal::PtrSliceStorage, const T * >::cend(), Exiv2::Internal::MutableSliceBase< Internal::PtrSliceStorage, T * >::end(), Exiv2::Internal::ConstSliceBase< Internal::PtrSliceStorage, const T * >::subSlice(), Exiv2::Internal::MutableSliceBase< Internal::PtrSliceStorage, T * >::subSlice(), and Exiv2::Internal::MutableSliceBase< Internal::PtrSliceStorage, T * >::to_const_base().