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