utl::id_t< _Tp, _Nm > Struct Template Reference

A standard container for storing IDs as a fixed size sequence of bytes. This type is based on etl::array Meets the requirements of: container, reversible container, sequence. Sets support random access iterators. More...

`#include <id.h>`

## Public Types

using | value_type = _Tp
using | pointer = value_type *
using | const_pointer = const value_type *
using | reference = value_type &
using | const_reference = const value_type &
using | iterator = value_type *
using | const_iterator = const value_type *
using | size_type = size_t
using | difference_type = std::ptrdiff_t
using | reverse_iterator = std::reverse_iterator< iterator >
using | const_reverse_iterator = std::reverse_iterator< const_iterator >
using | traits_t = id_traits< _Tp, _Nm >

## Public Member Functions

void | fill (const value_type &v)
void | swap (id_t &other) noexcept
Iterators.
iterator | begin () noexcept
const_iterator | begin () const noexcept
iterator | end () noexcept
const_iterator | end () const noexcept
const_iterator | cbegin () const noexcept
const_iterator | cend () const noexcept
reverse_iterator | rbegin () noexcept
reverse_iterator | rend () noexcept
const_reverse_iterator | rbegin () const noexcept
const_reverse_iterator | rend () const noexcept
const_reverse_iterator | crbegin () const noexcept
const_reverse_iterator | crend () const noexcept
Capacity.
constexpr size_type | size () const noexcept
constexpr size_type | max_size () const noexcept
constexpr bool | empty () const noexcept
Element access.
reference | operator[] (size_type n) noexcept
| Operator []. More...
constexpr const_reference | operator[] (size_type n) const noexcept
| Operator [] for const. More...
reference | at (size_type n) noexcept
constexpr const_reference | at (size_type n) const noexcept
| Compile time boundary check dereference operator. More...
constexpr bool | bit (uint8_t bit) const noexcept
void | bit (uint8_t bit, bool v) noexcept
reference | front () noexcept
constexpr const_reference | front () const noexcept
reference | back () noexcept
constexpr const_reference | back () const noexcept
pointer | data () noexcept
const_pointer | data () const noexcept

## Public Attributes

traits_t::type | _data

## Detailed Description

### template<typename _Tp, size_t _Nm>
struct utl::id_t< _Tp, _Nm >

A standard container for storing IDs as a fixed size sequence of bytes. This type is based on etl::array Meets the requirements of: container, reversible container, sequence. Sets support random access iterators.

Template Parameters

  _Tp | The base type
  _Nm | Number of bytes.

Definition at line 78 of file id.h.

## Member Typedef Documentation

## const_iterator

template<typename _Tp, size_t _Nm>

using utl::id_t< _Tp, _Nm >::const_iterator = const value_type*

Definition at line 85 of file id.h.

## const_pointer

template<typename _Tp, size_t _Nm>

using utl::id_t< _Tp, _Nm >::const_pointer = const value_type*

Definition at line 81 of file id.h.

## const_reference

template<typename _Tp, size_t _Nm>

using utl::id_t< _Tp, _Nm >::const_reference = const value_type&

Definition at line 83 of file id.h.

## const_reverse_iterator

template<typename _Tp, size_t _Nm>

using utl::id_t< _Tp, _Nm >::const_reverse_iterator = std::reverse_iterator <const_iterator>

Definition at line 90 of file id.h.

## difference_type

template<typename _Tp, size_t _Nm>

using utl::id_t< _Tp, _Nm >::difference_type = std::ptrdiff_t

Definition at line 87 of file id.h.

## iterator

template<typename _Tp, size_t _Nm>

using utl::id_t< _Tp, _Nm >::iterator = value_type*

Definition at line 84 of file id.h.

## pointer

template<typename _Tp, size_t _Nm>

using utl::id_t< _Tp, _Nm >::pointer = value_type*

Definition at line 80 of file id.h.

## reference

template<typename _Tp, size_t _Nm>

