1 //===- SearchDirCmd.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_SEARCHDIRCMD_H_ 10 #define MCLD_SCRIPT_SEARCHDIRCMD_H_ 11 12 #include "mcld/Script/ScriptCommand.h" 13 14 #include <string> 15 16 namespace mcld { 17 18 class Module; 19 20 /** \class SearchDirCmd 21 * \brief This class defines the interfaces to SEARCH_DIR command. 22 */ 23 24 class SearchDirCmd : public ScriptCommand { 25 public: 26 explicit SearchDirCmd(const std::string& pPath); 27 ~SearchDirCmd(); 28 29 void dump() const; 30 31 void activate(Module& pModule); 32 classof(const ScriptCommand * pCmd)33 static bool classof(const ScriptCommand* pCmd) { 34 return pCmd->getKind() == ScriptCommand::SEARCH_DIR; 35 } 36 37 private: 38 std::string m_Path; 39 }; 40 41 } // namespace mcld 42 43 #endif // MCLD_SCRIPT_SEARCHDIRCMD_H_ 44