LLDB mainline
lldb_private::python::PythonDictionary Class Reference

#include <PythonDataObjects.h>

Inheritance diagram for lldb_private::python::PythonDictionary:
[legend]

Public Member Functions

 PythonDictionary ()
 PythonDictionary (PyInitialValue value)
bool HasKey (const llvm::Twine &key) const
uint32_t GetSize () const
PythonList GetKeys () const
PythonObject GetItemForKey (const PythonObject &key) const
void SetItemForKey (const PythonObject &key, const PythonObject &value)
llvm::Expected< PythonObjectGetItem (const PythonObject &key) const
llvm::Expected< PythonObjectGetItem (const llvm::Twine &key) const
llvm::Error SetItem (const PythonObject &key, const PythonObject &value) const
llvm::Error SetItem (const llvm::Twine &key, const PythonObject &value) const
StructuredData::DictionarySP CreateStructuredDictionary () const
 TypedPythonObject (PyRefType type, PyObject *py_obj)
 TypedPythonObject ()=default
Public Member Functions inherited from lldb_private::python::TypedPythonObject< PythonDictionary >
 TypedPythonObject (PyRefType type, PyObject *py_obj)
Public Member Functions inherited from lldb_private::python::PythonObject
 PythonObject ()=default
 PythonObject (PyRefType type, PyObject *py_obj)
 PythonObject (const PythonObject &rhs)
 PythonObject (PythonObject &&rhs)
 ~PythonObject ()
void Reset ()
void Dump (Stream &strm) const
PyObject * get () const
PyObject * release ()
PythonObjectoperator= (PythonObject other)
PyObjectType GetObjectType () const
PythonString Repr () const
PythonString Str () const
PythonObject ResolveName (llvm::StringRef name) const
template<typename T>
ResolveName (llvm::StringRef name) const
bool HasAttribute (llvm::StringRef attribute) const
PythonObject GetAttributeValue (llvm::StringRef attribute) const
bool IsNone () const
bool IsValid () const
bool IsAllocated () const
 operator bool () const
template<typename T>
AsType () const
StructuredData::ObjectSP CreateStructuredObject () const
template<typename... T>
llvm::Expected< PythonObjectCallMethod (const char *name, const T &... t) const
template<typename... T>
llvm::Expected< PythonObjectCall (const T &... t) const
llvm::Expected< PythonObjectGetAttribute (const llvm::Twine &name) const
llvm::Expected< PythonObjectGetType () const
llvm::Expected< boolIsTrue ()
llvm::Expected< long long > AsLongLong () const
llvm::Expected< unsigned long long > AsUnsignedLongLong () const
llvm::Expected< unsigned long long > AsModuloUnsignedLongLong () const
llvm::Expected< boolIsInstance (const PythonObject &cls)

Static Public Member Functions

static bool Check (PyObject *py_obj)
Static Public Member Functions inherited from lldb_private::python::PythonObject
static PythonObject ResolveNameWithDictionary (llvm::StringRef name, const PythonDictionary &dict)
template<typename T>
static T ResolveNameWithDictionary (llvm::StringRef name, const PythonDictionary &dict)

Additional Inherited Members

Protected Attributes inherited from lldb_private::python::PythonObject
PyObject * m_py_obj = nullptr

Detailed Description

Definition at line 545 of file PythonDataObjects.h.

Constructor & Destructor Documentation

◆ PythonDictionary() [1/2]

lldb_private::python::PythonDictionary::PythonDictionary ( )
inline

Definition at line 549 of file PythonDataObjects.h.

References TypedPythonObject().

◆ PythonDictionary() [2/2]

PythonDictionary::PythonDictionary ( PyInitialValue value)
explicit

Member Function Documentation

◆ Check()

bool PythonDictionary::Check ( PyObject * py_obj)
static

◆ CreateStructuredDictionary()

◆ GetItem() [1/2]

llvm::Expected< PythonObject > lldb_private::python::PythonDictionary::GetItem ( const llvm::Twine & key) const

◆ GetItem() [2/2]

◆ GetItemForKey()

◆ GetKeys()

◆ GetSize()

uint32_t PythonDictionary::GetSize ( ) const

◆ HasKey()

◆ SetItem() [1/2]

llvm::Error lldb_private::python::PythonDictionary::SetItem ( const llvm::Twine & key,
const PythonObject & value ) const

◆ SetItem() [2/2]

◆ SetItemForKey()

void PythonDictionary::SetItemForKey ( const PythonObject & key,
const PythonObject & value )

Definition at line 741 of file PythonDataObjects.cpp.

References error(), and SetItem().

◆ TypedPythonObject() [1/2]

lldb_private::python::TypedPythonObject< T >::TypedPythonObject ( )
default

◆ TypedPythonObject() [2/2]

lldb_private::python::TypedPythonObject< T >::TypedPythonObject ( PyRefType type,
PyObject * py_obj )
inline

Definition at line 400 of file PythonDataObjects.h.

Referenced by PythonDictionary().


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