LLDB mainline
ValueObjectConstResultCast.h
Go to the documentation of this file.
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 LLDB_CORE_VALUEOBJECTCONSTRESULTCAST_H
10#define LLDB_CORE_VALUEOBJECTCONSTRESULTCAST_H
11
16#include "lldb/lldb-defines.h"
17#include "lldb/lldb-forward.h"
18#include "lldb/lldb-types.h"
19
20#include <cstddef>
21#include <cstdint>
22
23namespace lldb_private {
24class DataExtractor;
25class Status;
26class ValueObject;
27
29public:
31 const CompilerType &cast_type,
32 lldb::addr_t live_address = LLDB_INVALID_ADDRESS);
33
35
37
40 }
41
43 uint32_t offset, const CompilerType &type, bool can_create,
44 ConstString name_const_str = ConstString()) override;
45
47
48 size_t GetPointeeData(DataExtractor &data, uint32_t item_idx = 0,
49 uint32_t item_count = 1) override;
50
51 lldb::ValueObjectSP DoCast(const CompilerType &compiler_type) override;
52
53protected:
55
56private:
57 friend class ValueObject;
60
61 ValueObject *CreateChildAtIndex(size_t idx) override {
62 return m_impl.CreateChildAtIndex(idx);
63 }
66 }
67
71};
72
73} // namespace lldb_private
74
75#endif // LLDB_CORE_VALUEOBJECTCONSTRESULTCAST_H
static llvm::raw_ostream & error(Stream &strm)
Generic representation of a type in a programming language.
Definition: CompilerType.h:36
A uniqued constant string class.
Definition: ConstString.h:40
An data extractor class.
Definition: DataExtractor.h:48
An error handling class.
Definition: Status.h:44
A ValueObject that represents a given value represented as a different type.
ValueObjectConstResultCast(const ValueObjectConstResultCast &)=delete
lldb::ValueObjectSP DoCast(const CompilerType &compiler_type) override
const ValueObjectConstResultCast & operator=(const ValueObjectConstResultCast &)=delete
size_t GetPointeeData(DataExtractor &data, uint32_t item_idx=0, uint32_t item_count=1) override
lldb::ValueObjectSP GetSyntheticChildAtOffset(uint32_t offset, const CompilerType &type, bool can_create, ConstString name_const_str=ConstString()) override
lldb::ValueObjectSP AddressOf(Status &error) override
lldb::ValueObjectSP Dereference(Status &error) override
ValueObject * CreateChildAtIndex(size_t idx) override
Should only be called by ValueObject::GetChildAtIndex().
ValueObject * CreateSyntheticArrayMember(size_t idx) override
Should only be called by ValueObject::GetSyntheticArrayMember().
A class wrapping common implementation details for operations in ValueObjectConstResult ( & Child ) t...
A frozen ValueObject copied into host memory.
CompilerType GetCompilerType()
Definition: ValueObject.h:352
#define LLDB_INVALID_ADDRESS
Definition: lldb-defines.h:82
A class that represents a running process on the host machine.
std::shared_ptr< lldb_private::ValueObject > ValueObjectSP
Definition: lldb-forward.h:479
uint64_t addr_t
Definition: lldb-types.h:80