iceoryx2
C++ Language 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 185 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 263 of file static_string.hpp.

References iox2::bb::StaticString< N >::empty(), iox2::bb::NULLOPT, and iox2::bb::StaticString< N >::size().

◆ 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 243 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 253 of file static_string.hpp.

References iox2::bb::StaticString< N >::empty(), and 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 277 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

Friends And Related Symbol Documentation

◆ 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 191 of file static_string.hpp.

◆ StaticString

template<uint64_t N>
friend class StaticString
friend

Definition at line 186 of file static_string.hpp.


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