iceoryx2
C++ Bindings
Loading...
Searching...
No Matches
iox2::bb::StaticString< N >::UncheckedAccessorCodeUnits Class Reference

#include <static_string.hpp>

Public Member Functions

 ~UncheckedAccessorCodeUnits ()=default
 UncheckedAccessorCodeUnits (UncheckedAccessorCodeUnits const &)=delete
 UncheckedAccessorCodeUnits (UncheckedAccessorCodeUnits &&)=default
auto operator= (UncheckedAccessorCodeUnits const &) -> UncheckedAccessorCodeUnits &=delete
auto operator= (UncheckedAccessorCodeUnits &&) -> UncheckedAccessorCodeUnits &=delete
auto element_at (SizeType index) noexcept -> OptionalCodeUnitReference
auto front_element () noexcept -> OptionalCodeUnitReference
auto back_element () noexcept -> OptionalCodeUnitReference
auto try_erase_at (SizeType index) noexcept -> bool
 Removes a single code unit at index.
auto try_erase_at (SizeType begin_index, SizeType end_index) noexcept -> bool
 Removes the range of code units at [begin_index, end_index).

Friends

class StaticString
template<typename, uint64_t Capacity, bb::DoesContainInvalidContent< Capacity >, bb::DoesContainInvalidCharacter< Capacity >>
class bb::SemanticString

Detailed Description

template<uint64_t N>
class iox2::bb::StaticString< N >::UncheckedAccessorCodeUnits

The unchecked API provided by this class allows for encoding violations. Users of this class must ensure that writes to the string do not result in a sequence of bytes that is no longer a valid UTF-8 encoded string. This includes not setting any of the string characters to NUL (U+0000).

Definition at line 186 of file static_string.hpp.

Constructor & Destructor Documentation

◆ ~UncheckedAccessorCodeUnits()

template<uint64_t N>
iox2::bb::StaticString< N >::UncheckedAccessorCodeUnits::~UncheckedAccessorCodeUnits ( )
default

◆ UncheckedAccessorCodeUnits() [1/2]

template<uint64_t N>
iox2::bb::StaticString< N >::UncheckedAccessorCodeUnits::UncheckedAccessorCodeUnits ( UncheckedAccessorCodeUnits const & )
delete

◆ UncheckedAccessorCodeUnits() [2/2]

template<uint64_t N>
iox2::bb::StaticString< N >::UncheckedAccessorCodeUnits::UncheckedAccessorCodeUnits ( UncheckedAccessorCodeUnits && )
default

Member Function Documentation

◆ back_element()

template<uint64_t N>
auto iox2::bb::StaticString< N >::UncheckedAccessorCodeUnits::back_element ( ) ->OptionalCodeUnitReference
inlinenoexcept

Retrieve a reference to the last code unit at the end of the string.

Returns
A reference to the back code unit or NULLOPT if the string is empty.

Definition at line 264 of file static_string.hpp.

References iox2::bb::NULLOPT.

◆ element_at()

template<uint64_t N>
auto iox2::bb::StaticString< N >::UncheckedAccessorCodeUnits::element_at ( SizeType index) ->OptionalCodeUnitReference
inlinenoexcept

Retrieve a reference to the single code unit at index.

Returns
A reference to the code unit or NULLOPT if the index is out of bounds.

Definition at line 244 of file static_string.hpp.

References iox2::bb::NULLOPT.

◆ front_element()

template<uint64_t N>
auto iox2::bb::StaticString< N >::UncheckedAccessorCodeUnits::front_element ( ) ->OptionalCodeUnitReference
inlinenoexcept

Retrieve a reference to the first code unit at the beginning of the string.

Returns
A reference to the front code unit or NULLOPT if the string is empty.

Definition at line 254 of file static_string.hpp.

References iox2::bb::NULLOPT.

◆ operator=() [1/2]

template<uint64_t N>
auto iox2::bb::StaticString< N >::UncheckedAccessorCodeUnits::operator= ( UncheckedAccessorCodeUnits && ) ->UncheckedAccessorCodeUnits &=delete
delete

◆ operator=() [2/2]

template<uint64_t N>
auto iox2::bb::StaticString< N >::UncheckedAccessorCodeUnits::operator= ( UncheckedAccessorCodeUnits const & ) ->UncheckedAccessorCodeUnits &=delete
delete

◆ try_erase_at() [1/2]

template<uint64_t N>
auto iox2::bb::StaticString< N >::UncheckedAccessorCodeUnits::try_erase_at ( SizeType begin_index,
SizeType end_index )->bool
inlinenoexcept

Removes the range of code units at [begin_index, end_index).

Definition at line 278 of file static_string.hpp.

◆ try_erase_at() [2/2]

template<uint64_t N>
auto iox2::bb::StaticString< N >::UncheckedAccessorCodeUnits::try_erase_at ( SizeType index) ->bool
inlinenoexcept

Removes a single code unit at index.

Definition at line 273 of file static_string.hpp.

References try_erase_at().

Referenced by try_erase_at().

◆ bb::SemanticString

template<uint64_t N>
template<typename, uint64_t Capacity, bb::DoesContainInvalidContent< Capacity >, bb::DoesContainInvalidCharacter< Capacity >>
friend class bb::SemanticString
friend

Definition at line 192 of file static_string.hpp.

References StaticString.

◆ StaticString

template<uint64_t N>
friend class StaticString
friend

Definition at line 187 of file static_string.hpp.

References StaticString.

Referenced by bb::SemanticString, and StaticString.


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