| Exiv2

Loading...
Searching...
No Matches
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
Exiv2::Internal::SliceBase Struct Reference

`#include <slice.hpp>`

Inheritance diagram for Exiv2::Internal::SliceBase:
[legend]

## Public Member Functions
| SliceBase (size_t begin, size_t end)
size_t | size () const noexcept

## Protected Member Functions
void | rangeCheck (size_t index) const

## Protected Attributes
size_t | begin_
size_t | end_

## Detailed Description

Common base class of all slice implementations.

Implements only the most basic functions, which do not require any knowledge about the stored data.

## Member Function Documentation

## ◆ rangeCheck()

void Exiv2::Internal::SliceBase::rangeCheck | ( | size_t | index | ) | const
| inline protected

Throw an exception when index is too large.

Exceptions

  std::out_of_range | when index will access an element outside of the slice

References size().

Referenced by Exiv2::Internal::ConstSliceBase< storage_type, data_type >::at(), Exiv2::Internal::MutableSliceBase< storage_type, data_type >::at(), Exiv2::Internal::ConstSliceBase< storage_type, data_type >::subSlice(), and Exiv2::Internal::MutableSliceBase< storage_type, data_type >::subSlice().

## ◆ size()

size_t Exiv2::Internal::SliceBase::size | ( |  | ) | const
| inline nodiscard noexcept

Return the number of elements in the slice.

References begin_.

Referenced by Exiv2::IptcData::printStructure(), and rangeCheck().

## Member Data Documentation

## ◆ begin_

size_t Exiv2::Internal::SliceBase::begin_
| protected

lower and upper bounds of the slice with respect to the container/array stored in storage_

Referenced by Exiv2::Internal::ConstSliceBase< storage_type, data_type >::at(), Exiv2::Internal::MutableSliceBase< storage_type, data_type >::at(), Exiv2::Internal::MutableSliceBase< storage_type, data_type >::begin(), Exiv2::Internal::ConstSliceBase< storage_type, data_type >::cbegin(), size(), Exiv2::Internal::ConstSliceBase< storage_type, data_type >::subSlice(), and Exiv2::Internal::MutableSliceBase< storage_type, data_type >::subSlice().

The documentation for this struct was generated from the following file:

- slice.hpp