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 liblldb_ValueObjectConstResultCast_h_ 10#define liblldb_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 <stddef.h> 21#include <stdint.h> 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 Cast(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 DISALLOW_COPY_AND_ASSIGN(ValueObjectConstResultCast); 65}; 66 67} // namespace lldb_private 68 69#endif // liblldb_ValueObjectConstResultCast_h_ 70