X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/66f7874ca76715dc1073c0c51a4da221f241c028..1bf033cc925aa31693ef5163ea056fde5b75ff1e:/include/simgrid/jedule/jedule_events.hpp diff --git a/include/simgrid/jedule/jedule_events.hpp b/include/simgrid/jedule/jedule_events.hpp index 1ccee5c803..3c853e3162 100644 --- a/include/simgrid/jedule/jedule_events.hpp +++ b/include/simgrid/jedule/jedule_events.hpp @@ -1,5 +1,4 @@ -/* Copyright (c) 2010-2012, 2014-2015. The SimGrid Team. - * All rights reserved. */ +/* Copyright (c) 2010-2018. 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. */ @@ -7,48 +6,53 @@ #ifndef JEDULE_EVENTS_H_ #define JEDULE_EVENTS_H_ -#include "simgrid_config.h" -#include "simgrid/forward.h" +#include + +#include + #include #include #include -#include "jedule_platform.hpp" - -#if HAVE_JEDULE namespace simgrid { namespace jedule{ -XBT_PUBLIC_CLASS Event{ - private: - ~Event()=default; - public: - Event(std::string name, double start_time, double end_time, std::string type) - : name(name), start_time(start_time), end_time(end_time), type(type){} - void deleteEvent(); - void addCharacteristic(char *characteristic); - void addResources(std::vector *host_selection); - void addInfo(char *key, char *value); - void print(FILE *file); - - private: - std::string name; - double start_time; - double end_time; - std::string type; - std::vector resource_subsets; - std::vector characteristics_list; /* just a list of names (strings) */ - std::unordered_map info_map; /* key/value pairs */ +class XBT_PUBLIC Event { +public: + Event(std::string name, double start_time, double end_time, std::string type); + ~Event(); + void add_characteristic(char* characteristic); + void add_resources(std::vector* host_selection); + void add_info(char* key, char* value); + void print(FILE* file); + + // deprecated + XBT_ATTRIB_DEPRECATED_v323("Please use Event::add_characteristic()") void addCharacteristic(char* characteristic) + { + add_characteristic(characteristic); + } + XBT_ATTRIB_DEPRECATED_v323("Please use Event::add_resources()") void addResources( + std::vector* host_selection) + { + add_resources(host_selection); + } + XBT_ATTRIB_DEPRECATED_v323("Please use Event::add_info()") void addInfo(char* key, char* value) + { + add_info(key, value); + } + +private: + std::string name_; + double start_time_; + double end_time_; + std::string type_; + std::vector* resource_subsets_; + std::vector characteristics_list_; /* just a list of names */ + std::unordered_map info_map_; /* key/value pairs */ }; } } -SG_BEGIN_DECL() - -typedef simgrid::jedule::Event * jed_event_t; - -SG_END_DECL() - -#endif +typedef simgrid::jedule::Event* jed_event_t; #endif /* JEDULE_EVENTS_H_ */