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 liblldb_ValueObjectList_h_
10 #define liblldb_ValueObjectList_h_
11 
12 #include "lldb/lldb-forward.h"
13 #include "lldb/lldb-types.h"
14 
15 #include <vector>
16 
17 #include <stddef.h>
18 
19 namespace lldb_private {
20 class ValueObject;
21 }
22 
23 namespace lldb_private {
24 
25 // A collection of ValueObject values that
27 public:
28  // Constructors and Destructors
30 
31  ValueObjectList(const ValueObjectList &rhs);
32 
34 
35  const ValueObjectList &operator=(const ValueObjectList &rhs);
36 
37  void Append(const lldb::ValueObjectSP &val_obj_sp);
38 
39  void Append(const ValueObjectList &valobj_list);
40 
41  lldb::ValueObjectSP FindValueObjectByPointer(ValueObject *valobj);
42 
43  size_t GetSize() const;
44 
45  void Resize(size_t size);
46 
47  lldb::ValueObjectSP GetValueObjectAtIndex(size_t idx);
48 
49  lldb::ValueObjectSP RemoveValueObjectAtIndex(size_t idx);
50 
51  void SetValueObjectAtIndex(size_t idx, const lldb::ValueObjectSP &valobj_sp);
52 
53  lldb::ValueObjectSP FindValueObjectByValueName(const char *name);
54 
55  lldb::ValueObjectSP FindValueObjectByUID(lldb::user_id_t uid);
56 
57  void Swap(ValueObjectList &value_object_list);
58 
59  void Clear() { m_value_objects.clear(); }
60 
61  const std::vector<lldb::ValueObjectSP> &GetObjects() const {
62  return m_value_objects;
63  }
64 protected:
65  typedef std::vector<lldb::ValueObjectSP> collection;
66  // Classes that inherit from ValueObjectList can see and modify these
67  collection m_value_objects;
68 };
69 
70 } // namespace lldb_private
71 
72 #endif // liblldb_ValueObjectList_h_
lldb::ValueObjectSP GetValueObjectAtIndex(size_t idx)
Enumerations for broadcasting.
Definition: SBLaunchInfo.h:14
const ValueObjectList & operator=(const ValueObjectList &rhs)
lldb::ValueObjectSP FindValueObjectByPointer(ValueObject *valobj)
void SetValueObjectAtIndex(size_t idx, const lldb::ValueObjectSP &valobj_sp)
lldb::ValueObjectSP FindValueObjectByValueName(const char *name)
std::vector< lldb::ValueObjectSP > collection
uint64_t user_id_t
Definition: lldb-types.h:84
void Append(const lldb::ValueObjectSP &val_obj_sp)
lldb::ValueObjectSP FindValueObjectByUID(lldb::user_id_t uid)
lldb::ValueObjectSP RemoveValueObjectAtIndex(size_t idx)
const std::vector< lldb::ValueObjectSP > & GetObjects() const
void Swap(ValueObjectList &value_object_list)