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