From: Arnaud Giersch Date: Tue, 2 Apr 2019 20:30:12 +0000 (+0200) Subject: Remove features marked with DEPRECATED_v323. X-Git-Tag: v3.22.1~14 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/65beede857f93e33c96e544f76b93793c973dc10 Remove features marked with DEPRECATED_v323. --- diff --git a/doc/Doxyfile.in b/doc/Doxyfile.in index a35a726bc6..a9df18b33f 100644 --- a/doc/Doxyfile.in +++ b/doc/Doxyfile.in @@ -1442,7 +1442,6 @@ PREDEFINED = __cplusplus \ XBT_PRIVATE= \ XBT_ATTRIB_NORETURN= \ XBT_ATTRIB_UNUSED= \ - XBT_ATTRIB_DEPRECATED_v323(m)= \ XBT_ATTRIB_DEPRECATED_v324(m)= \ XBT_ATTRIB_DEPRECATED_v325(m)= \ XBT_ATTRIB_DEPRECATED_v326(m)= diff --git a/docs/source/Doxyfile b/docs/source/Doxyfile index fa84973877..416264825f 100644 --- a/docs/source/Doxyfile +++ b/docs/source/Doxyfile @@ -40,7 +40,6 @@ PREDEFINED += \ XBT_PRIVATE= \ XBT_ATTRIB_NORETURN= \ XBT_ATTRIB_UNUSED= \ - XBT_ATTRIB_DEPRECATED_v323(m)= \ XBT_ATTRIB_DEPRECATED_v324(m)= \ XBT_ATTRIB_DEPRECATED_v325(m)= \ XBT_ATTRIB_DEPRECATED_v326(m)= diff --git a/include/simgrid/forward.h b/include/simgrid/forward.h index 9facab2ef4..723d15ff51 100644 --- a/include/simgrid/forward.h +++ b/include/simgrid/forward.h @@ -186,7 +186,6 @@ typedef simgrid::s4u::VirtualMachine s4u_VM; typedef boost::intrusive_ptr smx_activity_t; typedef simgrid::simix::Timer* smx_timer_t; -typedef simgrid::kernel::context::Context* smx_context_t; typedef simgrid::kernel::actor::ActorImpl* smx_actor_t; typedef simgrid::kernel::activity::ConditionVariableImpl* smx_cond_t; typedef simgrid::kernel::activity::MailboxImpl* smx_mailbox_t; @@ -209,7 +208,6 @@ typedef struct kernel_Activity* smx_activity_t; typedef struct s_smx_timer* smx_timer_t; typedef struct s_smx_actor* smx_actor_t; typedef struct s_smx_cond_t* smx_cond_t; -typedef struct s_smx_context* smx_context_t; typedef struct s_smx_mailbox* smx_mailbox_t; typedef struct s_smx_mutex* smx_mutex_t; typedef struct s_smx_sem* smx_sem_t; diff --git a/include/simgrid/jedule/jedule.hpp b/include/simgrid/jedule/jedule.hpp index fd39db599c..a6a54ea652 100644 --- a/include/simgrid/jedule/jedule.hpp +++ b/include/simgrid/jedule/jedule.hpp @@ -26,14 +26,6 @@ public: void cleanup_output(); void write_output(FILE* file); - // deprecated - XBT_ATTRIB_DEPRECATED_v323("Please use Jedule::add_meta_info()") void addMetaInfo(char* key, char* value) - { - add_meta_info(key, value); - } - XBT_ATTRIB_DEPRECATED_v323("Please use Jedule::cleanup_output()") void cleanupOutput() { cleanup_output(); } - XBT_ATTRIB_DEPRECATED_v323("Please use Jedule::write_output()") void writeOutput(FILE* file) { write_output(file); } - private: std::unordered_map meta_info_; }; diff --git a/include/simgrid/jedule/jedule_events.hpp b/include/simgrid/jedule/jedule_events.hpp index 3e96e66646..a3d4326598 100644 --- a/include/simgrid/jedule/jedule_events.hpp +++ b/include/simgrid/jedule/jedule_events.hpp @@ -28,21 +28,6 @@ public: 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_; diff --git a/include/simgrid/jedule/jedule_platform.hpp b/include/simgrid/jedule/jedule_platform.hpp index 1c026df55d..aede587e15 100644 --- a/include/simgrid/jedule/jedule_platform.hpp +++ b/include/simgrid/jedule/jedule_platform.hpp @@ -38,29 +38,6 @@ public: std::string get_hierarchy_as_string(); void print(FILE *file); void print_resources(FILE* file); - - // deprecated - XBT_ATTRIB_DEPRECATED_v323("Please use Container::add_child()") void addChild(Container* child) { add_child(child); } - XBT_ATTRIB_DEPRECATED_v323("Please use Container::add_resources()") void addResources(std::vector hosts) - { - add_resources(hosts); - } - XBT_ATTRIB_DEPRECATED_v323("Please use Container::create_hierarchy()") void createHierarchy(sg_netzone_t from_as) - { - create_hierarchy(from_as); - } - XBT_ATTRIB_DEPRECATED_v323("Please use Container::get_hierarchy()") std::vector getHierarchy() - { - return get_hierarchy(); - } - XBT_ATTRIB_DEPRECATED_v323("Please use Container::get_hierarchy_as_string()") std::string getHierarchyAsString() - { - return get_hierarchy_as_string(); - } - XBT_ATTRIB_DEPRECATED_v323("Please use Container::print_resources()") void printResources(FILE* file) - { - print_resources(file); - } }; class XBT_PUBLIC Subset { diff --git a/include/simgrid/kernel/future.hpp b/include/simgrid/kernel/future.hpp index 374d0ee650..fea70d43f0 100644 --- a/include/simgrid/kernel/future.hpp +++ b/include/simgrid/kernel/future.hpp @@ -219,17 +219,6 @@ template void bind_promise(Promise&& promise, Future future) template Future unwrap_future(Future> future); -template -XBT_ATTRIB_DEPRECATED_v323("Please use bind_promise") void bindPromise(Promise promise, Future future) -{ - bind_promise(promise, future); -} -template -XBT_ATTRIB_DEPRECATED_v323("Please use unwrap_future") Future unwrapFuture(Future> future) -{ - unwrap_future(future); -} - /** Result of some (probably) asynchronous operation in the SimGrid kernel * * @ref simgrid::simix::Future and @ref simgrid::simix::Future provide an @@ -363,13 +352,6 @@ public: return future; } - template - XBT_ATTRIB_DEPRECATED_v323("Please use then_no_unwrap") auto thenNoUnwrap(F continuation) - -> Future - { - then_no_unwrap(continuation); - } - /** Attach a continuation to this future * * The future must be valid in order to make this call. diff --git a/include/simgrid/kernel/routing/RoutedZone.hpp b/include/simgrid/kernel/routing/RoutedZone.hpp index 2ecdbfc6cd..55995aafc6 100644 --- a/include/simgrid/kernel/routing/RoutedZone.hpp +++ b/include/simgrid/kernel/routing/RoutedZone.hpp @@ -62,25 +62,6 @@ protected: void get_route_check_params(NetPoint* src, NetPoint* dst); void add_route_check_params(NetPoint* src, NetPoint* dst, NetPoint* gw_src, NetPoint* gw_dst, std::vector& link_list, bool symmetrical); - - // deprecated - XBT_ATTRIB_DEPRECATED_v323("Please use RoutedZone::new_extended_route()") virtual RouteCreationArgs* newExtendedRoute( - RoutingMode hierarchy, NetPoint* src, NetPoint* dst, NetPoint* gw_src, NetPoint* gw_dst, - std::vector& link_list, bool symmetrical, bool change_order) - { - return new_extended_route(hierarchy, src, dst, gw_src, gw_dst, link_list, symmetrical, change_order); - } - XBT_ATTRIB_DEPRECATED_v323("Please use RoutedZone::get_route_check_params()") void getRouteCheckParams(NetPoint* src, - NetPoint* dst) - { - get_route_check_params(src, dst); - } - XBT_ATTRIB_DEPRECATED_v323("Please use RoutedZone::add_route_check_params()") void addRouteCheckParams( - NetPoint* src, NetPoint* dst, NetPoint* gw_src, NetPoint* gw_dst, std::vector& link_list, - bool symmetrical) - { - add_route_check_params(src, dst, gw_src, gw_dst, link_list, symmetrical); - } }; } // namespace routing } // namespace kernel diff --git a/include/simgrid/kernel/routing/VivaldiZone.hpp b/include/simgrid/kernel/routing/VivaldiZone.hpp index 22c14e8da5..38c89db7c1 100644 --- a/include/simgrid/kernel/routing/VivaldiZone.hpp +++ b/include/simgrid/kernel/routing/VivaldiZone.hpp @@ -50,14 +50,6 @@ public: void set_peer_link(NetPoint* netpoint, double bw_in, double bw_out, const std::string& coord); void get_local_route(NetPoint* src, NetPoint* dst, RouteCreationArgs* into, double* latency) override; - - // deprecated - XBT_ATTRIB_DEPRECATED_v323("Please use VivaldiZone::set_peer_link()") void setPeerLink(NetPoint* netpoint, - double bw_in, double bw_out, - std::string coord) - { - set_peer_link(netpoint, bw_in, bw_out, coord); - } }; namespace vivaldi { diff --git a/include/simgrid/msg.h b/include/simgrid/msg.h index d9d09d0aa7..49026aca72 100644 --- a/include/simgrid/msg.h +++ b/include/simgrid/msg.h @@ -443,8 +443,6 @@ XBT_PUBLIC int MSG_barrier_wait(msg_bar_t bar); /* ****************************************************************************************** */ /* DO NOT USE this nasty pimple (unless if you're writing a binding) */ -XBT_ATTRIB_DEPRECATED_v323("MSG_process_get_smx_ctx is deprecated. Please contact us if you need it.") - XBT_PUBLIC smx_context_t MSG_process_get_smx_ctx(msg_process_t process); XBT_ATTRIB_DEPRECATED_v325("MSG_process_set_copy_callback is deprecated. Please contact us if you need it.") XBT_PUBLIC void MSG_task_set_copy_callback(void (*callback)(msg_task_t task, msg_process_t src, msg_process_t dst)); diff --git a/include/simgrid/s4u/Activity.hpp b/include/simgrid/s4u/Activity.hpp index d478353ff1..8d123ef09e 100644 --- a/include/simgrid/s4u/Activity.hpp +++ b/include/simgrid/s4u/Activity.hpp @@ -96,17 +96,6 @@ public: #ifndef DOXYGEN XBT_ATTRIB_DEPRECATED_v324("Please use Activity::wait_for()") virtual void wait(double timeout) = 0; - XBT_ATTRIB_DEPRECATED_v323("Please use Activity::get_state()") Activity::State getState() { return state_; } - XBT_ATTRIB_DEPRECATED_v323("Please use Activity::get_remaining()") double getRemains() { return get_remaining(); } - XBT_ATTRIB_DEPRECATED_v323("Please use Activity::set_remaining()") Activity* setRemains(double remains) - { - return set_remaining(remains); - } - XBT_ATTRIB_DEPRECATED_v323("Please use Activity::set_user_data()") Activity* setUserData(void* data) - { - return set_user_data(data); - } - XBT_ATTRIB_DEPRECATED_v323("Please use Activity::get_user_data()") void* getUserData() { return user_data_; } #endif private: diff --git a/include/simgrid/s4u/Actor.hpp b/include/simgrid/s4u/Actor.hpp index e5f1878b23..a089020e60 100644 --- a/include/simgrid/s4u/Actor.hpp +++ b/include/simgrid/s4u/Actor.hpp @@ -299,98 +299,6 @@ public: const std::function& fun, void* data); XBT_ATTRIB_DEPRECATED_v325("Please use Actor::by_pid(pid).kill() instead") static void kill(aid_t pid); - - /** @deprecated See Actor::create() */ - XBT_ATTRIB_DEPRECATED_v323("Please use Actor::create()") static ActorPtr - createActor(const char* name, s4u::Host* host, const std::function& code) - { - return create(name, host, code); - } - /** @deprecated See Actor::create() */ - XBT_ATTRIB_DEPRECATED_v323("Please use Actor::create()") static ActorPtr - createActor(const char* name, s4u::Host* host, const std::function*)>& code, - std::vector* args) - { - return create(name, host, code, args); - } - /** @deprecated See Actor::create() */ - template ::type> - XBT_ATTRIB_DEPRECATED_v323("Please use Actor::create()") static ActorPtr createActor( - const char* name, s4u::Host* host, F code, Args... args) - { - return create(name, host, code, std::move(args)...); - } - /** @deprecated See Actor::create() */ - XBT_ATTRIB_DEPRECATED_v323("Please use Actor::create()") static ActorPtr createActor( - const char* name, s4u::Host* host, const char* function, std::vector args) - { - return create(name, host, function, args); - } - /** @deprecated See Actor::is_daemon() */ - XBT_ATTRIB_DEPRECATED_v323("Please use Actor::is_daemon()") bool isDaemon() const; - /** @deprecated See Actor::get_name() */ - XBT_ATTRIB_DEPRECATED_v323("Please use Actor::get_name()") const simgrid::xbt::string& getName() const - { - return get_name(); - } - /** @deprecated See Actor::get_cname() */ - XBT_ATTRIB_DEPRECATED_v323("Please use Actor::get_cname()") const char* getCname() const { return get_cname(); } - /** @deprecated See Actor::get_host() */ - XBT_ATTRIB_DEPRECATED_v323("Please use Actor::get_host()") Host* getHost() { return get_host(); } - /** @deprecated See Actor::get_pid() */ - XBT_ATTRIB_DEPRECATED_v323("Please use Actor::get_pid()") aid_t getPid() { return get_pid(); } - /** @deprecated See Actor::get_ppid() */ - XBT_ATTRIB_DEPRECATED_v323("Please use Actor::get_ppid()") aid_t getPpid() { return get_ppid(); } - /** @deprecated See Actor::is_suspended() */ - XBT_ATTRIB_DEPRECATED_v323("Please use Actor::is_suspended()") int isSuspended() { return is_suspended(); } - /** @deprecated See Actor::set_auto_restart() */ - XBT_ATTRIB_DEPRECATED_v323("Please use Actor::set_auto_restart()") void setAutoRestart(bool a) - { - set_auto_restart(a); - } - /** @deprecated Please use a std::function for first parameter */ - XBT_ATTRIB_DEPRECATED_v323("Please use a std::function for first parameter.") void on_exit( - int_f_pvoid_pvoid_t fun, void* data); - /** @deprecated See Actor::on_exit() */ - XBT_ATTRIB_DEPRECATED_v323("Please use Actor::on_exit()") void onExit(int_f_pvoid_pvoid_t fun, void* data) - { - on_exit([fun, data](bool a) { fun((void*)(uintptr_t)a, data); }); - } - /** @deprecated See Actor::set_kill_time() */ - XBT_ATTRIB_DEPRECATED_v323("Please use Actor::set_kill_time()") void setKillTime(double time) { set_kill_time(time); } - /** @deprecated See Actor::get_kill_time() */ - XBT_ATTRIB_DEPRECATED_v323("Please use Actor::get_kill_time()") double getKillTime() { return get_kill_time(); } - /** @deprecated See Actor::by_pid() */ - XBT_ATTRIB_DEPRECATED_v323("Please use Actor::by_pid()") static ActorPtr byPid(aid_t pid) { return by_pid(pid); } - /** @deprecated See Actor::kill_all() */ - XBT_ATTRIB_DEPRECATED_v323("Please use Actor::kill_all()") static void killAll() { kill_all(); } - /** @deprecated See Actor::kill_all() */ - XBT_ATTRIB_DEPRECATED_v323("Please use Actor::kill_all() with no parameter") static void killAll( - int XBT_ATTRIB_UNUSED resetPid) - { - kill_all(); - } - /** @deprecated See Actor::get_impl() */ - XBT_ATTRIB_DEPRECATED_v323("Please use Actor::get_impl()") kernel::actor::ActorImpl* getImpl() { return get_impl(); } - /** @deprecated See Actor::get_property() */ - XBT_ATTRIB_DEPRECATED_v323("Please use Actor::get_property()") const char* getProperty(const char* key) - { - return get_property(key); - } - /** @deprecated See Actor::get_properties() */ - XBT_ATTRIB_DEPRECATED_v323("Please use Actor::get_properties()") std::map* getProperties() - { - std::map* res = new std::map(); - std::unordered_map* props = get_properties(); - for (auto const& kv : *props) - res->insert(kv); - return res; - } - /** @deprecated See Actor::get_properties() */ - XBT_ATTRIB_DEPRECATED_v323("Please use Actor::set_property()") void setProperty(const char* key, const char* value) - { - set_property(key, value); - } #endif }; @@ -554,23 +462,6 @@ XBT_PUBLIC void migrate(Host* new_host); XBT_ATTRIB_DEPRECATED_v325("Please use std::function for first parameter.") XBT_PUBLIC void on_exit(const std::function& fun, void* data); -/** @deprecated Please use std::function for first parameter */ -XBT_ATTRIB_DEPRECATED_v323("Please use std::function for first parameter.") XBT_PUBLIC - void on_exit(int_f_pvoid_pvoid_t fun, void* data); -/** @deprecated See this_actor::get_name() */ -XBT_ATTRIB_DEPRECATED_v323("Please use this_actor::get_name()") XBT_PUBLIC std::string getName(); -/** @deprecated See this_actor::get_cname() */ -XBT_ATTRIB_DEPRECATED_v323("Please use this_actor::get_cname()") XBT_PUBLIC const char* getCname(); -/** @deprecated See this_actor::is_maestro() */ -XBT_ATTRIB_DEPRECATED_v323("Please use this_actor::is_maestro()") XBT_PUBLIC bool isMaestro(); -/** @deprecated See this_actor::get_pid() */ -XBT_ATTRIB_DEPRECATED_v323("Please use this_actor::get_pid()") XBT_PUBLIC aid_t getPid(); -/** @deprecated See this_actor::get_ppid() */ -XBT_ATTRIB_DEPRECATED_v323("Please use this_actor::get_ppid()") XBT_PUBLIC aid_t getPpid(); -/** @deprecated See this_actor::get_host() */ -XBT_ATTRIB_DEPRECATED_v323("Please use this_actor::get_host()") XBT_PUBLIC Host* getHost(); -/** @deprecated See this_actor::on_exit() */ -XBT_ATTRIB_DEPRECATED_v323("Please use this_actor::on_exit()") XBT_PUBLIC void onExit(int_f_pvoid_pvoid_t fun, void* data); /** @deprecated See this_actor::exit() */ XBT_ATTRIB_DEPRECATED_v324("Please use this_actor::exit()") XBT_PUBLIC void kill(); #endif diff --git a/include/simgrid/s4u/Comm.hpp b/include/simgrid/s4u/Comm.hpp index e944fabe64..ae59d154f9 100644 --- a/include/simgrid/s4u/Comm.hpp +++ b/include/simgrid/s4u/Comm.hpp @@ -123,35 +123,6 @@ public: #ifndef DOXYGEN XBT_ATTRIB_DEPRECATED_v324("Please use Comm::wait_for()") void wait(double t) override { wait_for(t); } - XBT_ATTRIB_DEPRECATED_v323("Please use Comm::set_rate()") Activity* setRate(double rate) - { - return set_rate(rate).get(); - } - XBT_ATTRIB_DEPRECATED_v323("Please use Comm::set_src_data()") Activity* setSrcData(void* buff) - { - return set_src_data(buff).get(); - } - XBT_ATTRIB_DEPRECATED_v323("Please use Comm::set_src_data()") Activity* setSrcData(void* buff, size_t size) - { - return set_src_data(buff, size).get(); - } - XBT_ATTRIB_DEPRECATED_v323("Please use Comm::set_src_data_size()") Activity* setSrcDataSize(size_t size) - { - return set_src_data_size(size).get(); - } - XBT_ATTRIB_DEPRECATED_v323("Please use Comm::set_dst_data()") Activity* setDstData(void** buff) - { - return set_dst_data(buff).get(); - } - XBT_ATTRIB_DEPRECATED_v323("Please use Comm::set_dst_data()") Activity* setDstData(void** buff, size_t size) - { - return set_dst_data(buff, size).get(); - } - XBT_ATTRIB_DEPRECATED_v323("Please use Comm::get_dst_data_size()") size_t getDstDataSize() - { - return get_dst_data_size(); - } - XBT_ATTRIB_DEPRECATED_v323("Please use Comm::get_mailbox()") Mailbox* getMailbox() { return get_mailbox(); } #endif }; } // namespace s4u diff --git a/include/simgrid/s4u/ConditionVariable.hpp b/include/simgrid/s4u/ConditionVariable.hpp index 6e6ec3122b..8e926fba92 100644 --- a/include/simgrid/s4u/ConditionVariable.hpp +++ b/include/simgrid/s4u/ConditionVariable.hpp @@ -37,15 +37,6 @@ public: static ConditionVariablePtr create(); -#ifndef DOXYGEN - /** @deprecated See Comm::get_mailbox() */ - XBT_ATTRIB_DEPRECATED_v323("Please use ConditionVariableImpl::create()") ConditionVariablePtr - createConditionVariable() - { - return create(); - } -#endif - // Wait functions without time: void wait(MutexPtr lock); diff --git a/include/simgrid/s4u/Engine.hpp b/include/simgrid/s4u/Engine.hpp index 0d4aee070e..e13aceeaf5 100644 --- a/include/simgrid/s4u/Engine.hpp +++ b/include/simgrid/s4u/Engine.hpp @@ -157,135 +157,6 @@ public: private: kernel::EngineImpl* const pimpl; static Engine* instance_; - - //////////////// Deprecated functions -#ifndef DOXYGEN -public: - /** @deprecated See Engine::load_platform() */ - XBT_ATTRIB_DEPRECATED_v323("Please use Engine::load_platform()") void loadPlatform(const std::string& platf) - { - load_platform(platf); - } - /** @deprecated See Engine::register_function() */ - XBT_ATTRIB_DEPRECATED_v323("Please use Engine::register_function()") void registerFunction(const std::string& name, - int (*code)(int, char**)) - { - register_function(name, code); - } - /** @deprecated See Engine::register_default() */ - XBT_ATTRIB_DEPRECATED_v323("Please use Engine::register_default()") void registerDefault(int (*code)(int, char**)) - { - register_default(code); - } - /** @deprecated See Engine::register_actor() */ - template - XBT_ATTRIB_DEPRECATED_v323("Please use Engine::register_actor()") void registerFunction(const std::string& name) - { - register_actor(name); - } - /** @deprecated See Engine::register_actor() */ - template - XBT_ATTRIB_DEPRECATED_v323("Please use Engine::register_actor()") void registerFunction(const std::string& name, - F code) - { - register_actor(name, code); - } - - /** @deprecated See Engine::load_deployment() */ - XBT_ATTRIB_DEPRECATED_v323("Please use Engine::load_deployment()") void loadDeployment(const std::string& deploy) - { - load_deployment(deploy); - } - /** @deprecated See Engine::host_by_name() */ - XBT_ATTRIB_DEPRECATED_v323("Please use Engine::host_by_name()") simgrid::s4u::Host* hostByName( - const std::string& name) - { - return host_by_name(name); - } - /** @deprecated See Engine::host_by_name_or_null() */ - XBT_ATTRIB_DEPRECATED_v323("Please use Engine::host_by_name_or_null()") simgrid::s4u::Host* hostByNameOrNull( - const std::string& name) - { - return host_by_name_or_null(name); - } - /** @deprecated See Engine::storage_by_name() */ - XBT_ATTRIB_DEPRECATED_v323("Please use Engine::storage_by_name()") simgrid::s4u::Storage* storageByName( - const std::string& name) - { - return storage_by_name(name); - } - /** @deprecated See Engine::storage_by_name_or_null() */ - XBT_ATTRIB_DEPRECATED_v323("Please use Engine::storage_by_name_or_null()") simgrid::s4u::Storage* storageByNameOrNull( - const std::string& name) - { - return storage_by_name_or_null(name); - } - - /** @deprecated See Engine::get_host_count() */ - XBT_ATTRIB_DEPRECATED_v323("Please use Engine::get_host_count()") size_t getHostCount() { return get_host_count(); } - /** @deprecated See Engine::get_all_hosts() */ - XBT_ATTRIB_DEPRECATED_v323("Please use Engine::get_all_hosts()") std::vector getAllHosts() - { - return get_all_hosts(); - } - /** @deprecated See Engine::get_link_count() */ - XBT_ATTRIB_DEPRECATED_v323("Please use Engine::get_link_count()") size_t getLinkCount() { return get_link_count(); } - /** @deprecated See Engine::get_link_list() */ - XBT_ATTRIB_DEPRECATED_v323("Please use Engine::get_link_list()") std::vector getAllLinks() - { - return get_all_links(); - } - /** @deprecated See Engine::get_all_storages() */ - XBT_ATTRIB_DEPRECATED_v323("Please use Engine::get_all_storages()") std::vector getAllStorages() - { - return get_all_storages(); - } - /** @deprecated See Engine::get_clock() */ - XBT_ATTRIB_DEPRECATED_v323("Please use Engine::get_clock()") static double getClock() { return get_clock(); } - /** @deprecated See Engine::get_all_netpoints() */ - XBT_ATTRIB_DEPRECATED_v323("Please use Engine::get_all_netpoints()") void getNetpointList( - std::vector* list); - /** @deprecated See Engine::netpoint_by_name_or_null() */ - XBT_ATTRIB_DEPRECATED_v323("Please use Engine::netpoint_by_name_or_null()") - simgrid::kernel::routing::NetPoint* getNetpointByNameOrNull(const std::string& name) - { - return netpoint_by_name_or_null(name); - } - /** @deprecated See Engine::get_netzone_root() */ - XBT_ATTRIB_DEPRECATED_v323("Please use Engine::get_netzone_root()") simgrid::s4u::NetZone* getNetRoot() - { - return get_netzone_root(); - } - /** @deprecated See Engine::netzone_by_name_or_null() */ - XBT_ATTRIB_DEPRECATED_v323("Please use Engine::netzone_by_name_or_null()") - simgrid::s4u::NetZone* getNetzoneByNameOrNull(const std::string& name) - { - return netzone_by_name_or_null(name); - } - /** @deprecated See Engine::filter_netzones_by_type() */ - template - XBT_ATTRIB_DEPRECATED_v323("Please use Engine::filter_netzones_by_type()") void getNetzoneByType( - std::vector* whereto) - { - get_filtered_netzones_recursive(get_netzone_root(), whereto); - } - - /** @deprecated See Engine::get_instance() */ - XBT_ATTRIB_DEPRECATED_v323("Please use Engine::get_instance()") static s4u::Engine* getInstance() - { - return get_instance(); - } - /** @deprecated See Engine::is_initialized() */ - XBT_ATTRIB_DEPRECATED_v323("Please use Engine::is_initialized()") static bool isInitialized() - { - return is_initialized(); - } - /** @deprecated See Engine::set_config() */ - XBT_ATTRIB_DEPRECATED_v323("Please use Engine::set_config()") void setConfig(const std::string& str) - { - set_config(str); - } -#endif }; /** Callback fired when the platform is created (ie, the xml file parsed), diff --git a/include/simgrid/s4u/Exec.hpp b/include/simgrid/s4u/Exec.hpp index 5164ef6223..5aed692a1c 100644 --- a/include/simgrid/s4u/Exec.hpp +++ b/include/simgrid/s4u/Exec.hpp @@ -61,11 +61,6 @@ public: ExecPtr set_timeout(double timeout); Exec* cancel() override; - XBT_ATTRIB_DEPRECATED_v323("Please use Exec::set_priority()") ExecPtr setPriority(double priority) - { - return set_priority(priority); - } - XBT_ATTRIB_DEPRECATED_v323("Please use Exec::set_bound()") ExecPtr setBound(double bound) { return set_bound(bound); } XBT_ATTRIB_DEPRECATED_v324("Please use Exec::wait_for()") void wait(double t) override { wait_for(t); } }; @@ -86,16 +81,6 @@ public: double get_remaining() override; double get_remaining_ratio() override; - -#ifndef DOXYGEN - //////////////// Deprecated functions - XBT_ATTRIB_DEPRECATED_v323("Please use Exec::set_host()") ExecPtr setHost(Host* host) { return set_host(host); } - XBT_ATTRIB_DEPRECATED_v323("Please use Exec::get_host()") Host* getHost() { return get_host(); } - XBT_ATTRIB_DEPRECATED_v323("Please use Exec::get_remaining_ratio()") double getRemainingRatio() - { - return get_remaining_ratio(); - } -#endif }; class XBT_PUBLIC ExecPar : public Exec { diff --git a/include/simgrid/s4u/Host.hpp b/include/simgrid/s4u/Host.hpp index 81a031ec9f..f15116e049 100644 --- a/include/simgrid/s4u/Host.hpp +++ b/include/simgrid/s4u/Host.hpp @@ -104,18 +104,6 @@ public: void set_state_profile(kernel::profile::Profile* p); void set_speed_profile(kernel::profile::Profile* p); -#ifndef DOXYGEN - /** @deprecated See Host::get_properties() */ - XBT_ATTRIB_DEPRECATED_v323("Please use Host::get_properties()") std::map* getProperties() - { - std::map* res = new std::map(); - std::unordered_map* props = get_properties(); - for (auto const& kv : *props) - res->insert(kv); - return res; - } -#endif - double get_speed() const; double get_available_speed() const; int get_core_count() const; @@ -128,30 +116,11 @@ public: std::vector get_attached_storages() const; -#ifndef DOXYGEN - /** @deprecated See Host::get_speed() */ - XBT_ATTRIB_DEPRECATED_v323("Please use Host::get_speed() instead.") double getSpeed() { return get_speed(); } - /** @deprecated See Host::get_pstate_speed() */ - XBT_ATTRIB_DEPRECATED_v323("Please use Host::get_pstate_speed() instead.") double getPstateSpeed(int pstate_index) - { - return get_pstate_speed(pstate_index); - } - XBT_ATTRIB_DEPRECATED_v323("Please use Host::get_attached_storages() instead.") void getAttachedStorages( - std::vector* storages); -#endif - /** Get an associative list [mount point]->[Storage] of all local mount points. * * This is defined in the platform file, and cannot be modified programatically (yet). */ std::unordered_map const& get_mounted_storages(); -#ifndef DOXYGEN - /** @deprecated See Host::get_mounted_storages() */ - XBT_ATTRIB_DEPRECATED_v323("Please use Host::get_mounted_storages() instead.") std::unordered_map const& getMountedStorages() - { - return get_mounted_storages(); - } -#endif void route_to(Host* dest, std::vector& links, double* latency); void route_to(Host* dest, std::vector& links, double* latency); @@ -168,63 +137,6 @@ public: /** Block the calling actor on an execution located on the called host (with explicit priority) */ void execute(double flops, double priority); - // Deprecated functions -#ifndef DOXYGEN - /** @deprecated See Host::get_name() */ - XBT_ATTRIB_DEPRECATED_v323("Please use Host::get_name()") simgrid::xbt::string const& getName() const - { - return name_; - } - /** @deprecated See Host::get_cname() */ - XBT_ATTRIB_DEPRECATED_v323("Please use Host::get_cname()") const char* getCname() const { return name_.c_str(); } - /** @deprecated See Host::get_all_actors() */ - XBT_ATTRIB_DEPRECATED_v323("Please use Host::get_all_actors()") void actorList(std::vector* whereto); - /** @deprecated See Host::get_all_actors() */ - XBT_ATTRIB_DEPRECATED_v323("Please use Host::get_all_actors()") void getProcesses(std::vector* list); - /** @deprecated See Host::turn_on() */ - XBT_ATTRIB_DEPRECATED_v323("Please use Host::turn_on()") void turnOn() { turn_on(); } - /** @deprecated See Host::turn_off() */ - XBT_ATTRIB_DEPRECATED_v323("Please use Host::turn_off()") void turnOff() { turn_off(); } - /** @deprecated See Host::is_on() */ - XBT_ATTRIB_DEPRECATED_v323("Please use Host::is_on()") bool isOn() { return is_on(); } - /** @deprecated See Host::is_off() */ - XBT_ATTRIB_DEPRECATED_v323("Please use Host::is_off()") bool isOff() { return not is_on(); } - /** @deprecated See Host::get_property() */ - XBT_ATTRIB_DEPRECATED_v323("Please use Host::get_property()") const char* getProperty(const char* key) - { - return get_property(key); - } - /** @deprecated See Host::set_property() */ - XBT_ATTRIB_DEPRECATED_v323("Please use Host::set_property()") void setProperty(const std::string& key, - const std::string& value) - { - set_property(key, value); - } - /** @deprecated See Host::set_pstate() */ - XBT_ATTRIB_DEPRECATED_v323("Please use Host::set_pstate()") void setPstate(int idx) { set_pstate(idx); } - /** @deprecated See Host::get_pstate() */ - XBT_ATTRIB_DEPRECATED_v323("Please use Host::get_pstate()") int getPstate() { return get_pstate(); } - /** @deprecated See Host::route_to() */ - XBT_ATTRIB_DEPRECATED_v323("Please use Host::route_to()") void routeTo(Host* dest, std::vector& links, - double* latency) - { - route_to(dest, links, latency); - } - /** @deprecated See Host::route_to() */ - XBT_ATTRIB_DEPRECATED_v323("Please use Host::route_to()") void routeTo( - Host* dest, std::vector& links, double* latency) - { - route_to(dest, links, latency); - } - /** @deprecated See Host::get_core_count() */ - XBT_ATTRIB_DEPRECATED_v323("Please use Host::get_core_count()") int getCoreCount() { return get_core_count(); } - /** @deprecated See Host::get_pstate_count() */ - XBT_ATTRIB_DEPRECATED_v323("Please use Host::get_pstate_count()") int getPstatesCount() const - { - return get_pstate_count(); - } -#endif /* !DOXYGEN */ - private: xbt::string name_{"noname"}; std::unordered_map* mounts_ = nullptr; // caching diff --git a/include/simgrid/s4u/Link.hpp b/include/simgrid/s4u/Link.hpp index 8a9c7235d6..4a1189db43 100644 --- a/include/simgrid/s4u/Link.hpp +++ b/include/simgrid/s4u/Link.hpp @@ -115,64 +115,6 @@ public: /** @brief Callback signal fired when a communication changes it state (ready/done/cancel) */ static xbt::signal on_communication_state_change; - -#ifndef DOXYGEN - // Deprecated methods - /** @deprecated */ - XBT_ATTRIB_DEPRECATED_v323("Please use Link::by_name()") static Link* byName(const char* name) { return by_name(name); } - /** @deprecated */ - XBT_ATTRIB_DEPRECATED_v323("Please use Link::get_name()") const std::string& getName() const { return get_name(); } - /** @deprecated */ - XBT_ATTRIB_DEPRECATED_v323("Please use Link::get_cname()") const char* getCname() const { return get_cname(); } - /** @deprecated */ - XBT_ATTRIB_DEPRECATED_v323("Please use Link::get_sharing_policy()") SharingPolicy sharingPolicy() {return get_sharing_policy();} - /** @deprecated */ - XBT_ATTRIB_DEPRECATED_v323("Please use Link::get_usage()") double getUsage() {return get_usage();} - /** @deprecated */ - XBT_ATTRIB_DEPRECATED_v323("Please use Link::is_used()") bool isUsed() {return is_used();} - /** @deprecated */ - XBT_ATTRIB_DEPRECATED_v323("Please use Link::get_bandwidth()") double bandwidth() {return get_bandwidth();} - /** @deprecated */ - XBT_ATTRIB_DEPRECATED_v323("Please use Link::get_latency()") double latency() {return get_latency();} - - /** @deprecated */ - XBT_ATTRIB_DEPRECATED_v323("Please use Link::turn_on()") void turnOn() {turn_on();} - /** @deprecated */ - XBT_ATTRIB_DEPRECATED_v323("Please use Link::turn_off()") void turnOff() {turn_off();} - - /** @deprecated */ - XBT_ATTRIB_DEPRECATED_v323("Please use Link::get_property()") const char* getProperty(const char* key) {return get_property(key);} - /** @deprecated */ - XBT_ATTRIB_DEPRECATED_v323("Please use Link::set_property()") void setProperty(const std::string& key, - const std::string& value) - { - set_property(key, value); - } - - /** @deprecated */ - XBT_ATTRIB_DEPRECATED_v323("Please use Link::get_data()") void* getData() {return get_data();} - /** @deprecated */ - XBT_ATTRIB_DEPRECATED_v323("Please use Link::set_data()") void setData(void* d) {set_data(d);} - - /** @deprecated */ - XBT_ATTRIB_DEPRECATED_v323("Please use Link::get_state_profile()") void setStateTrace( - kernel::profile::Profile* profile) - { - set_state_profile(profile); - } - /** @deprecated */ - XBT_ATTRIB_DEPRECATED_v323("Please use Link::get_bandwidth_profile()") void setBandwidthTrace( - kernel::profile::Profile* profile) - { - set_bandwidth_profile(profile); - } - /** @deprecated */ - XBT_ATTRIB_DEPRECATED_v323("Please use Link::get_latency_profile()") void setLatencyTrace( - kernel::profile::Profile* profile) - { - set_latency_profile(profile); - } -#endif }; } // namespace s4u } // namespace simgrid diff --git a/include/simgrid/s4u/Mailbox.hpp b/include/simgrid/s4u/Mailbox.hpp index 2ce888a260..069618a9df 100644 --- a/include/simgrid/s4u/Mailbox.hpp +++ b/include/simgrid/s4u/Mailbox.hpp @@ -93,36 +93,6 @@ public: void* get(); // FIXME: make a typed template version /** Blocking data reception with timeout */ void* get(double timeout); - - // Deprecated functions -#ifndef DOXYGEN - /** @deprecated Mailbox::set_receiver() */ - XBT_ATTRIB_DEPRECATED_v323("Please use Mailbox::set_receiver()") void setReceiver(ActorPtr actor) - { - set_receiver(actor); - } - /** @deprecated Mailbox::get_receiver() */ - XBT_ATTRIB_DEPRECATED_v323("Please use Mailbox::get_receiver()") ActorPtr getReceiver() { return get_receiver(); } - /** @deprecated Mailbox::get_name() */ - XBT_ATTRIB_DEPRECATED_v323("Please use Mailbox::get_name()") const xbt::string& getName() const { return get_name(); } - /** @deprecated Mailbox::get_cname() */ - XBT_ATTRIB_DEPRECATED_v323("Please use Mailbox::get_cname()") const char* getCname() const { return get_cname(); } - /** @deprecated Mailbox::get_impl() */ - XBT_ATTRIB_DEPRECATED_v323("Please use Mailbox::get_impl()") kernel::activity::MailboxImpl* getImpl() - { - return get_impl(); - } - /** @deprecated Mailbox::by_name() */ - XBT_ATTRIB_DEPRECATED_v323("Please use Mailbox::by_name()") static Mailbox* byName(const char* name) - { - return by_name(name); - } - /** @deprecated Mailbox::by_name() */ - XBT_ATTRIB_DEPRECATED_v323("Please use Mailbox::by_name()") static Mailbox* byName(const std::string& name) - { - return by_name(name); - } -#endif }; } // namespace s4u diff --git a/include/simgrid/s4u/Mutex.hpp b/include/simgrid/s4u/Mutex.hpp index 81b167c962..bf39701d09 100644 --- a/include/simgrid/s4u/Mutex.hpp +++ b/include/simgrid/s4u/Mutex.hpp @@ -49,12 +49,6 @@ public: void lock(); void unlock(); bool try_lock(); - -#ifndef DOXYGEN - // deprecated - /** @deprecated Mutex::create() */ - XBT_ATTRIB_DEPRECATED_v323("Please use Mutex::create()") static MutexPtr createMutex() { return create(); } -#endif }; } // namespace s4u diff --git a/include/simgrid/s4u/NetZone.hpp b/include/simgrid/s4u/NetZone.hpp index 815b176f63..0ba5c13e77 100644 --- a/include/simgrid/s4u/NetZone.hpp +++ b/include/simgrid/s4u/NetZone.hpp @@ -73,65 +73,6 @@ public: on_route_creation; static xbt::signal on_creation; static xbt::signal on_seal; - -#ifndef DOXYGEN - // Deprecation wrappers - /** @deprecated NetZone::get_father() */ - XBT_ATTRIB_DEPRECATED_v323("Please use NetZone::get_father()") NetZone* getFather() { return get_father(); } - /** @deprecated NetZone::get_name() */ - XBT_ATTRIB_DEPRECATED_v323("Please use NetZone::get_name()") const std::string& getName() const { return get_name(); } - /** @deprecated NetZone::get_cname() */ - XBT_ATTRIB_DEPRECATED_v323("Please use NetZone::get_cname()") const char* getCname() const { return get_cname(); } - /** @deprecated NetZone::add_route() */ - XBT_ATTRIB_DEPRECATED_v323("Please use NetZone::add_route()") void addRoute( - kernel::routing::NetPoint* src, kernel::routing::NetPoint* dst, kernel::routing::NetPoint* gw_src, - kernel::routing::NetPoint* gw_dst, std::vector& link_list, bool symmetrical) - { - add_route(src, dst, gw_src, gw_dst, link_list, symmetrical); - } - /** @deprecated NetZone::add_bypass_route() */ - XBT_ATTRIB_DEPRECATED_v323("Please use NetZone::add_bypass_route()") void addBypassRoute( - kernel::routing::NetPoint* src, kernel::routing::NetPoint* dst, kernel::routing::NetPoint* gw_src, - kernel::routing::NetPoint* gw_dst, std::vector& link_list, bool symmetrical) - { - add_bypass_route(src, dst, gw_src, gw_dst, link_list, symmetrical); - } - /** @deprecated NetZone::get_properties() */ - XBT_ATTRIB_DEPRECATED_v323("Please use NetZone::get_properties()") std::unordered_map* getProperties() - { - return get_properties(); - } - /** @deprecated NetZone::get_property() */ - XBT_ATTRIB_DEPRECATED_v323("Please use NetZone::get_property()") const char* getProperty(const char* key) - { - return get_property(key); - } - /** @deprecated NetZone::set_property() */ - XBT_ATTRIB_DEPRECATED_v323("Please use NetZone::set_property()") void setProperty(const char* key, const char* value) - { - set_property(key, value); - } - /** @deprecated NetZone::add_component() */ - XBT_ATTRIB_DEPRECATED_v323("Please use NetZone::add_component()") int addComponent(kernel::routing::NetPoint* elm) - { - return add_component(elm); - } - /** @deprecated NetZone::get_vertices() */ - XBT_ATTRIB_DEPRECATED_v323("Please use NetZone::get_vertices()") std::vector getVertices(); - /** @deprecated NetZone::get_host_count() */ - XBT_ATTRIB_DEPRECATED_v323("Please use NetZone::get_host_count()") int getHostCount() { return get_host_count(); } - /** @deprecated NetZone::get_all_hosts() */ - XBT_ATTRIB_DEPRECATED_v323("Please use NetZone::get_all_hosts()") void getHosts( - std::vector* whereto); // retrieve my content as a vector of hosts - /** @deprecated NetZone::get_children() */ - XBT_ATTRIB_DEPRECATED_v323("Please use NetZone::get_children()") std::vector* getChildren() - { - std::vector* res = new std::vector(); - for (auto child : get_children()) - res->push_back(child); - return res; - } -#endif }; } // namespace s4u diff --git a/include/simgrid/s4u/Storage.hpp b/include/simgrid/s4u/Storage.hpp index 1b5107b88a..dce77c584b 100644 --- a/include/simgrid/s4u/Storage.hpp +++ b/include/simgrid/s4u/Storage.hpp @@ -72,47 +72,6 @@ public: sg_size_t write(sg_size_t size); kernel::resource::StorageImpl* get_impl() { return pimpl_; } - // Deprecated functions -#ifndef DOXYGEN - /** @deprecated Storage::by_name() */ - XBT_ATTRIB_DEPRECATED_v323("Please use Storage::by_name()") Storage* byName(const std::string& name) - { - return by_name(name); - } - /** @deprecated Storage::get_name() */ - XBT_ATTRIB_DEPRECATED_v323("Please use Storage::get_name()") std::string const& getName() const { return get_name(); } - /** @deprecated Storage::get_cname() */ - XBT_ATTRIB_DEPRECATED_v323("Please use Storage::get_cname()") const char* getCname() const { return get_cname(); } - /** @deprecated Storage::get_type() */ - XBT_ATTRIB_DEPRECATED_v323("Please use Storage::get_type()") const char* getType() { return get_type(); } - /** @deprecated Storage::get_host() */ - XBT_ATTRIB_DEPRECATED_v323("Please use Storage::get_host()") Host* getHost() { return get_host(); } - /** @deprecated Storage::get_properties() */ - XBT_ATTRIB_DEPRECATED_v323("Please use Storage::get_properties()") std::map* getProperties() - { - std::map* res = new std::map(); - std::unordered_map* props = get_properties(); - for (auto const& kv : *props) - res->insert(kv); - return res; - } - /** @deprecated Storage::get_property() */ - XBT_ATTRIB_DEPRECATED_v323("Please use Storage::get_property()") const char* getProperty(const char* key) - { - return get_property(key); - } - /** @deprecated Storage::set_property() */ - XBT_ATTRIB_DEPRECATED_v323("Please use Storage::set_property()") void setProperty(const std::string& key, - const std::string& value) - { - set_property(key, value); - } - /** @deprecated Storage::set_data() */ - XBT_ATTRIB_DEPRECATED_v323("Please use Storage::set_data()") void setUserdata(void* data) { set_data(data); } - /** @deprecated Storage::get_data() */ - XBT_ATTRIB_DEPRECATED_v323("Please use Storage::get_data()") void* getUserdata() { return get_data(); } -#endif - private: Host* attached_to_ = nullptr; kernel::resource::StorageImpl* const pimpl_; diff --git a/include/simgrid/s4u/VirtualMachine.hpp b/include/simgrid/s4u/VirtualMachine.hpp index 4dd134d760..1e5e5f34c2 100644 --- a/include/simgrid/s4u/VirtualMachine.hpp +++ b/include/simgrid/s4u/VirtualMachine.hpp @@ -59,33 +59,6 @@ public: static xbt::signal on_resume; static xbt::signal on_migration_start; static xbt::signal on_migration_end; - -#ifndef DOXYGEN - // Deprecated methods - /** @deprecated See VirtualMachine::get_state() */ - XBT_ATTRIB_DEPRECATED_v323("Please use VirtualMachine::get_state()") VirtualMachine::state getState() - { - return get_state(); - } - /** @deprecated See VirtualMachine::get_impl() */ - XBT_ATTRIB_DEPRECATED_v323("Please use VirtualMachine::get_impl()") vm::VirtualMachineImpl* getImpl() - { - return pimpl_vm_; - } - /** @deprecated See VirtualMachine::get_pm() */ - XBT_ATTRIB_DEPRECATED_v323("Please use VirtualMachine::get_pm()") Host* getPm() { return get_pm(); } - /** @deprecated See VirtualMachine::set_pm() */ - XBT_ATTRIB_DEPRECATED_v323("Please use VirtualMachine::set_pm()") void setPm(Host* pm) { set_pm(pm); } - /** @deprecated See VirtualMachine::get_ramsize() */ - XBT_ATTRIB_DEPRECATED_v323("Please use VirtualMachine::get_ramsize()") size_t getRamsize() { return get_ramsize(); } - /** @deprecated See VirtualMachine::set_ramsize() */ - XBT_ATTRIB_DEPRECATED_v323("Please use VirtualMachine::set_ramsize()") void setRamsize(size_t ramsize) - { - set_ramsize(ramsize); - } - /** @deprecated See VirtualMachine::set_bound() */ - XBT_ATTRIB_DEPRECATED_v323("Please use VirtualMachine::set_bound()") void setBound(double bound) { set_bound(bound); } -#endif }; } // namespace s4u } // namespace simgrid diff --git a/include/simgrid/simix/blocking_simcall.hpp b/include/simgrid/simix/blocking_simcall.hpp index 2e1cac1f81..0a927ce6eb 100644 --- a/include/simgrid/simix/blocking_simcall.hpp +++ b/include/simgrid/simix/blocking_simcall.hpp @@ -69,11 +69,6 @@ template auto kernel_sync(F code) -> decltype(code().get()) }); return result.get(); } -template -XBT_ATTRIB_DEPRECATED_v323("Please use simix::kernel_sync()") auto kernelSync(F code) -> decltype(code().get()) -{ - return kernel_sync(code); -} /** A blocking (`wait()`-based) future for SIMIX processes */ // TODO, .wait_for() @@ -159,11 +154,6 @@ template auto kernel_async(F code) -> Future // Wrap the kernel future in a actor future: return simgrid::simix::Future(std::move(future)); } -template -XBT_ATTRIB_DEPRECATED_v323("Please use simix::kernel_sync()") auto kernelAsync(F code) -> Future -{ - return kernel_async(code); -} } } diff --git a/include/xbt/base.h b/include/xbt/base.h index d34b992fd6..7ebedbeff3 100644 --- a/include/xbt/base.h +++ b/include/xbt/base.h @@ -71,8 +71,6 @@ #define XBT_ATTRIB_DEPRECATED(mesg) __attribute__((deprecated(mesg))) #endif -#define XBT_ATTRIB_DEPRECATED_v323(mesg) \ - XBT_ATTRIB_DEPRECATED(mesg " (this compatibility wrapper will be dropped in v3.23)") /* Will be dropped in v3.23 */ #define XBT_ATTRIB_DEPRECATED_v324(mesg) \ XBT_ATTRIB_DEPRECATED(mesg " (this compatibility wrapper will be dropped in v3.24)") /* Will be dropped in v3.24 */ #define XBT_ATTRIB_DEPRECATED_v325(mesg) \ diff --git a/include/xbt/config.h b/include/xbt/config.h index c3b7ea84ad..e7c566ac87 100644 --- a/include/xbt/config.h +++ b/include/xbt/config.h @@ -63,9 +63,6 @@ typedef void* xbt_cfg_t; SG_BEGIN_DECL() -XBT_ATTRIB_DEPRECATED_v323("Please use simgrid::config::set_parse") XBT_PUBLIC - void xbt_cfg_set_parse(const char* options); - /* Set the value of the cell @a name in @a cfg with the provided value.*/ XBT_ATTRIB_DEPRECATED_v325("Please use simgrid::config::set_value") XBT_PUBLIC void xbt_cfg_set_int(const char* name, int val); @@ -75,25 +72,6 @@ XBT_ATTRIB_DEPRECATED_v325("Please use simgrid::config::set_value") XBT_PU void xbt_cfg_set_boolean(const char* name, const char* val); XBT_ATTRIB_DEPRECATED_v325("Please use simgrid::config::set_value") XBT_PUBLIC void xbt_cfg_set_string(const char* name, const char* val); -XBT_ATTRIB_DEPRECATED_v323("Please use simgrid::config::set_as_string") XBT_PUBLIC - void xbt_cfg_set_as_string(const char* name, const char* val); - -/* - Set the default value of the cell @a name in @a cfg with the provided value. - If it was already set to something (possibly from the command line), do nothing. - */ -XBT_ATTRIB_DEPRECATED_v323("Please use simgrid::config::set_default") XBT_PUBLIC - void xbt_cfg_setdefault_int(const char* name, int val); -XBT_ATTRIB_DEPRECATED_v323("Please use simgrid::config::set_default") XBT_PUBLIC - void xbt_cfg_setdefault_double(const char* name, double val); -XBT_ATTRIB_DEPRECATED_v323("Please use simgrid::config::set_default") XBT_PUBLIC - void xbt_cfg_setdefault_boolean(const char* name, const char* val); -XBT_ATTRIB_DEPRECATED_v323("Please use simgrid::config::set_default") XBT_PUBLIC - void xbt_cfg_setdefault_string(const char* name, const char* val); - -/** @brief Return if configuration is set by default*/ -XBT_ATTRIB_DEPRECATED_v323("Please use simgrid::config::is_default") XBT_PUBLIC - int xbt_cfg_is_default_value(const char* name); /* @} */ @@ -106,35 +84,8 @@ XBT_ATTRIB_DEPRECATED_v323("Please use simgrid::config::is_default") XBT_PUBLIC /** @brief Callback types. They get the name of the modified entry, and the position of the changed value */ typedef void (*xbt_cfg_cb_t)(const char* name); -XBT_ATTRIB_DEPRECATED_v323("Please don't use it") XBT_PUBLIC xbt_cfg_t xbt_cfg_new(); -XBT_ATTRIB_DEPRECATED_v323("Please don't use it") XBT_PUBLIC void xbt_cfg_free(xbt_cfg_t* cfg); -XBT_ATTRIB_DEPRECATED_v323("Please don't use it") XBT_PUBLIC - void xbt_cfg_dump(const char* name, const char* indent, xbt_cfg_t cfg); - /** @} */ -/** @defgroup XBT_cfg_register Registering stuff - * @ingroup XBT_config - * - * This how to add new variables to an existing configuration set. Use it to make your code configurable. - * - * @{ - */ -XBT_ATTRIB_DEPRECATED_v323("Please use simgrid::config::declare_flag") XBT_PUBLIC - void xbt_cfg_register_double(const char* name, double default_val, xbt_cfg_cb_t cb_set, const char* desc); -XBT_ATTRIB_DEPRECATED_v323("Please use simgrid::config::declare_flag") XBT_PUBLIC - void xbt_cfg_register_int(const char* name, int default_val, xbt_cfg_cb_t cb_set, const char* desc); -XBT_ATTRIB_DEPRECATED_v323("Please use simgrid::config::declare_flag") XBT_PUBLIC - void xbt_cfg_register_string(const char* name, const char* default_val, xbt_cfg_cb_t cb_set, const char* desc); -XBT_ATTRIB_DEPRECATED_v323("Please use simgrid::config::declare_flag") XBT_PUBLIC - void xbt_cfg_register_boolean(const char* name, const char* default_val, xbt_cfg_cb_t cb_set, const char* desc); -XBT_ATTRIB_DEPRECATED_v323("Please use simgrid::config::alias") XBT_PUBLIC - void xbt_cfg_register_alias(const char* newname, const char* oldname); - -XBT_ATTRIB_DEPRECATED_v323("Please use simgrid::config::show_aliases") XBT_PUBLIC void xbt_cfg_aliases(); -XBT_ATTRIB_DEPRECATED_v323("Please use simgrid::config::help") XBT_PUBLIC void xbt_cfg_help(); - -/* @} */ /** @defgroup XBT_cfg_get Getting the stored values * @ingroup XBT_config * diff --git a/include/xbt/config.hpp b/include/xbt/config.hpp index b6f60f00f6..a0406db96d 100644 --- a/include/xbt/config.hpp +++ b/include/xbt/config.hpp @@ -307,7 +307,5 @@ XBT_PUBLIC void show_aliases(); XBT_PUBLIC void help(); } } -XBT_ATTRIB_DEPRECATED_v323("Please use simgrid::config::get_value") XBT_PUBLIC std::string - xbt_cfg_get_string(const char* name); #endif diff --git a/include/xbt/functional.hpp b/include/xbt/functional.hpp index 9ca66f816e..386830b637 100644 --- a/include/xbt/functional.hpp +++ b/include/xbt/functional.hpp @@ -281,15 +281,6 @@ template auto make_task(F code, Args... args) -> Task(std::move(task)); } -// Deprecated -template -XBT_ATTRIB_DEPRECATED_v323("Please use make_task()") auto makeTask(F code, Args... args) - -> Task -{ - TaskImpl task(std::move(code), std::make_tuple(std::move(args)...)); - return Task(std::move(task)); -} - } // namespace xbt } // namespace simgrid #endif diff --git a/include/xbt/future.hpp b/include/xbt/future.hpp index 8422e5fb74..95ab69d666 100644 --- a/include/xbt/future.hpp +++ b/include/xbt/future.hpp @@ -125,17 +125,6 @@ template auto fulfill_promise(R& promise, F&& code) -> declty promise.set_exception(std::current_exception()); } } -template -XBT_ATTRIB_DEPRECATED_v323("Please use xbt::fulfill_promise()") auto fulfillPromise(R& promise, F&& code) - -> decltype(promise.set_value(code())) -{ - try { - promise.set_value(std::forward(code)()); - } - catch(...) { - promise.set_exception(std::current_exception()); - } -} template auto fulfill_promise(P& promise, F&& code) -> decltype(promise.set_value()) { @@ -146,18 +135,6 @@ template auto fulfill_promise(P& promise, F&& code) -> declty promise.set_exception(std::current_exception()); } } -template -XBT_ATTRIB_DEPRECATED_v323("Please use xbt::fulfill_promise()") auto fulfillPromise(P& promise, F&& code) - -> decltype(promise.set_value()) -{ - try { - std::forward(code)(); - promise.set_value(); - } - catch(...) { - promise.set_exception(std::current_exception()); - } -} /** Set a promise/result from a future/result * diff --git a/include/xbt/log.hpp b/include/xbt/log.hpp index d1d9f042fe..3f74fb55b3 100644 --- a/include/xbt/log.hpp +++ b/include/xbt/log.hpp @@ -19,9 +19,5 @@ namespace xbt { XBT_PUBLIC void log_exception(e_xbt_log_priority_t priority, const char* context, std::exception const& exception); XBT_PUBLIC void install_exception_handler(); - -// deprecated -XBT_ATTRIB_DEPRECATED_v323("xbt::log_exception()") XBT_PUBLIC void logException(e_xbt_log_priority_t priority, const char* context, std::exception const& exception); -XBT_ATTRIB_DEPRECATED_v323("xbt::install_exception_handler()") XBT_PUBLIC void installExceptionHandler(); } } diff --git a/include/xbt/signal.hpp b/include/xbt/signal.hpp index c81b95bcbb..2900ad45a7 100644 --- a/include/xbt/signal.hpp +++ b/include/xbt/signal.hpp @@ -39,9 +39,6 @@ namespace xbt { } void disconnect_slots() { handlers_.clear(); } int get_slot_count() { return handlers_.size(); } - // deprecated - XBT_ATTRIB_DEPRECATED_v323("Please use xbt::disconnect_slots)") void disconnectSlots() { disconnect_slots(); } - XBT_ATTRIB_DEPRECATED_v323("Please use xbt::get_slot_count)") int getSlotsAmount() { return get_slot_count(); } }; } diff --git a/src/msg/msg_process.cpp b/src/msg/msg_process.cpp index 1d6bb196ef..a3fcc834a0 100644 --- a/src/msg/msg_process.cpp +++ b/src/msg/msg_process.cpp @@ -201,9 +201,6 @@ msg_process_t MSG_process_self() return SIMIX_process_self()->ciface(); } -smx_context_t MSG_process_get_smx_ctx(msg_process_t process) { // deprecated -- smx_context_t should die afterward - return process->get_impl()->context_.get(); -} /** @brief Add a function to the list of "on_exit" functions for the current process. * The on_exit functions are the functions executed when your process is killed. * You should use them to free the data used by your process. diff --git a/src/s4u/s4u_Actor.cpp b/src/s4u/s4u_Actor.cpp index 6e49f993a6..91709314d5 100644 --- a/src/s4u/s4u_Actor.cpp +++ b/src/s4u/s4u_Actor.cpp @@ -101,14 +101,6 @@ void Actor::set_auto_restart(bool autorestart) }); } -void Actor::on_exit(int_f_pvoid_pvoid_t fun, void* data) /* deprecated */ -{ - on_exit([fun, data](bool failed) { - intptr_t status = failed ? SMX_EXIT_FAILURE : SMX_EXIT_SUCCESS; - fun(reinterpret_cast(status), data); - }); -} - void Actor::on_exit(const std::function& fun, void* data) /* deprecated */ { on_exit([fun, data](bool failed) { fun(failed ? SMX_EXIT_FAILURE : SMX_EXIT_SUCCESS, data); }); @@ -450,38 +442,6 @@ void migrate(Host* new_host) SIMIX_process_self()->iface()->migrate(new_host); } -std::string getName() /* deprecated */ -{ - return get_name(); -} -const char* getCname() /* deprecated */ -{ - return get_cname(); -} -bool isMaestro() /* deprecated */ -{ - return is_maestro(); -} -aid_t getPid() /* deprecated */ -{ - return get_pid(); -} -aid_t getPpid() /* deprecated */ -{ - return get_ppid(); -} -Host* getHost() /* deprecated */ -{ - return get_host(); -} -void on_exit(int_f_pvoid_pvoid_t fun, void* data) /* deprecated */ -{ - SIMIX_process_self()->iface()->on_exit([fun, data](int a) { fun((void*)(intptr_t)a, data); }); -} -void onExit(int_f_pvoid_pvoid_t fun, void* data) /* deprecated */ -{ - on_exit([fun, data](int a) { fun((void*)(intptr_t)a, data); }); -} void kill() /* deprecated */ { exit(); diff --git a/src/s4u/s4u_Engine.cpp b/src/s4u/s4u_Engine.cpp index 141c98130f..70e3043502 100644 --- a/src/s4u/s4u_Engine.cpp +++ b/src/s4u/s4u_Engine.cpp @@ -340,12 +340,6 @@ kernel::routing::NetPoint* Engine::netpoint_by_name_or_null(const std::string& n return netp == pimpl->netpoints_.end() ? nullptr : netp->second; } -/** @brief Fill the provided vector with all existing netpoints */ -void Engine::getNetpointList(std::vector* list) -{ - for (auto const& kv : pimpl->netpoints_) - list->push_back(kv.second); -} std::vector Engine::get_all_netpoints() { std::vector res; diff --git a/src/s4u/s4u_Host.cpp b/src/s4u/s4u_Host.cpp index b2731c416e..85ea7a3f0b 100644 --- a/src/s4u/s4u_Host.cpp +++ b/src/s4u/s4u_Host.cpp @@ -132,22 +132,6 @@ int Host::get_actor_count() return pimpl_->get_actor_count(); } -/** @deprecated */ -void Host::getProcesses(std::vector* list) -{ - auto actors = get_all_actors(); - for (auto& actor : actors) - list->push_back(actor); -} - -/** @deprecated */ -void Host::actorList(std::vector* whereto) -{ - auto actors = get_all_actors(); - for (auto& actor : actors) - whereto->push_back(actor); -} - /** * @brief Find a route toward another host * @@ -283,13 +267,6 @@ std::vector Host::get_attached_storages() const return simix::simcall([this] { return this->pimpl_->get_attached_storages(); }); } -void Host::getAttachedStorages(std::vector* storages) -{ - std::vector local_storages = simix::simcall([this] { return this->pimpl_->get_attached_storages(); }); - for (auto elm : local_storages) - storages->push_back(elm); -} - std::unordered_map const& Host::get_mounted_storages() { if (mounts_ == nullptr) { diff --git a/src/s4u/s4u_Netzone.cpp b/src/s4u/s4u_Netzone.cpp index cb45e8ea74..a0393554d1 100644 --- a/src/s4u/s4u_Netzone.cpp +++ b/src/s4u/s4u_Netzone.cpp @@ -74,15 +74,6 @@ std::vector NetZone::get_all_hosts() return pimpl_->get_all_hosts(); } -void NetZone::getHosts(std::vector* whereto) -{ - for (auto const& card : pimpl_->get_vertices()) { - Host* host = Host::by_name_or_null(card->get_name()); - if (host != nullptr) - whereto->push_back(host); - } -} - int NetZone::get_host_count() { return pimpl_->get_host_count(); @@ -105,10 +96,6 @@ void NetZone::add_bypass_route(kernel::routing::NetPoint* src, kernel::routing:: { pimpl_->add_bypass_route(src, dst, gw_src, gw_dst, link_list, symmetrical); } -std::vector NetZone::getVertices() -{ - return pimpl_->get_vertices(); -} } // namespace s4u } // namespace simgrid diff --git a/src/xbt/config.cpp b/src/xbt/config.cpp index 762a5ec4d1..7fbc10f6e1 100644 --- a/src/xbt/config.cpp +++ b/src/xbt/config.cpp @@ -495,133 +495,8 @@ void help() } } -// ***** C bindings ***** - -xbt_cfg_t xbt_cfg_new() -{ - return new simgrid::config::Config(); -} -void xbt_cfg_free(xbt_cfg_t * cfg) { delete *cfg; } - -void xbt_cfg_dump(const char *name, const char *indent, xbt_cfg_t cfg) -{ - cfg->dump(name, indent); -} - -/*----[ Registering stuff ]-----------------------------------------------*/ - -void xbt_cfg_register_double(const char *name, double default_value, - xbt_cfg_cb_t cb_set, const char *desc) -{ - if (simgrid_config == nullptr) - simgrid_config = new simgrid::config::Config(); - simgrid_config->register_option(name, desc, default_value, cb_set); -} - -void xbt_cfg_register_int(const char *name, int default_value,xbt_cfg_cb_t cb_set, const char *desc) -{ - if (simgrid_config == nullptr) - simgrid_config = new simgrid::config::Config(); - simgrid_config->register_option(name, desc, default_value, cb_set); -} - -void xbt_cfg_register_string(const char *name, const char *default_value, xbt_cfg_cb_t cb_set, const char *desc) -{ - if (simgrid_config == nullptr) - simgrid_config = new simgrid::config::Config(); - simgrid_config->register_option(name, desc, default_value ? default_value : "", cb_set); -} - -void xbt_cfg_register_boolean(const char *name, const char*default_value,xbt_cfg_cb_t cb_set, const char *desc) -{ - if (simgrid_config == nullptr) - simgrid_config = new simgrid::config::Config(); - simgrid_config->register_option(name, desc, simgrid::config::parse_bool(default_value), cb_set); -} - -void xbt_cfg_register_alias(const char *realname, const char *aliasname) -{ - if (simgrid_config == nullptr) - simgrid_config = new simgrid::config::Config(); - simgrid_config->alias(realname, aliasname); -} - -void xbt_cfg_aliases() -{ - simgrid_config->show_aliases(); -} -void xbt_cfg_help() -{ - simgrid_config->help(); -} - /*----[ Setting ]---------------------------------------------------------*/ -/** @brief Add values parsed from a string into a config set - * - * @param options a string containing the content to add to the config set. This is a '\\t',' ' or '\\n' or ',' - * separated list of variables. Each individual variable is like "[name]:[value]" where [name] is the name of an - * already registered variable, and [value] conforms to the data type under which this variable was registered. - * - * @todo This is a crude manual parser, it should be a proper lexer. - */ -void xbt_cfg_set_parse(const char *options) -{ - if (options && strlen(options) > 0) - simgrid::config::set_parse(std::string(options)); -} - -/** @brief Set the value of a variable, using the string representation of that value - * - * @param key name of the variable to modify - * @param value string representation of the value to set - */ - -void xbt_cfg_set_as_string(const char *key, const char *value) -{ - (*simgrid_config)[key].set_string_value(value); -} - -/** @brief Set an integer value to \a name within \a cfg if it wasn't changed yet - * - * This is useful to change the default value of a variable while allowing - * users to override it with command line arguments - */ -void xbt_cfg_setdefault_int(const char *key, int value) -{ - (*simgrid_config)[key].set_default_value(value); -} - -/** @brief Set an integer value to \a name within \a cfg if it wasn't changed yet - * - * This is useful to change the default value of a variable while allowing - * users to override it with command line arguments - */ -void xbt_cfg_setdefault_double(const char *key, double value) -{ - (*simgrid_config)[key].set_default_value(value); -} - -/** @brief Set a string value to \a name within \a cfg if it wasn't changed yet - * - * This is useful to change the default value of a variable while allowing - * users to override it with command line arguments - */ -void xbt_cfg_setdefault_string(const char *key, const char *value) -{ - (*simgrid_config)[key].set_default_value(value ? value : ""); -} - -/** @brief Set an boolean value to \a name within \a cfg if it wasn't changed yet - * - * This is useful to change the default value of a variable while allowing - * users to override it with command line arguments - */ -void xbt_cfg_setdefault_boolean(const char *key, const char *value) -{ - (*simgrid_config)[key].set_default_value(simgrid::config::parse_bool(value)); -} - /** @brief Set an integer value to \a name within \a cfg * * @param key the name of the variable @@ -663,13 +538,6 @@ void xbt_cfg_set_boolean(const char *key, const char *value) (*simgrid_config)[key].set_value(simgrid::config::parse_bool(value)); } - -/* Say if the value is the default value */ -int xbt_cfg_is_default_value(const char *key) -{ - return (*simgrid_config)[key].is_default() ? 1 : 0; -} - /*----[ Getting ]---------------------------------------------------------*/ /** @brief Retrieve an integer value of a variable (get a warning if not uniq) * @@ -693,21 +561,6 @@ double xbt_cfg_get_double(const char *key) return (*simgrid_config)[key].get_value(); } -/** @brief Retrieve a string value of a variable (get a warning if not uniq) - * - * @param key the name of the variable - * - * Returns the first value from the config set under the given name. - * If there is more than one value, it will issue a warning. - * Returns nullptr if there is no value. - * - * \warning the returned value is the actual content of the config set - */ -std::string xbt_cfg_get_string(const char* key) -{ - return (*simgrid_config)[key].get_value(); -} - /** @brief Retrieve a boolean value of a variable (get a warning if not uniq) * * @param key the name of the variable diff --git a/src/xbt/exception.cpp b/src/xbt/exception.cpp index 41db24db88..82b64eeabf 100644 --- a/src/xbt/exception.cpp +++ b/src/xbt/exception.cpp @@ -172,15 +172,6 @@ void install_exception_handler() previous_terminate_handler = std::set_terminate(handler); }); } -// deprecated -void logException(e_xbt_log_priority_t priority, const char* context, std::exception const& exception) -{ - log_exception(priority, context, exception); -} -void installExceptionHandler() -{ - install_exception_handler(); -} } // namespace xbt } // namespace simgrid