1//===- InputCmd.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_SCRIPT_INPUTCMD_H_
10#define MCLD_SCRIPT_INPUTCMD_H_
11
12#include "mcld/Script/ScriptCommand.h"
13
14namespace mcld {
15
16class ArchiveReader;
17class DynObjReader;
18class InputBuilder;
19class InputTree;
20class LinkerConfig;
21class ObjectReader;
22class StringList;
23
24/** \class InputCmd
25 *  \brief This class defines the interfaces to Input command.
26 */
27
28class InputCmd : public ScriptCommand {
29 public:
30  InputCmd(StringList& pStringList,
31           InputTree& pInputTree,
32           InputBuilder& pBuilder,
33           ObjectReader& pObjectReader,
34           ArchiveReader& pArchiveReader,
35           DynObjReader& pDynObjReader,
36           const LinkerConfig& pConfig);
37  ~InputCmd();
38
39  void dump() const;
40
41  static bool classof(const ScriptCommand* pCmd) {
42    return pCmd->getKind() == ScriptCommand::INPUT;
43  }
44
45  void activate(Module& pModule);
46
47 private:
48  StringList& m_StringList;
49  InputTree& m_InputTree;
50  InputBuilder& m_Builder;
51  ObjectReader& m_ObjectReader;
52  ArchiveReader& m_ArchiveReader;
53  DynObjReader& m_DynObjReader;
54  const LinkerConfig& m_Config;
55};
56
57}  // namespace mcld
58
59#endif  // MCLD_SCRIPT_INPUTCMD_H_
60