X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/7a3a100990355eb757dc81106b5aac6daed0b8e1..e9994d33a883aa73468e38d54cf377f52b3fd950:/include/simgrid/jedule/jedule.hpp?ds=sidebyside diff --git a/include/simgrid/jedule/jedule.hpp b/include/simgrid/jedule/jedule.hpp index 6a19881333..55b84eba46 100644 --- a/include/simgrid/jedule/jedule.hpp +++ b/include/simgrid/jedule/jedule.hpp @@ -1,40 +1,39 @@ -/* Copyright (c) 2010-2012, 2014-2018. The SimGrid Team. - * All rights reserved. */ +/* Copyright (c) 2010-2020. The SimGrid Team. All rights reserved. */ /* This program is free software; you can redistribute it and/or modify it * under the terms of the license (GNU LGPL) which comes with this package. */ #ifndef JEDULE_HPP_ #define JEDULE_HPP_ -#include "simgrid_config.h" -#include -#include "jedule_events.hpp" -#include "jedule_platform.hpp" +#include +#include +#include -#if SIMGRID_HAVE_JEDULE +#include namespace simgrid { namespace jedule{ class XBT_PUBLIC Jedule { + std::unordered_map meta_info_; + std::vector event_set_; + Container root_container_; + public: - Jedule()=default; - ~Jedule(); - std::vector event_set; - Container* root_container = nullptr; - std::unordered_map meta_info; - void addMetaInfo(char* key, char* value); - void cleanupOutput(); - void writeOutput(FILE *file); + explicit Jedule(const std::string& name) : root_container_(name) + { + root_container_.create_hierarchy(s4u::Engine::get_instance()->get_netzone_root()); + } + void add_meta_info(char* key, char* value); + void add_event(const Event& event); + void cleanup_output(); + void write_output(FILE* file); }; -} -} +} // namespace jedule +} // namespace simgrid -extern "C" { typedef simgrid::jedule::Jedule *jedule_t; -} -#endif #endif /* JEDULE_HPP_ */