1//===- BinaryReader.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_LD_BINARYREADER_H 10#define MCLD_LD_BINARYREADER_H 11#include "mcld/LD/LDReader.h" 12 13namespace mcld { 14 15class Module; 16class Input; 17 18/** \class BinaryReader 19 * \brief BinaryReader provides an common interface for different Binary 20 * formats. 21 */ 22class BinaryReader : public LDReader 23{ 24public: 25 virtual ~BinaryReader() = 0; 26 27 virtual bool isMyFormat(Input& pInput, bool &pContinue) const 28 { pContinue = true; return false; } 29 30 virtual bool readBinary(Input& pFile) = 0; 31}; 32 33} // namespace of mcld 34 35#endif 36 37