IPDBDataStream.h 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. //===- IPDBDataStream.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. #ifndef LLVM_DEBUGINFO_PDB_IPDBDATASTREAM_H
  10. #define LLVM_DEBUGINFO_PDB_IPDBDATASTREAM_H
  11. #include "PDBTypes.h"
  12. #include "llvm/ADT/Optional.h"
  13. #include "llvm/ADT/SmallVector.h"
  14. namespace llvm {
  15. /// IPDBDataStream defines an interface used to represent a stream consisting
  16. /// of a name and a series of records whose formats depend on the particular
  17. /// stream type.
  18. class IPDBDataStream {
  19. public:
  20. typedef llvm::SmallVector<uint8_t, 32> RecordType;
  21. virtual ~IPDBDataStream();
  22. virtual uint32_t getRecordCount() const = 0;
  23. virtual std::string getName() const = 0;
  24. virtual llvm::Optional<RecordType> getItemAtIndex(uint32_t Index) const = 0;
  25. virtual bool getNext(RecordType &Record) = 0;
  26. virtual void reset() = 0;
  27. virtual IPDBDataStream *clone() const = 0;
  28. };
  29. }
  30. #endif