template<template< typename data_type > class storage_type, typename data_type>
struct Exiv2::Internal::ConstSliceBase< storage_type, data_type >
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:
- (const) value_type& unsafeAt(size_t index) (const) Return the value at the given index of the underlying container, without promising to perform a range check and without any knowledge of the slices' size
- const_iterator/iterator unsafeGetIteratorAt(size_t index) (const) Return a (constant) iterator at the given index of the underlying container. Again, no range checks are promised.
- Constructor(data_type& data, size_t begin, size_t end) Can use
begin
& end
to perform range checks on data
, but should not store both values. Must not take ownership of data
!
- Must save data as a public member named
data_
.
- Must provide appropriate typedefs for iterator, const_iterator and value_type