LLDB mainline
Public Member Functions | Protected Member Functions | Protected Attributes | Friends | List of all members
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.

◆ 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(), and m_opaque_sp.

◆ ~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(), and lldb::SBThread::GetDescriptionWithFormat().

◆ 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.

◆ operator=()

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

Definition at line 27 of file SBFormat.cpp.

References lldb_private::clone(), and m_opaque_sp.

Friends And Related Function Documentation

◆ SBFrame

friend class SBFrame
friend

Definition at line 54 of file SBFormat.h.

◆ SBThread

friend class SBThread
friend

Definition at line 55 of file SBFormat.h.

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=(), and SBFormat().


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