WRENCH  1.11
Cyberinfrastructure Simulation Workbench
Overview Installation Getting Started WRENCH 101 WRENCH 102
FileDeleteAction.h
1 
10 #ifndef WRENCH_FILE_DELETE_ACTION_H
11 #define WRENCH_FILE_DELETE_ACTION_H
12 
13 #include <string>
14 
15 #include "wrench/action/Action.h"
16 
17 namespace wrench {
18 
19  class DataFile;
20  class FileLocation;
21 
25  class FileDeleteAction : public Action {
26 
27  public:
28  std::shared_ptr<DataFile>getFile() const;
29  std::shared_ptr<FileLocation> getFileLocation() const;
30  bool usesScratch() const override;
31 
32  protected:
33  friend class CompoundJob;
34 
35  FileDeleteAction(const std::string& name, std::shared_ptr<CompoundJob> job,
36  std::shared_ptr<DataFile>file, std::shared_ptr<FileLocation> file_location);
37 
38 
39  void execute(std::shared_ptr<ActionExecutor> action_executor) override;
40  void terminate(std::shared_ptr<ActionExecutor> action_executor) override;
41 
42  private:
43  std::shared_ptr<DataFile>file;
44  std::shared_ptr<FileLocation> file_location;
45 
46  };
47 }
48 
49 #endif //WRENCH_FILE_DELETE_ACTION_H
wrench::FileDeleteAction::getFile
std::shared_ptr< DataFile > getFile() const
Returns the action's file.
Definition: FileDeleteAction.cpp:43
wrench
Definition: Action.cpp:28
wrench::FileDeleteAction::usesScratch
bool usesScratch() const override
Determine whether the action uses scratch.
Definition: FileDeleteAction.cpp:79
wrench::FileDeleteAction
A class that implements a file deletion action.
Definition: FileDeleteAction.h:25
wrench::FileDeleteAction::terminate
void terminate(std::shared_ptr< ActionExecutor > action_executor) override
Method called when the action terminates.
Definition: FileDeleteAction.cpp:71
wrench::FileDeleteAction::execute
void execute(std::shared_ptr< ActionExecutor > action_executor) override
Method to execute the action.
Definition: FileDeleteAction.cpp:60
wrench::FileDeleteAction::getFileLocation
std::shared_ptr< FileLocation > getFileLocation() const
Returns the action's file locations.
Definition: FileDeleteAction.cpp:51
wrench::Action
An abstract class that implements the concept of an action.
Definition: Action.h:28
wrench::FileDeleteAction::FileDeleteAction
FileDeleteAction(const std::string &name, std::shared_ptr< CompoundJob > job, std::shared_ptr< DataFile >file, std::shared_ptr< FileLocation > file_location)
Constructor.
Definition: FileDeleteAction.cpp:32