Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Merge branch 'tracemgrsplit' into 'master'
[simgrid.git] / include / simgrid / jedule / jedule_events.hpp
1 /* Copyright (c) 2010-2019. The SimGrid Team. All rights reserved.          */
2
3 /* This program is free software; you can redistribute it and/or modify it
4  * under the terms of the license (GNU LGPL) which comes with this package. */
5
6 #ifndef JEDULE_EVENTS_H_
7 #define JEDULE_EVENTS_H_
8
9 #include <simgrid/jedule/jedule_platform.hpp>
10
11 #include <simgrid/forward.h>
12
13 #include <vector>
14 #include <string>
15 #include <unordered_map>
16
17 namespace simgrid {
18 namespace jedule{
19
20 class XBT_PUBLIC Event {
21 public:
22   Event(const std::string& name, double start_time, double end_time, const std::string& type)
23       : name_(name), start_time_(start_time), end_time_(end_time), type_(type)
24   {
25   }
26   void add_characteristic(char* characteristic);
27   void add_resources(const std::vector<sg_host_t>& host_selection);
28   void add_info(char* key, char* value);
29   void print(FILE* file) const;
30
31 private:
32   std::string name_;
33   double start_time_;
34   double end_time_;
35   std::string type_;
36   std::vector<Subset> resource_subsets_;
37   std::vector<std::string> characteristics_list_;         /* just a list of names */
38   std::unordered_map<std::string, std::string> info_map_; /* key/value pairs */
39 };
40 }
41 }
42
43 typedef simgrid::jedule::Event* jed_event_t;
44
45 #endif /* JEDULE_EVENTS_H_ */