1 //===-- ValueObjectList.h ---------------------------------------*- C++ -*-===//
2 //
3 //                     The LLVM Compiler Infrastructure
4 //
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
7 //
8 //===----------------------------------------------------------------------===//
9 
10 #ifndef liblldb_ValueObjectList_h_
11 #define liblldb_ValueObjectList_h_
12 
13 // C Includes
14 // C++ Includes
15 #include <vector>
16 
17 // Other libraries and framework includes
18 // Project includes
19 #include "lldb/lldb-private.h"
20 #include "lldb/Core/ClangForward.h"
21 #include "lldb/Core/UserID.h"
22 #include "lldb/Target/ExecutionContextScope.h"
23 
24 namespace lldb_private {
25 
26 //----------------------------------------------------------------------
27 // A collection of ValueObject values that
28 //----------------------------------------------------------------------
29 class ValueObjectList
30 {
31 public:
32     //------------------------------------------------------------------
33     // Constructors and Destructors
34     //------------------------------------------------------------------
35     ValueObjectList ();
36 
37     ValueObjectList (const ValueObjectList &rhs);
38 
39     ~ValueObjectList();
40 
41     const ValueObjectList &
42     operator = (const ValueObjectList &rhs);
43 
44     void
45     Append (const lldb::ValueObjectSP &val_obj_sp);
46 
47     void
48     Append (const ValueObjectList &valobj_list);
49 
50     lldb::ValueObjectSP
51     FindValueObjectByPointer (ValueObject *valobj);
52 
53     size_t
54     GetSize () const;
55 
56     void
57     Resize (size_t size);
58 
59     lldb::ValueObjectSP
60     GetValueObjectAtIndex (size_t idx);
61 
62     lldb::ValueObjectSP
63     RemoveValueObjectAtIndex (size_t idx);
64 
65     void
66     SetValueObjectAtIndex (size_t idx,
67                            const lldb::ValueObjectSP &valobj_sp);
68 
69     lldb::ValueObjectSP
70     FindValueObjectByValueName (const char *name);
71 
72     lldb::ValueObjectSP
73     FindValueObjectByUID (lldb::user_id_t uid);
74 
75     void
76     Swap (ValueObjectList &value_object_list);
77 
78 protected:
79     typedef std::vector<lldb::ValueObjectSP> collection;
80     //------------------------------------------------------------------
81     // Classes that inherit from ValueObjectList can see and modify these
82     //------------------------------------------------------------------
83     collection  m_value_objects;
84 
85 };
86 
87 
88 } // namespace lldb_private
89 
90 #endif  // liblldb_ValueObjectList_h_
91