Direct-BT v3.3.0-1-gc2d430c
Direct-BT - Direct Bluetooth Programming.
Public Member Functions | List of all members
jau::TOctetSlice Class Reference

Transient endian aware octet data slice, i.e. More...

#include <octets.hpp>

Collaboration diagram for jau::TOctetSlice:

Public Member Functions

 TOctetSlice (const TOctets &buffer_, const nsize_t offset_, const nsize_t size_)
 Creates a view of a given TOctet with the specified offset_ and size_. More...
 
constexpr lb_endian_t byte_order () const noexcept
 Returns byte order of this octet store. More...
 
uint8_t const * get_ptr (const nsize_t i) const
 
constexpr uint8_t const * get_ptr_nc (const nsize_t i) const noexcept
 
uint16_t get_uint16 (const nsize_t i) const
 
constexpr uint16_t get_uint16_nc (const nsize_t i) const noexcept
 
uint8_t get_uint8 (const nsize_t i) const
 
constexpr uint8_t get_uint8_nc (const nsize_t i) const noexcept
 
constexpr nsize_t offset () const noexcept
 
constexpr const TOctetsparent () const noexcept
 
constexpr nsize_t size () const noexcept
 
std::string toString () const noexcept
 

Detailed Description

Transient endian aware octet data slice, i.e.

a view of an TOctet.

Endian byte order is defined by its parent TOctet.

Definition at line 494 of file octets.hpp.

Constructor & Destructor Documentation

◆ TOctetSlice()

jau::TOctetSlice::TOctetSlice ( const TOctets buffer_,
const nsize_t  offset_,
const nsize_t  size_ 
)
inline

Creates a view of a given TOctet with the specified offset_ and size_.

Parameters
buffer_the parent TOctet buffer
offset_offset to the parent TOctet buffer
size_size of this view, starting at offset_
Exceptions
IndexOutOfBoundsExceptionif offset_ + size_ > parent buffer_.size()

Definition at line 510 of file octets.hpp.

Member Function Documentation

◆ byte_order()

constexpr lb_endian_t jau::TOctetSlice::byte_order ( ) const
inlineconstexprnoexcept

Returns byte order of this octet store.

Definition at line 519 of file octets.hpp.

Here is the caller graph for this function:

◆ size()

constexpr nsize_t jau::TOctetSlice::size ( ) const
inlineconstexprnoexcept

Definition at line 521 of file octets.hpp.

Here is the caller graph for this function:

◆ offset()

constexpr nsize_t jau::TOctetSlice::offset ( ) const
inlineconstexprnoexcept

Definition at line 522 of file octets.hpp.

Here is the caller graph for this function:

◆ parent()

constexpr const TOctets & jau::TOctetSlice::parent ( ) const
inlineconstexprnoexcept

Definition at line 523 of file octets.hpp.

Here is the caller graph for this function:

◆ get_uint8()

uint8_t jau::TOctetSlice::get_uint8 ( const nsize_t  i) const
inline

Definition at line 525 of file octets.hpp.

◆ get_uint8_nc()

constexpr uint8_t jau::TOctetSlice::get_uint8_nc ( const nsize_t  i) const
inlineconstexprnoexcept

Definition at line 528 of file octets.hpp.

◆ get_uint16()

uint16_t jau::TOctetSlice::get_uint16 ( const nsize_t  i) const
inline

Definition at line 532 of file octets.hpp.

◆ get_uint16_nc()

constexpr uint16_t jau::TOctetSlice::get_uint16_nc ( const nsize_t  i) const
inlineconstexprnoexcept

Definition at line 535 of file octets.hpp.

Here is the caller graph for this function:

◆ get_ptr()

uint8_t const * jau::TOctetSlice::get_ptr ( const nsize_t  i) const
inline

Definition at line 539 of file octets.hpp.

Here is the caller graph for this function:

◆ get_ptr_nc()

constexpr uint8_t const * jau::TOctetSlice::get_ptr_nc ( const nsize_t  i) const
inlineconstexprnoexcept

Definition at line 542 of file octets.hpp.

Here is the caller graph for this function:

◆ toString()

std::string jau::TOctetSlice::toString ( ) const
inlinenoexcept

Definition at line 546 of file octets.hpp.

Here is the caller graph for this function:

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