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 {
/** 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)
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;