10 #ifndef WRENCH_FILE_READ_ACTION_H
11 #define WRENCH_FILE_READ_ACTION_H
15 #include "wrench/action/Action.h"
28 std::shared_ptr<DataFile>
getFile()
const;
36 FileReadAction(
const std::string& name, std::shared_ptr<CompoundJob> job,
37 std::shared_ptr<DataFile>file, std::vector<std::shared_ptr<FileLocation>> file_locations);
40 void execute(std::shared_ptr<ActionExecutor> action_executor)
override;
41 void terminate(std::shared_ptr<ActionExecutor> action_executor)
override;
45 std::shared_ptr<DataFile>file;
46 std::vector<std::shared_ptr<FileLocation>> file_locations;
47 std::shared_ptr<FileLocation> used_location;
52 #endif //WRENCH_FILE_READ_ACTION_H
void terminate(std::shared_ptr< ActionExecutor > action_executor) override
Method called when the action terminates.
Definition: FileReadAction.cpp:82
std::vector< std::shared_ptr< FileLocation > > getFileLocations() const
Returns the action's file locations.
Definition: FileReadAction.cpp:50
void execute(std::shared_ptr< ActionExecutor > action_executor) override
Method to execute the action.
Definition: FileReadAction.cpp:59
Definition: Action.cpp:28
FileReadAction(const std::string &name, std::shared_ptr< CompoundJob > job, std::shared_ptr< DataFile >file, std::vector< std::shared_ptr< FileLocation >> file_locations)
Constructor.
Definition: FileReadAction.cpp:32
A class that implements a file read action.
Definition: FileReadAction.h:25
std::shared_ptr< FileLocation > getUsedFileLocation() const
Return the file location used by the action (or nullptr if action has not started,...
Definition: FileReadAction.cpp:91
std::shared_ptr< DataFile > getFile() const
Returns the action's file.
Definition: FileReadAction.cpp:42
bool usesScratch() const override
Determine whether the action uses scratch.
Definition: FileReadAction.cpp:99
An abstract class that implements the concept of an action.
Definition: Action.h:28
A compound job.
Definition: CompoundJob.h:47