Direct-BT  2.3.1
Direct-BT - Direct Bluetooth Programming.
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | List of all members
direct_bt::uuid_t Class Reference

#include <UUID.hpp>

Inheritance diagram for direct_bt::uuid_t:
Collaboration diagram for direct_bt::uuid_t:

Public Types

enum  TypeSize : jau::nsize_t { TypeSize::UUID16_SZ =2, TypeSize::UUID32_SZ =4, TypeSize::UUID128_SZ =16 }
 Underlying integer value present octet count. More...
 

Public Member Functions

virtual ~uuid_t () noexcept
 
 uuid_t (const uuid_t &o) noexcept=default
 
 uuid_t (uuid_t &&o) noexcept=default
 
uuid_toperator= (const uuid_t &o) noexcept=default
 
uuid_toperator= (uuid_t &&o) noexcept=default
 
virtual bool operator== (uuid_t const &o) const noexcept
 
bool operator!= (uuid_t const &o) const noexcept
 
TypeSize getTypeSize () const noexcept
 
jau::nsize_t getTypeSizeInt () const noexcept
 
uuid128_t toUUID128 (uuid128_t const &base_uuid=BT_BASE_UUID, jau::nsize_t const uuid32_le_octet_index=12) const noexcept
 
virtual const uint8_t * data () const noexcept
 returns the pointer to the uuid data of size getTypeSize() More...
 
virtual std::string toString () const noexcept
 
virtual std::string toUUID128String (uuid128_t const &base_uuid=BT_BASE_UUID, jau::nsize_t const le_octet_index=12) const noexcept
 

Static Public Member Functions

static constexpr jau::nsize_t number (const TypeSize rhs) noexcept
 
static TypeSize toTypeSize (const jau::nsize_t size)
 
static std::unique_ptr< const uuid_tcreate (TypeSize const t, uint8_t const *const buffer, jau::nsize_t const byte_offset, bool const littleEndian)
 

Protected Member Functions

 uuid_t (TypeSize const type_)
 

Detailed Description

Definition at line 52 of file UUID.hpp.

Member Enumeration Documentation

◆ TypeSize

Underlying integer value present octet count.

Enumerator
UUID16_SZ 
UUID32_SZ 
UUID128_SZ 

Definition at line 55 of file UUID.hpp.

Constructor & Destructor Documentation

◆ uuid_t() [1/3]

direct_bt::uuid_t::uuid_t ( TypeSize const  type_)
inlineprotected

Definition at line 66 of file UUID.hpp.

◆ ~uuid_t()

virtual direct_bt::uuid_t::~uuid_t ( )
inlinevirtualnoexcept

Definition at line 72 of file UUID.hpp.

◆ uuid_t() [2/3]

direct_bt::uuid_t::uuid_t ( const uuid_t o)
defaultnoexcept

◆ uuid_t() [3/3]

direct_bt::uuid_t::uuid_t ( uuid_t &&  o)
defaultnoexcept

Member Function Documentation

◆ create()

std::unique_ptr< const uuid_t > uuid_t::create ( TypeSize const  t,
uint8_t const *const  buffer,
jau::nsize_t const  byte_offset,
bool const  littleEndian 
)
static

Definition at line 47 of file UUID.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ data()

virtual const uint8_t* direct_bt::uuid_t::data ( ) const
inlinevirtualnoexcept

returns the pointer to the uuid data of size getTypeSize()

Reimplemented in direct_bt::uuid128_t, direct_bt::uuid32_t, and direct_bt::uuid16_t.

Definition at line 93 of file UUID.hpp.

◆ getTypeSize()

TypeSize direct_bt::uuid_t::getTypeSize ( ) const
inlinenoexcept

Definition at line 88 of file UUID.hpp.

Here is the caller graph for this function:

◆ getTypeSizeInt()

jau::nsize_t direct_bt::uuid_t::getTypeSizeInt ( ) const
inlinenoexcept

Definition at line 89 of file UUID.hpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ number()

static constexpr jau::nsize_t direct_bt::uuid_t::number ( const TypeSize  rhs)
inlinestaticconstexprnoexcept

Definition at line 58 of file UUID.hpp.

Here is the caller graph for this function:

◆ operator!=()

bool direct_bt::uuid_t::operator!= ( uuid_t const &  o) const
inlinenoexcept

Definition at line 85 of file UUID.hpp.

◆ operator=() [1/2]

uuid_t& direct_bt::uuid_t::operator= ( const uuid_t o)
defaultnoexcept

◆ operator=() [2/2]

uuid_t& direct_bt::uuid_t::operator= ( uuid_t &&  o)
defaultnoexcept

◆ operator==()

virtual bool direct_bt::uuid_t::operator== ( uuid_t const &  o) const
inlinevirtualnoexcept

Reimplemented in direct_bt::uuid128_t, direct_bt::uuid32_t, and direct_bt::uuid16_t.

Definition at line 79 of file UUID.hpp.

◆ toString()

virtual std::string direct_bt::uuid_t::toString ( ) const
inlinevirtualnoexcept

Reimplemented in direct_bt::uuid128_t, direct_bt::uuid32_t, and direct_bt::uuid16_t.

Definition at line 94 of file UUID.hpp.

Here is the caller graph for this function:

◆ toTypeSize()

uuid_t::TypeSize uuid_t::toTypeSize ( const jau::nsize_t  size)
static

Definition at line 38 of file UUID.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ toUUID128()

uuid128_t uuid_t::toUUID128 ( uuid128_t const &  base_uuid = BT_BASE_UUID,
jau::nsize_t const  uuid32_le_octet_index = 12 
) const
noexcept

Definition at line 58 of file UUID.cpp.

◆ toUUID128String()

std::string uuid_t::toUUID128String ( uuid128_t const &  base_uuid = BT_BASE_UUID,
jau::nsize_t const  le_octet_index = 12 
) const
virtualnoexcept

Reimplemented in direct_bt::uuid128_t, direct_bt::uuid32_t, and direct_bt::uuid16_t.

Definition at line 68 of file UUID.cpp.

Here is the caller graph for this function:

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