FileAction.h revision 533eae20118036f425f27bf0536ef0ccbb090b65
1//===- FileAction.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_MC_FILEACTION_H 10#define MCLD_MC_FILEACTION_H 11#include <mcld/MC/InputAction.h> 12#include <mcld/Support/FileHandle.h> 13 14namespace mcld { 15 16class ContextFactory; 17 18/** \class ContextAction 19 * \brief ContextAction is a command object to create input's LDContext. 20 */ 21class ContextAction : public InputAction 22{ 23public: 24 explicit ContextAction(unsigned int pPosition); 25 26 bool activate(InputBuilder& pBuilder) const; 27}; 28 29/** \class MemoryAreaAction 30 * \brief MemoryAreaAction is a command object to create input's MemoryArea. 31 */ 32class MemoryAreaAction : public InputAction 33{ 34public: 35 MemoryAreaAction(unsigned int pPosition, 36 FileHandle::OpenMode pMode, 37 FileHandle::Permission pPerm = FileHandle::System); 38 39 bool activate(InputBuilder& pBuilder) const; 40 41private: 42 FileHandle::OpenMode m_Mode; 43 FileHandle::Permission m_Permission; 44}; 45 46} // end of namespace mcld 47 48#endif 49 50