ICU4X
International Components for Unicode
Loading...
Searching...
No Matches
ICU4XReorderedIndexMap Class Reference

#include <ICU4XReorderedIndexMap.hpp>

Public Member Functions

const diplomat::span< const size_t > as_slice () const
 
size_t len () const
 
bool is_empty () const
 
size_t get (size_t index) const
 
 ICU4XReorderedIndexMap (capi::ICU4XReorderedIndexMap *i)
 
 ICU4XReorderedIndexMap ()=default
 
 ICU4XReorderedIndexMap (ICU4XReorderedIndexMap &&) noexcept=default
 
ICU4XReorderedIndexMapoperator= (ICU4XReorderedIndexMap &&other) noexcept=default
 

Detailed Description

Thin wrapper around a vector that maps visual indices to source indices

map[visualIndex] = sourceIndex

Produced by reorder_visual() on [ICU4XBidi].

Constructor & Destructor Documentation

◆ ICU4XReorderedIndexMap() [1/3]

ICU4XReorderedIndexMap::ICU4XReorderedIndexMap ( capi::ICU4XReorderedIndexMap * i)
inlineexplicit

◆ ICU4XReorderedIndexMap() [2/3]

ICU4XReorderedIndexMap::ICU4XReorderedIndexMap ( )
default

◆ ICU4XReorderedIndexMap() [3/3]

ICU4XReorderedIndexMap::ICU4XReorderedIndexMap ( ICU4XReorderedIndexMap && )
defaultnoexcept

Member Function Documentation

◆ as_slice()

const diplomat::span< const size_t > ICU4XReorderedIndexMap::as_slice ( ) const
inline

Get this as a slice/array of indices

Lifetimes: this must live at least as long as the output.

◆ get()

size_t ICU4XReorderedIndexMap::get ( size_t index) const
inline

Get element at index. Returns 0 when out of bounds (note that 0 is also a valid in-bounds value, please use len() to avoid out-of-bounds)

◆ is_empty()

bool ICU4XReorderedIndexMap::is_empty ( ) const
inline

Whether this map is empty

◆ len()

size_t ICU4XReorderedIndexMap::len ( ) const
inline

The length of this map

◆ operator=()

ICU4XReorderedIndexMap & ICU4XReorderedIndexMap::operator= ( ICU4XReorderedIndexMap && other)
defaultnoexcept

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