LLDB mainline
lldb::SBFormat Class Reference

Class that represents a format string that can be used to generate descriptions of objects like frames and threads. More...

#include <SBFormat.h>

Public Member Functions

 SBFormat ()
 SBFormat (const char *format, lldb::SBError &error)
 Create an SBFormat by parsing the given format string.
 SBFormat (const lldb::SBFormat &rhs)
lldb::SBFormatoperator= (const lldb::SBFormat &rhs)
 ~SBFormat ()
 operator bool () const

Protected Member Functions

lldb::FormatEntrySP GetFormatEntrySP () const

Protected Attributes

lldb::FormatEntrySP m_opaque_sp
 The storage for this object.

Friends

class SBFrame
class SBThread

Detailed Description

Class that represents a format string that can be used to generate descriptions of objects like frames and threads.

See https://lldb.llvm.org/use/formatting.html for more information.

Definition at line 28 of file SBFormat.h.

Constructor & Destructor Documentation

◆ SBFormat() [1/3]

SBFormat::SBFormat ( )

Definition at line 19 of file SBFormat.cpp.

References m_opaque_sp.

Referenced by operator=(), and SBFormat().

◆ SBFormat() [2/3]

SBFormat::SBFormat ( const char * format,
lldb::SBError & error )

Create an SBFormat by parsing the given format string.

If parsing fails, this object is initialized as invalid.

Parameters
[in]formatThe format string to parse.
[out]errorAn object where error messages will be written to if parsing fails.

Definition at line 35 of file SBFormat.cpp.

References error(), m_opaque_sp, and lldb_private::FormatEntity::Parse().

◆ SBFormat() [3/3]

SBFormat::SBFormat ( const lldb::SBFormat & rhs)

Definition at line 21 of file SBFormat.cpp.

References lldb_private::clone(), m_opaque_sp, and SBFormat().

◆ ~SBFormat()

SBFormat::~SBFormat ( )
default

Member Function Documentation

◆ GetFormatEntrySP()

lldb::FormatEntrySP SBFormat::GetFormatEntrySP ( ) const
protected
Returns
The underlying shared pointer storage for this object.

Definition at line 44 of file SBFormat.cpp.

References m_opaque_sp.

Referenced by lldb::SBFrame::GetDescriptionWithFormat(), lldb::SBThread::GetDescriptionWithFormat(), and SBThread.

◆ operator bool()

SBFormat::operator bool ( ) const
explicit
Returns
true if and only if this object is valid and can be used for formatting.

Definition at line 33 of file SBFormat.cpp.

References m_opaque_sp.

◆ operator=()

SBFormat & SBFormat::operator= ( const lldb::SBFormat & rhs)

Definition at line 27 of file SBFormat.cpp.

References lldb_private::clone(), m_opaque_sp, and SBFormat().

◆ SBFrame

friend class SBFrame
friend

Definition at line 54 of file SBFormat.h.

References SBFrame.

Referenced by SBFrame.

◆ SBThread

friend class SBThread
friend

Definition at line 55 of file SBFormat.h.

References GetFormatEntrySP(), and SBThread.

Referenced by SBThread.

Member Data Documentation

◆ m_opaque_sp

lldb::FormatEntrySP lldb::SBFormat::m_opaque_sp
protected

The storage for this object.

Definition at line 62 of file SBFormat.h.

Referenced by GetFormatEntrySP(), operator bool(), operator=(), SBFormat(), SBFormat(), and SBFormat().


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