| //===- ArchiveReader.h ----------------------------------------------------===// |
| // |
| // The MCLinker Project |
| // |
| // This file is distributed under the University of Illinois Open Source |
| // License. See LICENSE.TXT for details. |
| // |
| //===----------------------------------------------------------------------===// |
| #ifndef MCLD_ARCHIVE_READER_INTERFACE_H |
| #define MCLD_ARCHIVE_READER_INTERFACE_H |
| #ifdef ENABLE_UNITTEST |
| #include <gtest.h> |
| #endif |
| #include <mcld/LD/LDReader.h> |
| |
| namespace mcld |
| { |
| |
| class Archive; |
| |
| /** \class ArchiveReader |
| * \brief ArchiveReader provides an common interface for all archive readers. |
| * |
| * ArchiveReader also reads the target-independent parts of an archive file. |
| * There are some property on all the archive formats. |
| * 1. All archive elements star on an even boundary, new line padded; |
| * 2. All archive headers are char *; |
| * 3. All archive headers are the same size. |
| */ |
| |
| class ArchiveReader : public LDReader |
| { |
| public: |
| ArchiveReader(); |
| virtual ~ArchiveReader(); |
| |
| virtual bool readArchive(Archive& pArchive) = 0; |
| }; |
| |
| } // namespace of mcld |
| |
| #endif |
| |