Home | History | Annotate | Download | only in Script
      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 
     14 #include <string>
     15 
     16 namespace mcld {
     17 
     18 class Module;
     19 
     20 /** \class OutputCmd
     21  *  \brief This class defines the interfaces to Output command.
     22  */
     23 
     24 class OutputCmd : public ScriptCommand {
     25  public:
     26   explicit OutputCmd(const std::string& pOutputFile);
     27 
     28   ~OutputCmd();
     29 
     30   void dump() const;
     31 
     32   static bool classof(const ScriptCommand* pCmd) {
     33     return pCmd->getKind() == ScriptCommand::OUTPUT;
     34   }
     35 
     36   void activate(Module& pModule);
     37 
     38  private:
     39   std::string m_OutputFile;
     40 };
     41 
     42 }  // namespace mcld
     43 
     44 #endif  // MCLD_SCRIPT_OUTPUTCMD_H_
     45