X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/9104957deccc59e0e804215d5db498fabfd40d29..5ed37babb2fa9097abe82df299c0aa259ed84d5a:/src/smpi/include/smpi_info.hpp diff --git a/src/smpi/include/smpi_info.hpp b/src/smpi/include/smpi_info.hpp index 280afa5410..a64851b076 100644 --- a/src/smpi/include/smpi_info.hpp +++ b/src/smpi/include/smpi_info.hpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2009-2020. The SimGrid Team. +/* Copyright (c) 2009-2023. The SimGrid Team. * All rights reserved. */ /* This program is free software; you can redistribute it and/or modify it @@ -12,29 +12,27 @@ #include #include -namespace simgrid{ -namespace smpi{ +namespace simgrid::smpi { class Info : public F2C{ - std::map map_; + std::map> map_; int refcount_ = 1; public: - Info() = default; - explicit Info(const Info* orig) : map_(orig->map_) {} - ~Info() = default; + explicit Info() {this->add_f();} + explicit Info(const Info* orig); void ref(); static void unref(MPI_Info info); void set(const char* key, const char* value) { map_[key] = value; } - int get(const char* key, int valuelen, char* value, int* flag); + int get(const char* key, int valuelen, char* value, int* flag) const; + std::string name() const override { return "MPI_Info"; } int remove(const char* key); - int get_nkeys(int* nkeys); - int get_nthkey(int n, char* key); - int get_valuelen(const char* key, int* valuelen, int* flag); + int get_nkeys(int* nkeys) const; + int get_nthkey(int n, char* key) const; + int get_valuelen(const char* key, int* valuelen, int* flag) const; static Info* f2c(int id); }; -} -} +} // namespace simgrid::smpi #endif