1 //===- LDReader.h ---------------------------------------------------------===// 2 // 3 // The MCLinker Project 4 // 5 // This file is distributed under the University of Illinois Open Source 6 // License. See LICENSE.TXT for details. 7 // 8 //===----------------------------------------------------------------------===// 9 #ifndef MCLD_READER_INTERFACE_H 10 #define MCLD_READER_INTERFACE_H 11 #ifdef ENABLE_UNITTEST 12 #include <gtest.h> 13 #endif 14 15 #include <llvm/Support/DataTypes.h> 16 17 namespace mcld 18 { 19 20 class Input; 21 22 /** \class LDReader 23 * \brief LDReader provides the basic interfaces for all readers. It also 24 * provides basic functions to read data stream. 25 */ 26 class LDReader 27 { 28 public: 29 enum Endian { 30 LittleEndian, 31 BigEndian 32 }; 33 34 protected: 35 LDReader() { } 36 37 public: 38 virtual ~LDReader() { } 39 40 virtual bool isMyFormat(Input& pInput) const = 0; 41 42 }; 43 44 } // namespace of mcld 45 46 #endif 47 48