Loading...
Searching...
No Matches
Exiv2::Internal::PtrSliceStorage< storage_type > Struct Template Reference

Implementation of the storage concept for slices of C arrays. More...

`#include <slice.hpp>`

Inheritance diagram for Exiv2::Internal::PtrSliceStorage< storage_type >:
[legend]

## Public Types

using | value_type = typename std::remove_cv<typename std::remove_pointer<storage_type>::type>::type
using | iterator = value_type*
using | const_iterator = const value_type*

## Public Member Functions

| PtrSliceStorage (storage_type ptr, size_t, size_t)
value_type & | unsafeAt (size_t index) noexcept
const value_type & | unsafeAt (size_t index) const noexcept
iterator | unsafeGetIteratorAt (size_t index) noexcept
const_iterator | unsafeGetIteratorAt (size_t index) const noexcept

## Public Attributes

storage_type | data_

## Detailed Description

template<typename storage_type>
struct Exiv2::Internal::PtrSliceStorage< storage_type >

Implementation of the storage concept for slices of C arrays.

Template Parameters

  storage_type | Type as which the C-array should be stored. Use this parameter to save constant arrays as const and mutable ones as non-const.

## Constructor & Destructor Documentation

## PtrSliceStorage()

template<typename storage_type>

Exiv2::Internal::PtrSliceStorage< storage_type >::PtrSliceStorage | ( | storage_type | ptr,
|  | size_t | ,
|  | size_t | )

inline

Stores ptr and checks that it is not NULL. The slice's bounds are ignored, as we do not know the array's length.

Exceptions

  std::invalid_argument | when ptr is NULL

## Member Function Documentation

## unsafeAt()

template<typename storage_type>

value_type & Exiv2::Internal::PtrSliceStorage< storage_type >::unsafeAt | ( | size_t | index | ) |

inline nodiscard noexcept

Obtain a reference to the element with the given index in the array.

Exceptions

  nothing |

## unsafeGetIteratorAt()

template<typename storage_type>

iterator Exiv2::Internal::PtrSliceStorage< storage_type >::unsafeGetIteratorAt | ( | size_t | index | ) |

inline nodiscard noexcept

Obtain an iterator (=pointer) at the position of the element with the given index in the container.

Exceptions

  nothing |

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

- slice.hpp