Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Remove a level of indirection, and custom destructors for instr/jedule.
[simgrid.git] / include / simgrid / jedule / jedule_events.hpp
index a3d4326..5af7f4e 100644 (file)
@@ -19,23 +19,23 @@ namespace jedule{
 
 class XBT_PUBLIC Event {
 public:
-  Event(const std::string& name, double start_time, double end_time, const std::string& type);
-  Event(const Event&) = delete;
-  Event& operator=(const Event&) = delete;
-  ~Event();
+  Event(const std::string& name, double start_time, double end_time, const std::string& type)
+      : name_(name), start_time_(start_time), end_time_(end_time), type_(type)
+  {
+  }
   void add_characteristic(char* characteristic);
-  void add_resources(std::vector<sg_host_t>* host_selection);
+  void add_resources(const std::vector<sg_host_t>& host_selection);
   void add_info(char* key, char* value);
-  void print(FILE* file);
+  void print(FILE* file) const;
 
 private:
   std::string name_;
   double start_time_;
   double end_time_;
   std::string type_;
-  std::vector<jed_subset_t>* resource_subsets_;
-  std::vector<char*> characteristics_list_;   /* just a list of names */
-  std::unordered_map<char*, char*> info_map_; /* key/value pairs */
+  std::vector<Subset> resource_subsets_;
+  std::vector<std::string> characteristics_list_;         /* just a list of names */
+  std::unordered_map<std::string, std::string> info_map_; /* key/value pairs */
 };
 }
 }