Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Enforce "Rule-of-Three/Five".
[simgrid.git] / src / kernel / resource / profile / trace_mgr.hpp
index e684228..c0abe9e 100644 (file)
@@ -41,10 +41,6 @@ XBT_PUBLIC void tmgr_trace_event_unref(simgrid::kernel::profile::Event** trace_e
 
 XBT_PUBLIC void tmgr_finalize();
 
-XBT_PUBLIC simgrid::kernel::profile::Profile* tmgr_trace_new_from_file(std::string filename);
-XBT_PUBLIC simgrid::kernel::profile::Profile* tmgr_trace_new_from_string(std::string id, std::string input,
-                                                                         double periodicity);
-
 namespace simgrid {
 namespace kernel {
 namespace profile {
@@ -81,8 +77,16 @@ public:
   /**  Creates an empty trace */
   explicit Profile();
   virtual ~Profile();
+  Event* schedule(FutureEvtSet* fes, resource::Resource* resource);
+  DatedValue next(Event* event);
+
+  static Profile* from_file(const std::string& path);
+  static Profile* from_string(const std::string& name, const std::string& input, double periodicity);
   // private:
   std::vector<DatedValue> event_list;
+
+private:
+  FutureEvtSet* fes_ = nullptr;
 };
 
 /** @brief Future Event Set (collection of iterators over the traces)
@@ -90,10 +94,12 @@ public:
 class XBT_PUBLIC FutureEvtSet {
 public:
   FutureEvtSet();
+  FutureEvtSet(const FutureEvtSet&) = delete;
+  FutureEvtSet& operator=(const FutureEvtSet&) = delete;
   virtual ~FutureEvtSet();
   double next_date() const;
   Event* pop_leq(double date, double* value, resource::Resource** resource);
-  Event* add_trace(Profile* profile, resource::Resource* resource);
+  void add_event(double date, Event* evt);
 
 private:
   typedef std::pair<double, Event*> Qelt;