LLDB  mainline
Public Member Functions | Static Public Member Functions | Friends | List of all members
lldb_private::UUID Class Reference

#include <UUID.h>

Public Member Functions

 UUID ()=default
 
void Clear ()
 
void Dump (Stream *s) const
 
llvm::ArrayRef< uint8_t > GetBytes () const
 
 operator bool () const
 
bool IsValid () const
 
std::string GetAsString (llvm::StringRef separator="-") const
 
size_t SetFromStringRef (llvm::StringRef str, uint32_t num_uuid_bytes=16)
 
size_t SetFromOptionalStringRef (llvm::StringRef str, uint32_t num_uuid_bytes=16)
 

Static Public Member Functions

static UUID fromData (const void *bytes, uint32_t num_bytes)
 Creates a UUID from the data pointed to by the bytes argument. More...
 
static UUID fromData (llvm::ArrayRef< uint8_t > bytes)
 Creates a uuid from the data pointed to by the bytes argument. More...
 
static UUID fromOptionalData (const void *bytes, uint32_t num_bytes)
 Creates a UUID from the data pointed to by the bytes argument. More...
 
static UUID fromOptionalData (llvm::ArrayRef< uint8_t > bytes)
 Creates a UUID from the data pointed to by the bytes argument. More...
 
static llvm::StringRef DecodeUUIDBytesFromString (llvm::StringRef str, llvm::SmallVectorImpl< uint8_t > &uuid_bytes, uint32_t num_uuid_bytes=16)
 Decode as many UUID bytes (up to 16) as possible from the C string cstr. More...
 

Friends

bool operator== (const UUID &LHS, const UUID &RHS)
 
bool operator!= (const UUID &LHS, const UUID &RHS)
 
bool operator< (const UUID &LHS, const UUID &RHS)
 
bool operator<= (const UUID &LHS, const UUID &RHS)
 
bool operator> (const UUID &LHS, const UUID &RHS)
 
bool operator>= (const UUID &LHS, const UUID &RHS)
 

Detailed Description

Definition at line 25 of file UUID.h.

Constructor & Destructor Documentation

◆ UUID()

lldb_private::UUID::UUID ( )
default

Member Function Documentation

◆ Clear()

void lldb_private::UUID::Clear ( )
inline

◆ DecodeUUIDBytesFromString()

llvm::StringRef UUID::DecodeUUIDBytesFromString ( llvm::StringRef  str,
llvm::SmallVectorImpl< uint8_t > &  uuid_bytes,
uint32_t  num_uuid_bytes = 16 
)
static

Decode as many UUID bytes (up to 16) as possible from the C string cstr.

Parameters
[in]cstrA NULL terminate C string that points at a UUID string value (no leading spaces). The string must contain only hex characters and optionally can contain the '-' sepearators.
[in]uuid_bytesA buffer of bytes that will contain a full or patially decoded UUID.
Returns
The original string, with all decoded bytes removed.

Definition at line 63 of file UUID.cpp.

References xdigit_to_int().

Referenced by SetFromStringRef().

◆ Dump()

void UUID::Dump ( Stream s) const

◆ fromData() [1/2]

static UUID lldb_private::UUID::fromData ( const void *  bytes,
uint32_t  num_bytes 
)
inlinestatic

Creates a UUID from the data pointed to by the bytes argument.

No special significance is attached to any of the values.

Definition at line 31 of file UUID.h.

Referenced by parseModuleId(), and SetFromStringRef().

◆ fromData() [2/2]

static UUID lldb_private::UUID::fromData ( llvm::ArrayRef< uint8_t >  bytes)
inlinestatic

Creates a uuid from the data pointed to by the bytes argument.

No special significance is attached to any of the values.

Definition at line 39 of file UUID.h.

◆ fromOptionalData() [1/2]

static UUID lldb_private::UUID::fromOptionalData ( const void *  bytes,
uint32_t  num_bytes 
)
inlinestatic

Creates a UUID from the data pointed to by the bytes argument.

Data consisting purely of zero bytes is treated as an invalid UUID.

Definition at line 43 of file UUID.h.

Referenced by lldb_private::minidump::MinidumpParser::GetModuleUUID().

◆ fromOptionalData() [2/2]

static UUID lldb_private::UUID::fromOptionalData ( llvm::ArrayRef< uint8_t >  bytes)
inlinestatic

Creates a UUID from the data pointed to by the bytes argument.

Data consisting purely of zero bytes is treated as an invalid UUID.

Definition at line 52 of file UUID.h.

◆ GetAsString()

std::string UUID::GetAsString ( llvm::StringRef  separator = "-") const

◆ GetBytes()

llvm::ArrayRef<uint8_t> lldb_private::UUID::GetBytes ( ) const
inline

◆ IsValid()

bool lldb_private::UUID::IsValid ( ) const
inline

◆ operator bool()

lldb_private::UUID::operator bool ( ) const
inlineexplicit

Definition at line 64 of file UUID.h.

◆ SetFromOptionalStringRef()

size_t UUID::SetFromOptionalStringRef ( llvm::StringRef  str,
uint32_t  num_uuid_bytes = 16 
)

Definition at line 113 of file UUID.cpp.

References Clear(), and SetFromStringRef().

◆ SetFromStringRef()

size_t UUID::SetFromStringRef ( llvm::StringRef  str,
uint32_t  num_uuid_bytes = 16 
)

Friends And Related Function Documentation

◆ operator!=

bool operator!= ( const UUID LHS,
const UUID RHS 
)
friend

Definition at line 108 of file UUID.h.

◆ operator<

bool operator< ( const UUID LHS,
const UUID RHS 
)
friend

Definition at line 111 of file UUID.h.

◆ operator<=

bool operator<= ( const UUID LHS,
const UUID RHS 
)
friend

Definition at line 114 of file UUID.h.

◆ operator==

bool operator== ( const UUID LHS,
const UUID RHS 
)
friend

Definition at line 105 of file UUID.h.

◆ operator>

bool operator> ( const UUID LHS,
const UUID RHS 
)
friend

Definition at line 117 of file UUID.h.

◆ operator>=

bool operator>= ( const UUID LHS,
const UUID RHS 
)
friend

Definition at line 118 of file UUID.h.


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