Go to the documentation of this file.
9 #ifndef LLDB_DATAFORMATTERS_TYPESYNTHETIC_H
10 #define LLDB_DATAFORMATTERS_TYPESYNTHETIC_H
15 #include <initializer_list>
45 return count <= max ? count : max;
79 typedef std::unique_ptr<SyntheticChildrenFrontEnd>
AutoPointer;
84 llvm::StringRef expression,
160 return (
m_flags & lldb::eTypeOptionCascade) == lldb::eTypeOptionCascade;
165 m_flags |= lldb::eTypeOptionCascade;
172 return (
m_flags & lldb::eTypeOptionSkipPointers) ==
173 lldb::eTypeOptionSkipPointers;
178 m_flags |= lldb::eTypeOptionSkipPointers;
185 return (
m_flags & lldb::eTypeOptionSkipReferences) ==
186 lldb::eTypeOptionSkipReferences;
191 m_flags |= lldb::eTypeOptionSkipReferences;
198 return (
m_flags & lldb::eTypeOptionNonCacheable) ==
199 lldb::eTypeOptionNonCacheable;
204 m_flags |= lldb::eTypeOptionNonCacheable;
211 return (
m_flags & lldb::eTypeOptionFrontEndWantsDereference) ==
212 lldb::eTypeOptionFrontEndWantsDereference;
217 m_flags |= lldb::eTypeOptionFrontEndWantsDereference;
219 m_flags &= ~
lldb::eTypeOptionFrontEndWantsDereference;
285 const std::initializer_list<const char *> items)
287 for (
auto path : items)
326 return lldb::ValueObjectSP();
361 lldb::ValueObjectSP)>
393 const char *pclass,
const char *pcode =
nullptr)
455 if (synth_ptr && ((
FrontEnd *)synth_ptr.get())->IsValid())
467 #endif // LLDB_DATAFORMATTERS_TYPESYNTHETIC_H
ScriptInterpreter * m_interpreter
bool GetSkipReferences() const
lldb::ValueObjectSP GetChildAtIndex(size_t idx) override
std::shared_ptr< SyntheticChildrenFrontEnd > SharedPointer
std::unique_ptr< SyntheticChildrenFrontEnd > AutoPointer
size_t CalculateNumChildren() override
Flags & SetSkipReferences(bool value=true)
void SetOptions(uint32_t value)
size_t CalculateNumChildren() override
virtual std::string GetDescription()=0
SyntheticChildren(const Flags &flags)
void SetPythonClassName(const char *fname)
Flags & SetNonCacheable(bool value=true)
bool GetSkipPointers() const
std::function< SyntheticChildrenFrontEnd *(CXXSyntheticChildren *, lldb::ValueObjectSP)> CreateFrontEndCallback
const FrontEnd & operator=(const FrontEnd &)=delete
size_t GetIndexOfChildWithName(ConstString name) override
const TypeFilterImpl & operator=(const TypeFilterImpl &)=delete
FrontEnd(std::string pclass, ValueObject &backend)
void SetValid(bool valid)
bool IsScripted() override
const SyntheticChildrenFrontEnd & operator=(const SyntheticChildrenFrontEnd &)=delete
size_t CalculateNumChildren() override
std::string GetDescription() override
bool IsScripted() override
Flags(const Flags &other)
lldb::ValueObjectSP GetChildAtIndex(size_t idx) override
Flags & operator=(const uint32_t &rhs)
virtual ConstString GetSyntheticTypeName()
std::string GetDescription() override
lldb::ValueObjectSP GetSyntheticValue() override
virtual size_t CalculateNumChildren(uint32_t max)
~SyntheticValueProviderFrontEnd() override=default
const char * GetExpressionPathAtIndex(size_t i) const
std::shared_ptr< SyntheticChildrenFrontEnd > SharedPointer
void SetCascades(bool value)
virtual ~SyntheticChildren()=default
const char * GetPythonCode()
StructuredData::ObjectSP m_wrapper_sp
FrontEnd(TypeFilterImpl *flt, ValueObject &backend)
bool IsScripted() override
size_t GetIndexOfChildWithName(ConstString name) override
void SetPythonCode(const char *script)
const CXXSyntheticChildren & operator=(const CXXSyntheticChildren &)=delete
virtual lldb::ValueObjectSP GetChildAtIndex(size_t idx)=0
SyntheticChildrenFrontEnd::AutoPointer GetFrontEnd(ValueObject &backend) override
lldb::ValueObjectSP GetSP()
const SyntheticChildren & operator=(const SyntheticChildren &)=delete
virtual size_t CalculateNumChildren()=0
bool GetFrontEndWantsDereference() const
Flags & SetFrontEndWantsDereference(bool value=true)
std::shared_ptr< Object > ObjectSP
std::string GetDescription() override
SyntheticChildrenFrontEnd(ValueObject &backend)
~FrontEnd() override=default
virtual lldb::ValueObjectSP GetSyntheticValue()
ConstString GetSyntheticTypeName() override
ScriptedSyntheticChildren(const SyntheticChildren::Flags &flags, const char *pclass, const char *pcode=nullptr)
std::string m_python_class
std::vector< std::string > m_expression_paths
virtual bool IsScripted()=0
string(SUBSTRING ${p} 10 -1 pStripped) if($
void SetValue(uint32_t value)
bool SkipsPointers() const
std::shared_ptr< SyntheticChildren > SharedPointer
bool WantsDereference() const
lldb::ValueObjectSP CreateValueObjectFromExpression(llvm::StringRef name, llvm::StringRef expression, const ExecutionContext &exe_ctx)
const FrontEnd & operator=(const FrontEnd &)=delete
size_t GetIndexOfChildWithName(ConstString name) override
virtual SyntheticChildrenFrontEnd::AutoPointer GetFrontEnd(ValueObject &backend)=0
void SetNonCacheable(bool value)
lldb::ValueObjectSP GetSyntheticValue() override=0
bool SkipsReferences() const
lldb::ValueObjectSP CreateValueObjectFromData(llvm::StringRef name, const DataExtractor &data, const ExecutionContext &exe_ctx, CompilerType type)
std::shared_ptr< TypeFilterImpl > SharedPointer
lldb::ValueObjectSP GetChildAtIndex(size_t idx) override
lldb::ValueObjectSP CreateValueObjectFromAddress(llvm::StringRef name, uint64_t address, const ExecutionContext &exe_ctx, CompilerType type)
const char * GetPythonClassName()
const SyntheticValueProviderFrontEnd & operator=(const SyntheticValueProviderFrontEnd &)=delete
bool NonCacheable() const
void AddExpressionPath(const char *path)
CXXSyntheticChildren(const SyntheticChildren::Flags &flags, const char *description, CreateFrontEndCallback callback)
virtual ~SyntheticChildrenFrontEnd()=default
TypeFilterImpl(const SyntheticChildren::Flags &flags, const std::initializer_list< const char * > items)
std::string m_python_code
CreateFrontEndCallback m_create_callback
Generic representation of a type in a programming language.
SyntheticChildrenFrontEnd::AutoPointer GetFrontEnd(ValueObject &backend) override
A class that represents a running process on the host machine.
Flags & SetSkipPointers(bool value=true)
bool MightHaveChildren() override
TypeFilterImpl(const SyntheticChildren::Flags &flags)
virtual size_t GetIndexOfChildWithName(ConstString name)=0
bool MightHaveChildren() override
void SetSkipsReferences(bool value)
std::string m_description
SyntheticValueProviderFrontEnd(ValueObject &backend)
std::shared_ptr< SyntheticChildrenFrontEnd > SharedPointer
void SetSkipsPointers(bool value)
std::string m_python_class
virtual bool MightHaveChildren()=0
bool GetNonCacheable() const
Flags & operator=(const Flags &rhs)
bool MightHaveChildren() override
const ScriptedSyntheticChildren & operator=(const ScriptedSyntheticChildren &)=delete
lldb::ValueObjectSP GetSyntheticExpressionPathChild(const char *expression, bool can_create)
Flags & SetCascades(bool value=true)
bool SetExpressionPathAtIndex(size_t i, const char *path)
SyntheticChildrenFrontEnd::AutoPointer GetFrontEnd(ValueObject &backend) override