1 //===-- VectorIterator.h ----------------------------------------------*- C++ 2 //-*-===// 3 // 4 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 5 // See https://llvm.org/LICENSE.txt for license information. 6 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 7 // 8 //===----------------------------------------------------------------------===// 9 10 #ifndef LLDB_DATAFORMATTERS_VECTORITERATOR_H 11 #define LLDB_DATAFORMATTERS_VECTORITERATOR_H 12 13 #include "lldb/lldb-forward.h" 14 15 #include "lldb/DataFormatters/TypeSynthetic.h" 16 #include "lldb/Target/ExecutionContext.h" 17 #include "lldb/Utility/ConstString.h" 18 19 namespace lldb_private { 20 namespace formatters { 21 class VectorIteratorSyntheticFrontEnd : public SyntheticChildrenFrontEnd { 22 public: 23 VectorIteratorSyntheticFrontEnd(lldb::ValueObjectSP valobj_sp, 24 ConstString item_name); 25 26 size_t CalculateNumChildren() override; 27 28 lldb::ValueObjectSP GetChildAtIndex(size_t idx) override; 29 30 bool Update() override; 31 32 bool MightHaveChildren() override; 33 34 size_t GetIndexOfChildWithName(ConstString name) override; 35 36 private: 37 ExecutionContextRef m_exe_ctx_ref; 38 ConstString m_item_name; 39 lldb::ValueObjectSP m_item_sp; 40 }; 41 42 } // namespace formatters 43 } // namespace lldb_private 44 45 #endif // LLDB_DATAFORMATTERS_VECTORITERATOR_H 46