LLVM  4.0.0
IPDBEnumChildren.h
Go to the documentation of this file.
1 //===- IPDBEnumChildren.h - base interface for child enumerator -*- 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 LLVM_DEBUGINFO_PDB_IPDBENUMCHILDREN_H
11 #define LLVM_DEBUGINFO_PDB_IPDBENUMCHILDREN_H
12 
13 #include <cstdint>
14 #include <memory>
15 
16 namespace llvm {
17 namespace pdb {
18 
19 template <typename ChildType> class IPDBEnumChildren {
20 public:
21  typedef std::unique_ptr<ChildType> ChildTypePtr;
23 
24  virtual ~IPDBEnumChildren() = default;
25 
26  virtual uint32_t getChildCount() const = 0;
27  virtual ChildTypePtr getChildAtIndex(uint32_t Index) const = 0;
28  virtual ChildTypePtr getNext() = 0;
29  virtual void reset() = 0;
30  virtual MyType *clone() const = 0;
31 };
32 
33 } // end namespace pdb
34 } // end namespace llvm
35 
36 #endif // LLVM_DEBUGINFO_PDB_IPDBENUMCHILDREN_H
virtual MyType * clone() const =0
virtual ChildTypePtr getChildAtIndex(uint32_t Index) const =0
IPDBEnumChildren< ChildType > MyType
virtual uint32_t getChildCount() const =0
virtual ~IPDBEnumChildren()=default
std::unique_ptr< ChildType > ChildTypePtr
virtual ChildTypePtr getNext()=0