Home | History | Annotate | Download | only in LD
      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 Module;
     16 class Input;
     17 
     18 /** \class BinaryReader
     19  *  \brief BinaryReader provides an common interface for different Binary
     20  *  formats.
     21  */
     22 class BinaryReader : public LDReader
     23 {
     24 public:
     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