Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-05-10 08:42:59

0001 //===-- ValueObjectConstResultCast.h ----------------------------*- C++ -*-===//
0002 //
0003 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
0004 // See https://llvm.org/LICENSE.txt for license information.
0005 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
0006 //
0007 //===----------------------------------------------------------------------===//
0008 
0009 #ifndef LLDB_VALUEOBJECT_VALUEOBJECTCONSTRESULTCAST_H
0010 #define LLDB_VALUEOBJECT_VALUEOBJECTCONSTRESULTCAST_H
0011 
0012 #include "lldb/Symbol/CompilerType.h"
0013 #include "lldb/Utility/ConstString.h"
0014 #include "lldb/ValueObject/ValueObjectCast.h"
0015 #include "lldb/ValueObject/ValueObjectConstResultImpl.h"
0016 #include "lldb/lldb-defines.h"
0017 #include "lldb/lldb-forward.h"
0018 #include "lldb/lldb-types.h"
0019 
0020 #include <cstddef>
0021 #include <cstdint>
0022 
0023 namespace lldb_private {
0024 class DataExtractor;
0025 class Status;
0026 class ValueObject;
0027 
0028 class ValueObjectConstResultCast : public ValueObjectCast {
0029 public:
0030   ValueObjectConstResultCast(ValueObject &parent, ConstString name,
0031                              const CompilerType &cast_type,
0032                              lldb::addr_t live_address = LLDB_INVALID_ADDRESS);
0033 
0034   ~ValueObjectConstResultCast() override;
0035 
0036   lldb::ValueObjectSP Dereference(Status &error) override;
0037 
0038   virtual CompilerType GetCompilerType() {
0039     return ValueObjectCast::GetCompilerType();
0040   }
0041 
0042   lldb::ValueObjectSP GetSyntheticChildAtOffset(
0043       uint32_t offset, const CompilerType &type, bool can_create,
0044       ConstString name_const_str = ConstString()) override;
0045 
0046   lldb::ValueObjectSP AddressOf(Status &error) override;
0047 
0048   size_t GetPointeeData(DataExtractor &data, uint32_t item_idx = 0,
0049                         uint32_t item_count = 1) override;
0050 
0051   lldb::ValueObjectSP DoCast(const CompilerType &compiler_type) override;
0052 
0053 protected:
0054   ValueObjectConstResultImpl m_impl;
0055 
0056 private:
0057   friend class ValueObject;
0058   friend class ValueObjectConstResult;
0059   friend class ValueObjectConstResultImpl;
0060 
0061   ValueObject *CreateChildAtIndex(size_t idx) override {
0062     return m_impl.CreateChildAtIndex(idx);
0063   }
0064   ValueObject *CreateSyntheticArrayMember(size_t idx) override {
0065     return m_impl.CreateSyntheticArrayMember(idx);
0066   }
0067 
0068   ValueObjectConstResultCast(const ValueObjectConstResultCast &) = delete;
0069   const ValueObjectConstResultCast &
0070   operator=(const ValueObjectConstResultCast &) = delete;
0071 };
0072 
0073 } // namespace lldb_private
0074 
0075 #endif // LLDB_VALUEOBJECT_VALUEOBJECTCONSTRESULTCAST_H