|
| | Slice (T *data, uint64_t number_of_elements) |
| | Constructs a Slice object.
|
| auto | number_of_bytes () const -> uint64_t |
| | Returns the total number of bytes occupied by the slice.
|
| auto | number_of_elements () const -> uint64_t |
| | Returns the number of elements in the slice.
|
| auto | operator[] (uint64_t n) const -> const ValueType & |
| | Accesses the element at the specified index (const version).
|
| auto | operator[] (uint64_t n) -> std::conditional_t< std::is_const< T >::value, const ValueType &, ValueType & > |
| | Accesses the element at the specified index (non-const version).
|
| auto | begin () const -> ConstIterator |
| | Returns an iterator to the beginning of the slice (const version).
|
| auto | begin () -> Iterator |
| | Returns an iterator to the beginning of the slice (non-const version).
|
| auto | end () const -> ConstIterator |
| | Returns an iterator to the end of the slice (const version).
|
| auto | end () -> Iterator |
| | Returns an iterator to the end of the slice (non-const version).
|
| auto | data () const -> ConstIterator |
| | Returns a pointer to the underlying data of the slice (const version).
|
| auto | data () -> Iterator |
| | Returns a pointer to the underlying data of the slice (non-const version).
|
template<typename T>
class iox2::bb::Slice< T >
A class representing a slice of contiguous elements of type T.
A Slice provides a view into a contiguous sequence of elements without owning the memory. It allows for efficient access and iteration over a portion of a contiguous data structure.
- Template Parameters
-
| T | The type of elements in the slice. Can be const-qualified for read-only slices. |
Definition at line 31 of file slice.hpp.