SBValueList.h revision 1949951ed623f31f28840af50df4a25c5ce67288
1//===-- SBValueList.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 LLDB_SBValueList_h_
11#define LLDB_SBValueList_h_
12
13#include "lldb/API/SBDefines.h"
14
15namespace {
16    class ValueListImpl;
17}
18
19namespace lldb {
20
21class SBValueList
22{
23public:
24
25    SBValueList ();
26
27    SBValueList (const lldb::SBValueList &rhs);
28
29    ~SBValueList();
30
31    bool
32    IsValid() const;
33
34    void
35    Clear();
36
37    void
38    Append (const lldb::SBValue &val_obj);
39
40    void
41    Append (const lldb::SBValueList& value_list);
42
43    uint32_t
44    GetSize() const;
45
46    lldb::SBValue
47    GetValueAtIndex (uint32_t idx) const;
48
49    lldb::SBValue
50    FindValueObjectByUID (lldb::user_id_t uid);
51
52    const lldb::SBValueList &
53    operator = (const lldb::SBValueList &rhs);
54
55protected:
56
57    // only useful for visualizing the pointer or comparing two SBValueLists
58    // to see if they are backed by the same underlying Impl.
59    void *
60    opaque_ptr ();
61
62private:
63    friend class SBFrame;
64
65    SBValueList (const ValueListImpl *lldb_object_ptr);
66
67    void
68    Append (lldb::ValueObjectSP& val_obj_sp);
69
70    void
71    CreateIfNeeded ();
72
73    ValueListImpl *
74    operator -> ();
75
76    ValueListImpl &
77    operator* ();
78
79    const ValueListImpl *
80    operator -> () const;
81
82    const ValueListImpl &
83    operator* () const;
84
85
86    ValueListImpl &
87    ref ();
88
89    std::unique_ptr<ValueListImpl> m_opaque_ap;
90};
91
92
93} // namespace lldb
94
95#endif  // LLDB_SBValueList_h_
96