SBValueList.h revision ac6692008aef670d21d6671cbfb6b5d2110b5d62
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    void *
58    get ();
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::auto_ptr<ValueListImpl> m_opaque_ap;
88};
89
90
91} // namespace lldb
92
93#endif  // LLDB_SBValueList_h_
94