1 //===-- ValueObjectConstResultCast.h ----------------------------*- C++ -*-===//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 #ifndef liblldb_ValueObjectConstResultCast_h_
11 #define liblldb_ValueObjectConstResultCast_h_
13 #include "lldb/Core/ValueObjectCast.h"
14 #include "lldb/Core/ValueObjectConstResultImpl.h"
15 #include "lldb/Symbol/CompilerType.h" // for CompilerType
16 #include "lldb/Utility/ConstString.h" // for ConstString
17 #include "lldb/lldb-defines.h" // for DISALLOW_COPY_AND_...
18 #include "lldb/lldb-forward.h" // for ValueObjectSP
19 #include "lldb/lldb-types.h" // for addr_t
21 #include <stddef.h> // for size_t
22 #include <stdint.h> // for uint32_t, int32_t
24 namespace lldb_private {
27 namespace lldb_private {
30 namespace lldb_private {
34 namespace lldb_private {
36 class ValueObjectConstResultCast : public ValueObjectCast {
38 ValueObjectConstResultCast(ValueObject &parent, const ConstString &name,
39 const CompilerType &cast_type,
40 lldb::addr_t live_address = LLDB_INVALID_ADDRESS);
42 ~ValueObjectConstResultCast() override;
44 lldb::ValueObjectSP Dereference(Error &error) override;
46 ValueObject *CreateChildAtIndex(size_t idx, bool synthetic_array_member,
47 int32_t synthetic_index) override;
49 virtual CompilerType GetCompilerType() {
50 return ValueObjectCast::GetCompilerType();
53 lldb::ValueObjectSP GetSyntheticChildAtOffset(
54 uint32_t offset, const CompilerType &type, bool can_create,
55 ConstString name_const_str = ConstString()) override;
57 lldb::ValueObjectSP AddressOf(Error &error) override;
59 size_t GetPointeeData(DataExtractor &data, uint32_t item_idx = 0,
60 uint32_t item_count = 1) override;
62 lldb::ValueObjectSP Cast(const CompilerType &compiler_type) override;
65 ValueObjectConstResultImpl m_impl;
68 friend class ValueObject;
69 friend class ValueObjectConstResult;
70 friend class ValueObjectConstResultImpl;
72 DISALLOW_COPY_AND_ASSIGN(ValueObjectConstResultCast);
75 } // namespace lldb_private
77 #endif // liblldb_ValueObjectConstResultCast_h_