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