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 #include <string>
     14 
     15 namespace mcld
     16 {
     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 {
     26 public:
     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 
     40 private:
     41   std::string m_OutputFile;
     42 };
     43 
     44 } // namespace of mcld
     45 
     46 #endif
     47 
     48