WorkflowFile.h
1 
10 #ifndef WRENCH_WORKFLOWFILE_H
11 #define WRENCH_WORKFLOWFILE_H
12 
13 #include <string>
14 #include <map>
15 
16 
17 namespace wrench {
18 
19  class Workflow;
20 
21  class WorkflowTask;
22 
26  class WorkflowFile {
27 
28  public:
29 
30  double getSize();
31 
32  std::string getID();
33 
35  std::map<std::string, WorkflowTask *> getInputOf();
36 
37  bool isOutput();
38 
40 
41  private:
42 
43  friend class Workflow;
44 
45  friend class WorkflowTask;
46 
47  std::string id;
48  double size; // in bytes
49 
50  void setOutputOf(WorkflowTask * task);
51 
52  void setInputOf(WorkflowTask *task);
53 
54 
55  Workflow *workflow; // Containing workflow
56  WorkflowFile(const std::string, double);
57 
58  WorkflowTask *output_of;
59  std::map<std::string, WorkflowTask *> input_of;
60 
61  };
62 
63 };
64 
65 #endif //WRENCH_WORKFLOWFILE_H
WorkflowTask * getOutputOf()
Get the task that outputs this file.
Definition: WorkflowFile.cpp:62
Workflow * getWorkflow()
Get the workflow that this file is a part of.
Definition: WorkflowFile.cpp:88
Definition: Alarm.cpp:20
A workflow (to be executed by a WMS)
Definition: Workflow.h:34
bool isOutput()
Returns true if the file is the output of some task, false otherwise.
Definition: WorkflowFile.cpp:96
A computational task in a Workflow.
Definition: WorkflowTask.h:31
std::string getID()
Get the file id.
Definition: WorkflowFile.cpp:44
double getSize()
Get the file size.
Definition: WorkflowFile.cpp:36
A data file used/produced by a WorkflowTask in a Workflow.
Definition: WorkflowFile.h:26
std::map< std::string, WorkflowTask * > getInputOf()
Get the list of tasks that use this file as input.
Definition: WorkflowFile.cpp:80