1 //===- GroupCmd.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_GROUPCMD_H_ 10 #define MCLD_SCRIPT_GROUPCMD_H_ 11 12 #include "mcld/Script/ScriptCommand.h" 13 14 namespace mcld { 15 16 class InputTree; 17 class InputBuilder; 18 class GroupReader; 19 class LinkerConfig; 20 class StringList; 21 22 /** \class GroupCmd 23 * \brief This class defines the interfaces to Group command. 24 */ 25 26 class GroupCmd : public ScriptCommand { 27 public: 28 GroupCmd(StringList& pStringList, 29 InputTree& pInputTree, 30 InputBuilder& pBuilder, 31 GroupReader& m_GroupReader, 32 const LinkerConfig& pConfig); 33 ~GroupCmd(); 34 35 void dump() const; 36 classof(const ScriptCommand * pCmd)37 static bool classof(const ScriptCommand* pCmd) { 38 return pCmd->getKind() == ScriptCommand::GROUP; 39 } 40 41 void activate(Module& pModule); 42 43 private: 44 StringList& m_StringList; 45 InputTree& m_InputTree; 46 InputBuilder& m_Builder; 47 GroupReader& m_GroupReader; 48 const LinkerConfig& m_Config; 49 }; 50 51 } // namespace mcld 52 53 #endif // MCLD_SCRIPT_GROUPCMD_H_ 54