1254721Semaste//===-- SBValueList.h -------------------------------------------*- C++ -*-===// 2254721Semaste// 3353358Sdim// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 4353358Sdim// See https://llvm.org/LICENSE.txt for license information. 5353358Sdim// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 6254721Semaste// 7254721Semaste//===----------------------------------------------------------------------===// 8254721Semaste 9254721Semaste#ifndef LLDB_SBValueList_h_ 10254721Semaste#define LLDB_SBValueList_h_ 11254721Semaste 12254721Semaste#include "lldb/API/SBDefines.h" 13254721Semaste 14254721Semasteclass ValueListImpl; 15254721Semaste 16254721Semastenamespace lldb { 17254721Semaste 18314564Sdimclass LLDB_API SBValueList { 19254721Semastepublic: 20314564Sdim SBValueList(); 21254721Semaste 22314564Sdim SBValueList(const lldb::SBValueList &rhs); 23254721Semaste 24314564Sdim ~SBValueList(); 25254721Semaste 26353358Sdim explicit operator bool() const; 27353358Sdim 28314564Sdim bool IsValid() const; 29254721Semaste 30314564Sdim void Clear(); 31254721Semaste 32314564Sdim void Append(const lldb::SBValue &val_obj); 33254721Semaste 34314564Sdim void Append(const lldb::SBValueList &value_list); 35254721Semaste 36314564Sdim uint32_t GetSize() const; 37254721Semaste 38314564Sdim lldb::SBValue GetValueAtIndex(uint32_t idx) const; 39254721Semaste 40314564Sdim lldb::SBValue GetFirstValueByName(const char *name) const; 41254721Semaste 42314564Sdim lldb::SBValue FindValueObjectByUID(lldb::user_id_t uid); 43254721Semaste 44314564Sdim const lldb::SBValueList &operator=(const lldb::SBValueList &rhs); 45314564Sdim 46254721Semasteprotected: 47341825Sdim // only useful for visualizing the pointer or comparing two SBValueLists to 48341825Sdim // see if they are backed by the same underlying Impl. 49314564Sdim void *opaque_ptr(); 50254721Semaste 51254721Semasteprivate: 52314564Sdim friend class SBFrame; 53254721Semaste 54314564Sdim SBValueList(const ValueListImpl *lldb_object_ptr); 55254721Semaste 56314564Sdim void Append(lldb::ValueObjectSP &val_obj_sp); 57254721Semaste 58314564Sdim void CreateIfNeeded(); 59314564Sdim 60314564Sdim ValueListImpl *operator->(); 61314564Sdim 62314564Sdim ValueListImpl &operator*(); 63314564Sdim 64314564Sdim const ValueListImpl *operator->() const; 65314564Sdim 66314564Sdim const ValueListImpl &operator*() const; 67314564Sdim 68314564Sdim ValueListImpl &ref(); 69314564Sdim 70353358Sdim std::unique_ptr<ValueListImpl> m_opaque_up; 71254721Semaste}; 72254721Semaste 73254721Semaste} // namespace lldb 74254721Semaste 75314564Sdim#endif // LLDB_SBValueList_h_ 76