1//===-- ValueObjectConstResultCast.h ----------------------------*- C++ -*-===//
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_CORE_VALUEOBJECTCONSTRESULTCAST_H
10#define LLDB_CORE_VALUEOBJECTCONSTRESULTCAST_H
11
12#include "lldb/Core/ValueObjectCast.h"
13#include "lldb/Core/ValueObjectConstResultImpl.h"
14#include "lldb/Symbol/CompilerType.h"
15#include "lldb/Utility/ConstString.h"
16#include "lldb/lldb-defines.h"
17#include "lldb/lldb-forward.h"
18#include "lldb/lldb-types.h"
19
20#include <cstddef>
21#include <cstdint>
22
23namespace lldb_private {
24class DataExtractor;
25class Status;
26class ValueObject;
27
28class ValueObjectConstResultCast : public ValueObjectCast {
29public:
30 ValueObjectConstResultCast(ValueObject &parent, ConstString name,
31 const CompilerType &cast_type,
32 lldb::addr_t live_address = LLDB_INVALID_ADDRESS);
33
34 ~ValueObjectConstResultCast() override;
35
36 lldb::ValueObjectSP Dereference(Status &error) override;
37
38 ValueObject *CreateChildAtIndex(size_t idx, bool synthetic_array_member,
39 int32_t synthetic_index) override;
40
41 virtual CompilerType GetCompilerType() {
42 return ValueObjectCast::GetCompilerType();
43 }
44
45 lldb::ValueObjectSP GetSyntheticChildAtOffset(
46 uint32_t offset, const CompilerType &type, bool can_create,
47 ConstString name_const_str = ConstString()) override;
48
49 lldb::ValueObjectSP AddressOf(Status &error) override;
50
51 size_t GetPointeeData(DataExtractor &data, uint32_t item_idx = 0,
52 uint32_t item_count = 1) override;
53
54 lldb::ValueObjectSP DoCast(const CompilerType &compiler_type) override;
55
56protected:
57 ValueObjectConstResultImpl m_impl;
58
59private:
60 friend class ValueObject;
61 friend class ValueObjectConstResult;
62 friend class ValueObjectConstResultImpl;
63
64 ValueObjectConstResultCast(const ValueObjectConstResultCast &) = delete;
65 const ValueObjectConstResultCast &
66 operator=(const ValueObjectConstResultCast &) = delete;
67};
68
69} // namespace lldb_private
70
71#endif // LLDB_CORE_VALUEOBJECTCONSTRESULTCAST_H
72

source code of lldb/include/lldb/Core/ValueObjectConstResultCast.h