aboutsummaryrefslogtreecommitdiff
path: root/include/lldb/Core/ValueObjectList.h
blob: 5bfe40b2e952c808c2223b13c7cdf318dc906c9b (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
//===-- ValueObjectList.h ---------------------------------------*- C++ -*-===//
//
//                     The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//

#ifndef liblldb_ValueObjectList_h_
#define liblldb_ValueObjectList_h_

// C Includes
// C++ Includes
#include <vector>

// Other libraries and framework includes
// Project includes
#include "lldb/lldb-private.h"
#include "lldb/Core/ClangForward.h"
#include "lldb/Core/UserID.h"
#include "lldb/Target/ExecutionContextScope.h"

namespace lldb_private {

//----------------------------------------------------------------------
// A collection of ValueObject values that
//----------------------------------------------------------------------
class ValueObjectList
{
public:
    //------------------------------------------------------------------
    // Constructors and Destructors
    //------------------------------------------------------------------
    ValueObjectList ();

    ValueObjectList (const ValueObjectList &rhs);

    ~ValueObjectList();

    const ValueObjectList &
    operator = (const ValueObjectList &rhs);

    void
    Append (const lldb::ValueObjectSP &val_obj_sp);

    void
    Append (const ValueObjectList &valobj_list);

    lldb::ValueObjectSP
    FindValueObjectByPointer (ValueObject *valobj);

    size_t
    GetSize () const;
    
    void
    Resize (size_t size);

    lldb::ValueObjectSP
    GetValueObjectAtIndex (size_t idx);

    lldb::ValueObjectSP
    RemoveValueObjectAtIndex (size_t idx);
    
    void
    SetValueObjectAtIndex (size_t idx, 
                           const lldb::ValueObjectSP &valobj_sp);
    
    lldb::ValueObjectSP
    FindValueObjectByValueName (const char *name);

    lldb::ValueObjectSP
    FindValueObjectByUID (lldb::user_id_t uid);

    void
    Swap (ValueObjectList &value_object_list);
    
protected:
    typedef std::vector<lldb::ValueObjectSP> collection;
    //------------------------------------------------------------------
    // Classes that inherit from ValueObjectList can see and modify these
    //------------------------------------------------------------------
    collection  m_value_objects;

};


} // namespace lldb_private

#endif  // liblldb_ValueObjectList_h_