1 //===-- ValueObjectList.h ---------------------------------------*- C++ -*-===//
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
7 //===----------------------------------------------------------------------===//
9 #ifndef liblldb_ValueObjectList_h_
10 #define liblldb_ValueObjectList_h_
12 #include "lldb/lldb-forward.h"
13 #include "lldb/lldb-types.h"
19 namespace lldb_private {
22 // A collection of ValueObject values that
23 class ValueObjectList {
25 const ValueObjectList &operator=(const ValueObjectList &rhs);
27 void Append(const lldb::ValueObjectSP &val_obj_sp);
29 void Append(const ValueObjectList &valobj_list);
31 lldb::ValueObjectSP FindValueObjectByPointer(ValueObject *valobj);
33 size_t GetSize() const;
35 void Resize(size_t size);
37 lldb::ValueObjectSP GetValueObjectAtIndex(size_t idx);
39 lldb::ValueObjectSP RemoveValueObjectAtIndex(size_t idx);
41 void SetValueObjectAtIndex(size_t idx, const lldb::ValueObjectSP &valobj_sp);
43 lldb::ValueObjectSP FindValueObjectByValueName(const char *name);
45 lldb::ValueObjectSP FindValueObjectByUID(lldb::user_id_t uid);
47 void Swap(ValueObjectList &value_object_list);
49 void Clear() { m_value_objects.clear(); }
51 const std::vector<lldb::ValueObjectSP> &GetObjects() const {
52 return m_value_objects;
55 typedef std::vector<lldb::ValueObjectSP> collection;
56 // Classes that inherit from ValueObjectList can see and modify these
57 collection m_value_objects;
60 } // namespace lldb_private
62 #endif // liblldb_ValueObjectList_h_