GroupCmd.h revision 37b74a387bb3993387029859c2d9d051c41c724e
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 14namespace mcld { 15 16class InputTree; 17class InputBuilder; 18class GroupReader; 19class LinkerConfig; 20class StringList; 21 22/** \class GroupCmd 23 * \brief This class defines the interfaces to Group command. 24 */ 25 26class 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 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