Home | History | Annotate | Download | only in LD
      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_LD_LDREADER_H
     10 #define MCLD_LD_LDREADER_H
     11 
     12 #include <llvm/Support/DataTypes.h>
     13 
     14 namespace mcld
     15 {
     16 
     17 class Input;
     18 
     19 /** \class LDReader
     20  *  \brief LDReader provides the basic interfaces for all readers. It also
     21  *  provides basic functions to read data stream.
     22  */
     23 class LDReader
     24 {
     25 public:
     26   enum Endian {
     27     LittleEndian,
     28     BigEndian
     29   };
     30 
     31 protected:
     32   LDReader() { }
     33 
     34 public:
     35   virtual ~LDReader() { }
     36 
     37   virtual bool isMyFormat(Input& pInput, bool &pContinue) const = 0;
     38 
     39 };
     40 
     41 } // namespace of mcld
     42 
     43 #endif
     44 
     45