1 //===-- ValueObjectConstResultCast.h ----------------------------*- C++ -*-===//
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
7 //===----------------------------------------------------------------------===//
9 #ifndef LLDB_CORE_VALUEOBJECTCONSTRESULTCAST_H
10 #define LLDB_CORE_VALUEOBJECTCONSTRESULTCAST_H
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"
23 namespace lldb_private {
28 class ValueObjectConstResultCast : public ValueObjectCast {
30 ValueObjectConstResultCast(ValueObject &parent, ConstString name,
31 const CompilerType &cast_type,
32 lldb::addr_t live_address = LLDB_INVALID_ADDRESS);
34 ~ValueObjectConstResultCast() override;
36 lldb::ValueObjectSP Dereference(Status &error) override;
38 ValueObject *CreateChildAtIndex(size_t idx, bool synthetic_array_member,
39 int32_t synthetic_index) override;
41 virtual CompilerType GetCompilerType() {
42 return ValueObjectCast::GetCompilerType();
45 lldb::ValueObjectSP GetSyntheticChildAtOffset(
46 uint32_t offset, const CompilerType &type, bool can_create,
47 ConstString name_const_str = ConstString()) override;
49 lldb::ValueObjectSP AddressOf(Status &error) override;
51 size_t GetPointeeData(DataExtractor &data, uint32_t item_idx = 0,
52 uint32_t item_count = 1) override;
54 lldb::ValueObjectSP Cast(const CompilerType &compiler_type) override;
57 ValueObjectConstResultImpl m_impl;
60 friend class ValueObject;
61 friend class ValueObjectConstResult;
62 friend class ValueObjectConstResultImpl;
64 ValueObjectConstResultCast(const ValueObjectConstResultCast &) = delete;
65 const ValueObjectConstResultCast &
66 operator=(const ValueObjectConstResultCast &) = delete;
69 } // namespace lldb_private
71 #endif // LLDB_CORE_VALUEOBJECTCONSTRESULTCAST_H