X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/02dd785d0212ccd8376c2ce4fd931942232fcafb..da23351cb44bc018edc2c181b90bcdb7083b061c:/include/xbt/signal.hpp diff --git a/include/xbt/signal.hpp b/include/xbt/signal.hpp index 508822cf2b..4c1d46d22d 100644 --- a/include/xbt/signal.hpp +++ b/include/xbt/signal.hpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2014-2015. The SimGrid Team. All rights reserved. */ +/* Copyright (c) 2014-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. */ @@ -34,13 +34,14 @@ namespace xbt { } R operator()(P... args) const { - for (auto& handler : handlers_) + for (auto const& handler : handlers_) handler(args...); } - void disconnect_all_slots() - { - handlers_.clear(); - } + 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(); } }; }