using utl::id_t< _Tp, _Nm >::reference = value_type&

Definition at line 82 of file id.h.

## reverse_iterator

template<typename _Tp, size_t _Nm>

using utl::id_t< _Tp, _Nm >::reverse_iterator = std::reverse_iterator <iterator>

Definition at line 88 of file id.h.

## size_type

template<typename _Tp, size_t _Nm>

using utl::id_t< _Tp, _Nm >::size_type = size_t

Definition at line 86 of file id.h.

## traits_t

template<typename _Tp, size_t _Nm>

using utl::id_t< _Tp, _Nm >::traits_t = id_traits<_Tp, _Nm>

Definition at line 93 of file id.h.

## value_type

template<typename _Tp, size_t _Nm>

using utl::id_t< _Tp, _Nm >::value_type = _Tp

Definition at line 79 of file id.h.

## Member Function Documentation

## at() [1/2]

template<typename _Tp, size_t _Nm>

reference utl::id_t< _Tp, _Nm >::at | ( | size_type | n | ) |

inlinenoexcept

Boundary check dereference operator. If out of bounds, abort (for now).

Definition at line 144 of file id.h.

## at() [2/2]

template<typename _Tp, size_t _Nm>

constexpr const_reference utl::id_t< _Tp, _Nm >::at | ( | size_type | n | ) | const

inlinenoexcept

Compile time boundary check dereference operator.

Definition at line 151 of file id.h.

## back() [1/2]

template<typename _Tp, size_t _Nm>

reference utl::id_t< _Tp, _Nm >::back | ( |  | ) |

inlinenoexcept

Definition at line 184 of file id.h.

## back() [2/2]

template<typename _Tp, size_t _Nm>

constexpr const_reference utl::id_t< _Tp, _Nm >::back | ( |  | ) | const

inlinenoexcept

Definition at line 187 of file id.h.

## begin() [1/2]

template<typename _Tp, size_t _Nm>

iterator utl::id_t< _Tp, _Nm >::begin | ( |  | ) |

inlinenoexcept

Definition at line 107 of file id.h.

## begin() [2/2]

template<typename _Tp, size_t _Nm>

const_iterator utl::id_t< _Tp, _Nm >::begin | ( |  | ) | const

inlinenoexcept

Definition at line 108 of file id.h.

## bit() [1/2]

template<typename _Tp, size_t _Nm>

constexpr bool utl::id_t< _Tp, _Nm >::bit | ( | uint8_t | bit | ) | const

inlinenoexcept

Read a bit position from a id

Parameters

  bit | The bit location we want to read

Definition at line 159 of file id.h.

## bit() [2/2]

template<typename _Tp, size_t _Nm>

void utl::id_t< _Tp, _Nm >::bit | ( | uint8_t | bit,
|  | bool | v
| ) |  |

inlinenoexcept

Write/modify a bit position from a id

Parameters

  bit | The bit location we want to set
  v | The value we want to set

Definition at line 169 of file id.h.

## cbegin()

template<typename _Tp, size_t _Nm>

const_iterator utl::id_t< _Tp, _Nm >::cbegin | ( |  | ) | const

inlinenoexcept

Definition at line 111 of file id.h.

## cend()

template<typename _Tp, size_t _Nm>

const_iterator utl::id_t< _Tp, _Nm >::cend | ( |  | ) | const

inlinenoexcept

Definition at line 112 of file id.h.

## crbegin()

template<typename _Tp, size_t _Nm>

const_reverse_iterator utl::id_t< _Tp, _Nm >::crbegin | ( |  | ) | const

inlinenoexcept

Definition at line 118 of file id.h.

## crend()

template<typename _Tp, size_t _Nm>

const_reverse_iterator utl::id_t< _Tp, _Nm >::crend | ( |  | ) | const

inlinenoexcept

Definition at line 119 of file id.h.

## data() [1/2]

template<typename _Tp, size_t _Nm>

