1353358Sdim//===-- ValueObjectCast.h ---------------------------------------*- C++ -*-===// 2254721Semaste// 3353358Sdim// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 4353358Sdim// See https://llvm.org/LICENSE.txt for license information. 5353358Sdim// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 6254721Semaste// 7254721Semaste//===----------------------------------------------------------------------===// 8254721Semaste 9254721Semaste#ifndef liblldb_ValueObjectCast_h_ 10254721Semaste#define liblldb_ValueObjectCast_h_ 11254721Semaste 12254721Semaste#include "lldb/Core/ValueObject.h" 13344779Sdim#include "lldb/Symbol/CompilerType.h" 14344779Sdim#include "lldb/lldb-defines.h" 15344779Sdim#include "lldb/lldb-enumerations.h" 16344779Sdim#include "lldb/lldb-forward.h" 17254721Semaste 18344779Sdim#include <stddef.h> 19344779Sdim#include <stdint.h> 20321369Sdim 21254721Semastenamespace lldb_private { 22321369Sdimclass ConstString; 23254721Semaste 24254721Semaste// A ValueObject that represents a given value represented as a different type. 25314564Sdimclass ValueObjectCast : public ValueObject { 26254721Semastepublic: 27314564Sdim ~ValueObjectCast() override; 28296417Sdim 29314564Sdim static lldb::ValueObjectSP Create(ValueObject &parent, 30353358Sdim ConstString name, 31314564Sdim const CompilerType &cast_type); 32254721Semaste 33314564Sdim uint64_t GetByteSize() override; 34314564Sdim 35314564Sdim size_t CalculateNumChildren(uint32_t max) override; 36314564Sdim 37314564Sdim lldb::ValueType GetValueType() const override; 38314564Sdim 39314564Sdim bool IsInScope() override; 40314564Sdim 41314564Sdim ValueObject *GetParent() override { 42314564Sdim return ((m_parent != nullptr) ? m_parent->GetParent() : nullptr); 43314564Sdim } 44314564Sdim 45314564Sdim const ValueObject *GetParent() const override { 46314564Sdim return ((m_parent != nullptr) ? m_parent->GetParent() : nullptr); 47314564Sdim } 48314564Sdim 49254721Semasteprotected: 50353358Sdim ValueObjectCast(ValueObject &parent, ConstString name, 51314564Sdim const CompilerType &cast_type); 52296417Sdim 53314564Sdim bool UpdateValue() override; 54314564Sdim 55314564Sdim CompilerType GetCompilerTypeImpl() override; 56314564Sdim 57314564Sdim CompilerType m_cast_type; 58314564Sdim 59254721Semasteprivate: 60314564Sdim DISALLOW_COPY_AND_ASSIGN(ValueObjectCast); 61254721Semaste}; 62254721Semaste 63254721Semaste} // namespace lldb_private 64254721Semaste 65296417Sdim#endif // liblldb_ValueObjectCast_h_ 66