LLDB  mainline
ValueObjectCast.h
Go to the documentation of this file.
1 //===-- ValueObjectDynamicValue.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_ValueObjectCast_h_
10 #define liblldb_ValueObjectCast_h_
11 
12 #include "lldb/Core/ValueObject.h"
14 #include "lldb/lldb-defines.h"
15 #include "lldb/lldb-enumerations.h"
16 #include "lldb/lldb-forward.h"
17 
18 #include <stddef.h>
19 #include <stdint.h>
20 
21 namespace lldb_private {
22 class ConstString;
23 }
24 
25 namespace lldb_private {
26 
27 // A ValueObject that represents a given value represented as a different type.
28 class ValueObjectCast : public ValueObject {
29 public:
30  ~ValueObjectCast() override;
31 
32  static lldb::ValueObjectSP Create(ValueObject &parent,
33  ConstString name,
34  const CompilerType &cast_type);
35 
36  uint64_t GetByteSize() override;
37 
38  size_t CalculateNumChildren(uint32_t max) override;
39 
40  lldb::ValueType GetValueType() const override;
41 
42  bool IsInScope() override;
43 
44  ValueObject *GetParent() override {
45  return ((m_parent != nullptr) ? m_parent->GetParent() : nullptr);
46  }
47 
48  const ValueObject *GetParent() const override {
49  return ((m_parent != nullptr) ? m_parent->GetParent() : nullptr);
50  }
51 
52 protected:
54  const CompilerType &cast_type);
55 
56  bool UpdateValue() override;
57 
59 
61 
62 private:
63  DISALLOW_COPY_AND_ASSIGN(ValueObjectCast);
64 };
65 
66 } // namespace lldb_private
67 
68 #endif // liblldb_ValueObjectCast_h_
Enumerations for broadcasting.
Definition: SBLaunchInfo.h:14
uint64_t GetByteSize() override
const ValueObject * GetParent() const override
ValueObject * GetParent() override
ValueObjectCast(ValueObject &parent, ConstString name, const CompilerType &cast_type)
virtual ValueObject * GetParent()
Definition: ValueObject.h:771
lldb::ValueType GetValueType() const override
static lldb::ValueObjectSP Create(ValueObject &parent, ConstString name, const CompilerType &cast_type)
A uniqued constant string class.
Definition: ConstString.h:38
size_t CalculateNumChildren(uint32_t max) override
CompilerType GetCompilerTypeImpl() override