pointer utl::id_t< _Tp, _Nm >::data | ( |  | ) |

inlinenoexcept

Definition at line 193 of file id.h.

## data() [2/2]

template<typename _Tp, size_t _Nm>

const_pointer utl::id_t< _Tp, _Nm >::data | ( |  | ) | const

inlinenoexcept

Definition at line 194 of file id.h.

## empty()

template<typename _Tp, size_t _Nm>

constexpr bool utl::id_t< _Tp, _Nm >::empty | ( |  | ) | const

inlinenoexcept

Definition at line 125 of file id.h.

## end() [1/2]

template<typename _Tp, size_t _Nm>

iterator utl::id_t< _Tp, _Nm >::end | ( |  | ) |

inlinenoexcept

Definition at line 109 of file id.h.

## end() [2/2]

template<typename _Tp, size_t _Nm>

const_iterator utl::id_t< _Tp, _Nm >::end | ( |  | ) | const

inlinenoexcept

Definition at line 110 of file id.h.

## fill()

template<typename _Tp, size_t _Nm>

void utl::id_t< _Tp, _Nm >::fill | ( | const value_type & | v | ) |

inline

Definition at line 99 of file id.h.

## front() [1/2]

template<typename _Tp, size_t _Nm>

reference utl::id_t< _Tp, _Nm >::front | ( |  | ) |

inlinenoexcept

Definition at line 176 of file id.h.

## front() [2/2]

template<typename _Tp, size_t _Nm>

constexpr const_reference utl::id_t< _Tp, _Nm >::front | ( |  | ) | const

inlinenoexcept

Definition at line 179 of file id.h.

## max_size()

template<typename _Tp, size_t _Nm>

constexpr size_type utl::id_t< _Tp, _Nm >::max_size | ( |  | ) | const

inlinenoexcept

Definition at line 124 of file id.h.

## operator[]() [1/2]

template<typename _Tp, size_t _Nm>

reference utl::id_t< _Tp, _Nm >::operator[] | ( | size_type | n | ) |

inlinenoexcept

Operator [].

Definition at line 132 of file id.h.

## operator[]() [2/2]

template<typename _Tp, size_t _Nm>

constexpr const_reference utl::id_t< _Tp, _Nm >::operator[] | ( | size_type | n | ) | const

inlinenoexcept

Operator [] for const.

Definition at line 136 of file id.h.

## rbegin() [1/2]

template<typename _Tp, size_t _Nm>

reverse_iterator utl::id_t< _Tp, _Nm >::rbegin | ( |  | ) |

inlinenoexcept

Definition at line 114 of file id.h.

## rbegin() [2/2]

template<typename _Tp, size_t _Nm>

const_reverse_iterator utl::id_t< _Tp, _Nm >::rbegin | ( |  | ) | const

inlinenoexcept

Definition at line 116 of file id.h.

## rend() [1/2]

template<typename _Tp, size_t _Nm>

reverse_iterator utl::id_t< _Tp, _Nm >::rend | ( |  | ) |

inlinenoexcept

Definition at line 115 of file id.h.

## rend() [2/2]

template<typename _Tp, size_t _Nm>

const_reverse_iterator utl::id_t< _Tp, _Nm >::rend | ( |  | ) | const

inlinenoexcept

Definition at line 117 of file id.h.

## size()

template<typename _Tp, size_t _Nm>

constexpr size_type utl::id_t< _Tp, _Nm >::size | ( |  | ) | const

inlinenoexcept

Definition at line 123 of file id.h.

## swap()

template<typename _Tp, size_t _Nm>

void utl::id_t< _Tp, _Nm >::swap | ( | id_t< _Tp, _Nm > & | other | ) |

inlinenoexcept

Definition at line 101 of file id.h.

## Member Data Documentation

## _data

template<typename _Tp, size_t _Nm>

traits_t::type utl::id_t< _Tp, _Nm >::_data

Definition at line 94 of file id.h.

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

- include/utl/container/id.h