LDReader.h revision 87f34658dec9097d987d254a990ea7f311bfc95f
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#ifdef ENABLE_UNITTEST
12#include <gtest.h>
13#endif
14
15#include <llvm/Support/DataTypes.h>
16
17namespace mcld
18{
19
20class 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 */
26class LDReader
27{
28public:
29  enum Endian {
30    LittleEndian,
31    BigEndian
32  };
33
34protected:
35  LDReader() { }
36
37public:
38  virtual ~LDReader() { }
39
40  virtual bool isMyFormat(Input& pInput, bool &pContinue) const = 0;
41
42};
43
44} // namespace of mcld
45
46#endif
47
48