1 //===-- VectorIterator.h ----------------------------------------------*- C++
2 //-*-===//
3 //
4 //                     The LLVM Compiler Infrastructure
5 //
6 // This file is distributed under the University of Illinois Open Source
7 // License. See LICENSE.TXT for details.
8 //
9 //===----------------------------------------------------------------------===//
10 
11 #ifndef liblldb_VectorIterator_h_
12 #define liblldb_VectorIterator_h_
13 
14 #include "lldb/lldb-forward.h"
15 
16 #include "lldb/DataFormatters/TypeSynthetic.h"
17 #include "lldb/Target/ExecutionContext.h"
18 #include "lldb/Utility/ConstString.h"
19 
20 namespace lldb_private {
21 namespace formatters {
22 class VectorIteratorSyntheticFrontEnd : public SyntheticChildrenFrontEnd {
23 public:
24   VectorIteratorSyntheticFrontEnd(lldb::ValueObjectSP valobj_sp,
25                                   ConstString item_name);
26 
27   size_t CalculateNumChildren() override;
28 
29   lldb::ValueObjectSP GetChildAtIndex(size_t idx) override;
30 
31   bool Update() override;
32 
33   bool MightHaveChildren() override;
34 
35   size_t GetIndexOfChildWithName(const ConstString &name) override;
36 
37 private:
38   ExecutionContextRef m_exe_ctx_ref;
39   ConstString m_item_name;
40   lldb::ValueObjectSP m_item_sp;
41 };
42 
43 } // namespace formatters
44 } // namespace lldb_private
45 
46 #endif // liblldb_CF_h_
47