Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
New platform files (just add AS tag)
[simgrid.git] / examples / cxx / comm_time / CommTimeTask.hpp
1 #ifndef COMMTIME_TASK_HPP
2 #define COMMTIME_TASK_HPP
3
4 #include <MsgTask.hpp>
5 using namespace SimGrid::Msg;
6
7 class CommTimeTask : public Task
8 {
9         MSG_DECLARE_DYNAMIC(CommTimeTask);
10
11 public:
12
13         CommTimeTask()
14         :Task(NULL, 0.0, 0.0){}
15         
16         // Default constructor.
17         CommTimeTask(const char* name, double computeDuration, double messageSize)
18         throw (InvalidArgumentException, NullPointerException)
19         :Task(name, computeDuration, messageSize){}
20         
21         // Destructor
22         virtual ~CommTimeTask() 
23         throw(MsgException){}
24         
25         void setTime(double timeVal)
26         {
27                 this->timeVal = timeVal;
28         }
29         
30         double getTime() 
31         {
32                 return timeVal;
33         }
34         
35 private :
36         
37         double timeVal;
38 };
39
40 #endif // !COMMTIME_TASK_HPP