Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
71bced756de5f9c1f2eafd96baf961b5c81e5955
[simgrid.git] / include / simgrid / jedule / jedule_events.hpp
1 /* Copyright (c) 2010-2018. 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(std::string name, double start_time, double end_time, std::string type);
23   ~Event();
24   void addCharacteristic(char* characteristic);
25   void addResources(std::vector<sg_host_t>* host_selection);
26   void addInfo(char* key, char* value);
27   void print(FILE* file);
28
29 private:
30   std::string name;
31   double start_time;
32   double end_time;
33   std::string type;
34   std::vector<jed_subset_t>* resource_subsets;
35   std::vector<char*> characteristics_list;   /* just a list of names (strings) */
36   std::unordered_map<char*, char*> info_map; /* key/value pairs */
37 };
38 }
39 }
40
41 typedef simgrid::jedule::Event* jed_event_t;
42
43 #endif /* JEDULE_EVENTS_H_ */