LLDB mainline
ScriptedSyntheticChildrenInterface.h
Go to the documentation of this file.
1//===----------------------------------------------------------------------===//
2//
3// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4// See https://llvm.org/LICENSE.txt for license information.
5// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6//
7//===----------------------------------------------------------------------===//
8
9#ifndef LLDB_INTERPRETER_INTERFACES_SCRIPTEDSYNTHETICCHILDRENINTERFACE_H
10#define LLDB_INTERPRETER_INTERFACES_SCRIPTEDSYNTHETICCHILDRENINTERFACE_H
11
12#include "ScriptedInterface.h"
13#include "lldb/lldb-private.h"
14#include "llvm/Support/ErrorExtras.h"
15
16namespace lldb_private {
18public:
19 virtual llvm::Expected<StructuredData::GenericSP>
20 CreatePluginObject(llvm::StringRef class_name, ValueObject &backend) = 0;
21
22 virtual llvm::Expected<uint32_t> CalculateNumChildren(uint32_t max) {
23 return 0;
24 }
25
26 virtual lldb::ValueObjectSP GetChildAtIndex(uint32_t idx) {
27 return lldb::ValueObjectSP();
28 }
29
30 virtual llvm::Expected<uint32_t> GetIndexOfChildWithName(ConstString name) {
31 return llvm::createStringErrorV("type has no child named '{0}'", name);
32 }
33
35
36 virtual bool MightHaveChildren() { return true; }
37
38 virtual lldb::ValueObjectSP GetSyntheticValue() { return nullptr; }
39
41};
42} // namespace lldb_private
43
44#endif // LLDB_INTERPRETER_INTERFACES_SCRIPTEDSYNTHETICCHILDRENINTERFACE_H
A uniqued constant string class.
Definition ConstString.h:40
virtual llvm::Expected< uint32_t > CalculateNumChildren(uint32_t max)
virtual llvm::Expected< uint32_t > GetIndexOfChildWithName(ConstString name)
virtual llvm::Expected< StructuredData::GenericSP > CreatePluginObject(llvm::StringRef class_name, ValueObject &backend)=0
A class that represents a running process on the host machine.
ChildCacheState
Specifies if children need to be re-computed after a call to SyntheticChildrenFrontEnd::Update.
@ eRefetch
Children need to be recomputed dynamically.
std::shared_ptr< lldb_private::ValueObject > ValueObjectSP