LLDB mainline
Public Member Functions | Private Attributes | Static Private Attributes | List of all members
DecodedCharBuffer Class Reference

DecodedCharBuffer stores the decoded contents of a single character. More...

Public Member Functions

 DecodedCharBuffer (std::nullptr_t)
 
 DecodedCharBuffer (const uint8_t *bytes, size_t size)
 
 DecodedCharBuffer (const char *bytes, size_t size)
 
const uint8_t * GetBytes () const
 
size_t GetSize () const
 

Private Attributes

size_t m_size = 0
 
uint8_t m_data [MaxLength] = {0}
 

Static Private Attributes

static constexpr unsigned MaxLength = 16
 

Detailed Description

DecodedCharBuffer stores the decoded contents of a single character.

It avoids managing memory on the heap by copying decoded bytes into an in-line buffer.

Definition at line 34 of file StringPrinter.cpp.

Constructor & Destructor Documentation

◆ DecodedCharBuffer() [1/3]

DecodedCharBuffer::DecodedCharBuffer ( std::nullptr_t  )
inline

Definition at line 36 of file StringPrinter.cpp.

◆ DecodedCharBuffer() [2/3]

DecodedCharBuffer::DecodedCharBuffer ( const uint8_t *  bytes,
size_t  size 
)
inline

Definition at line 38 of file StringPrinter.cpp.

References m_data, and MaxLength.

◆ DecodedCharBuffer() [3/3]

DecodedCharBuffer::DecodedCharBuffer ( const char *  bytes,
size_t  size 
)
inline

Definition at line 44 of file StringPrinter.cpp.

Member Function Documentation

◆ GetBytes()

const uint8_t * DecodedCharBuffer::GetBytes ( ) const
inline

Definition at line 47 of file StringPrinter.cpp.

References m_data.

◆ GetSize()

size_t DecodedCharBuffer::GetSize ( ) const
inline

Member Data Documentation

◆ m_data

uint8_t DecodedCharBuffer::m_data[MaxLength] = {0}
private

Definition at line 55 of file StringPrinter.cpp.

Referenced by DecodedCharBuffer(), and GetBytes().

◆ m_size

size_t DecodedCharBuffer::m_size = 0
private

Definition at line 54 of file StringPrinter.cpp.

Referenced by GetSize().

◆ MaxLength

constexpr unsigned DecodedCharBuffer::MaxLength = 16
staticconstexprprivate

Definition at line 52 of file StringPrinter.cpp.

Referenced by DecodedCharBuffer().


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