OutputCmd.h revision 533eae20118036f425f27bf0536ef0ccbb090b65
1//===- OutputCmd.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_OUTPUTCMD_H
10#define MCLD_SCRIPT_OUTPUTCMD_H
11
12#include <mcld/Script/ScriptCommand.h>
13#include <string>
14
15namespace mcld
16{
17
18class Module;
19
20/** \class OutputCmd
21 *  \brief This class defines the interfaces to Output command.
22 */
23
24class OutputCmd : public ScriptCommand
25{
26public:
27  OutputCmd(const std::string& pOutputFile);
28
29  ~OutputCmd();
30
31  void dump() const;
32
33  static bool classof(const ScriptCommand* pCmd)
34  {
35    return pCmd->getKind() == ScriptCommand::OUTPUT;
36  }
37
38  void activate(Module& pModule);
39
40private:
41  std::string m_OutputFile;
42};
43
44} // namespace of mcld
45
46#endif
47
48