1 //===-- DWARFDIECollection.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 SymbolFileDWARF_DWARFDIECollection_h_
11 #define SymbolFileDWARF_DWARFDIECollection_h_
12 
13 #include "DWARFDIE.h"
14 #include <vector>
15 
16 class DWARFDIECollection {
17 public:
DWARFDIECollection()18   DWARFDIECollection() : m_dies() {}
~DWARFDIECollection()19   ~DWARFDIECollection() {}
20 
21   void Append(const DWARFDIE &die);
22 
23   void Dump(lldb_private::Stream *s, const char *title) const;
24 
25   DWARFDIE
26   GetDIEAtIndex(uint32_t idx) const;
27 
28   size_t Size() const;
29 
30 protected:
31   typedef std::vector<DWARFDIE> collection;
32   typedef collection::iterator iterator;
33   typedef collection::const_iterator const_iterator;
34 
35   collection m_dies; // Ordered list of die offsets
36 };
37 
38 #endif // SymbolFileDWARF_DWARFDIECollection_h_
39