LLDB  mainline
ValueObjectList.h
Go to the documentation of this file.
1 //===-- ValueObjectList.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_VALUEOBJECTLIST_H
10 #define LLDB_CORE_VALUEOBJECTLIST_H
11 
12 #include "lldb/lldb-forward.h"
13 #include "lldb/lldb-types.h"
14 
15 #include <vector>
16 
17 #include <cstddef>
18 
19 namespace lldb_private {
20 class ValueObject;
21 
22 /// A collection of ValueObject values that.
24 public:
25  const ValueObjectList &operator=(const ValueObjectList &rhs);
26 
27  void Append(const lldb::ValueObjectSP &val_obj_sp);
28 
29  void Append(const ValueObjectList &valobj_list);
30 
31  lldb::ValueObjectSP FindValueObjectByPointer(ValueObject *valobj);
32 
33  size_t GetSize() const;
34 
35  void Resize(size_t size);
36 
37  lldb::ValueObjectSP GetValueObjectAtIndex(size_t idx);
38 
39  lldb::ValueObjectSP RemoveValueObjectAtIndex(size_t idx);
40 
41  void SetValueObjectAtIndex(size_t idx, const lldb::ValueObjectSP &valobj_sp);
42 
43  lldb::ValueObjectSP FindValueObjectByValueName(const char *name);
44 
45  lldb::ValueObjectSP FindValueObjectByUID(lldb::user_id_t uid);
46 
47  void Swap(ValueObjectList &value_object_list);
48 
49  void Clear() { m_value_objects.clear(); }
50 
51  const std::vector<lldb::ValueObjectSP> &GetObjects() const {
52  return m_value_objects;
53  }
54 protected:
55  typedef std::vector<lldb::ValueObjectSP> collection;
56  // Classes that inherit from ValueObjectList can see and modify these
58 };
59 
60 } // namespace lldb_private
61 
62 #endif // LLDB_CORE_VALUEOBJECTLIST_H
lldb_private::ValueObjectList::FindValueObjectByValueName
lldb::ValueObjectSP FindValueObjectByValueName(const char *name)
Definition: ValueObjectList.cpp:62
lldb_private::ValueObjectList
A collection of ValueObject values that.
Definition: ValueObjectList.h:23
lldb_private::ValueObjectList::Resize
void Resize(size_t size)
Definition: ValueObjectList.cpp:37
lldb_private::ValueObjectList::operator=
const ValueObjectList & operator=(const ValueObjectList &rhs)
Definition: ValueObjectList.cpp:19
lldb_private::ValueObjectList::GetValueObjectAtIndex
lldb::ValueObjectSP GetValueObjectAtIndex(size_t idx)
Definition: ValueObjectList.cpp:39
lldb_private::ValueObjectList::Swap
void Swap(ValueObjectList &value_object_list)
Definition: ValueObjectList.cpp:107
lldb_private::ValueObjectList::RemoveValueObjectAtIndex
lldb::ValueObjectSP RemoveValueObjectAtIndex(size_t idx)
Definition: ValueObjectList.cpp:46
lldb_private::ValueObjectList::GetSize
size_t GetSize() const
Definition: ValueObjectList.cpp:35
lldb_private::ValueObjectList::SetValueObjectAtIndex
void SetValueObjectAtIndex(size_t idx, const lldb::ValueObjectSP &valobj_sp)
Definition: ValueObjectList.cpp:55
lldb_private::ValueObjectList::FindValueObjectByPointer
lldb::ValueObjectSP FindValueObjectByPointer(ValueObject *valobj)
Definition: ValueObjectList.cpp:93
lldb_private::ValueObjectList::GetObjects
const std::vector< lldb::ValueObjectSP > & GetObjects() const
Definition: ValueObjectList.h:51
lldb-types.h
lldb_private::ValueObjectList::collection
std::vector< lldb::ValueObjectSP > collection
Definition: ValueObjectList.h:55
lldb_private::ValueObject
ValueObject:
Definition: ValueObject.h:105
lldb_private::ValueObjectList::Clear
void Clear()
Definition: ValueObjectList.h:49
lldb_private::ValueObjectList::m_value_objects
collection m_value_objects
Definition: ValueObjectList.h:57
lldb_private::ValueObjectList::Append
void Append(const lldb::ValueObjectSP &val_obj_sp)
lldb-forward.h
lldb::user_id_t
uint64_t user_id_t
Definition: lldb-types.h:84
lldb_private
A class that represents a running process on the host machine.
Definition: SBCommandInterpreterRunOptions.h:16
lldb_private::ValueObjectList::FindValueObjectByUID
lldb::ValueObjectSP FindValueObjectByUID(lldb::user_id_t uid)
Definition: ValueObjectList.cpp:76