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