File indexing completed on 2026-05-10 08:42:59
0001
0002
0003
0004
0005
0006
0007
0008
0009 #ifndef LLDB_VALUEOBJECT_VALUEOBJECTCAST_H
0010 #define LLDB_VALUEOBJECT_VALUEOBJECTCAST_H
0011
0012 #include "lldb/Symbol/CompilerType.h"
0013 #include "lldb/ValueObject/ValueObject.h"
0014 #include "lldb/lldb-defines.h"
0015 #include "lldb/lldb-enumerations.h"
0016 #include "lldb/lldb-forward.h"
0017
0018 #include <cstddef>
0019 #include <cstdint>
0020 #include <optional>
0021
0022 namespace lldb_private {
0023 class ConstString;
0024
0025
0026 class ValueObjectCast : public ValueObject {
0027 public:
0028 ~ValueObjectCast() override;
0029
0030 static lldb::ValueObjectSP Create(ValueObject &parent, ConstString name,
0031 const CompilerType &cast_type);
0032
0033 std::optional<uint64_t> GetByteSize() override;
0034
0035 llvm::Expected<uint32_t> CalculateNumChildren(uint32_t max) override;
0036
0037 lldb::ValueType GetValueType() const override;
0038
0039 bool IsInScope() override;
0040
0041 ValueObject *GetParent() override {
0042 return ((m_parent != nullptr) ? m_parent->GetParent() : nullptr);
0043 }
0044
0045 const ValueObject *GetParent() const override {
0046 return ((m_parent != nullptr) ? m_parent->GetParent() : nullptr);
0047 }
0048
0049 protected:
0050 ValueObjectCast(ValueObject &parent, ConstString name,
0051 const CompilerType &cast_type);
0052
0053 bool UpdateValue() override;
0054
0055 CompilerType GetCompilerTypeImpl() override;
0056
0057 CompilerType m_cast_type;
0058
0059 private:
0060 ValueObjectCast(const ValueObjectCast &) = delete;
0061 const ValueObjectCast &operator=(const ValueObjectCast &) = delete;
0062 };
0063
0064 }
0065
0066 #endif