1 /* Copyright (c) 2009-2023. The SimGrid Team.
2 * All rights reserved. */
4 /* This program is free software; you can redistribute it and/or modify it
5 * under the terms of the license (GNU LGPL) which comes with this package. */
10 #include "smpi/smpi.h"
11 #include "smpi_f2c.hpp"
15 namespace simgrid::smpi {
17 class Info : public F2C{
18 std::map<std::string, std::string, std::less<>> map_;
22 explicit Info() {this->add_f();}
23 explicit Info(const Info* orig);
25 static void unref(MPI_Info info);
26 void set(const char* key, const char* value) { map_[key] = value; }
27 int get(const char* key, int valuelen, char* value, int* flag) const;
28 std::string name() const override { return "MPI_Info"; }
29 int remove(const char* key);
30 int get_nkeys(int* nkeys) const;
31 int get_nthkey(int n, char* key) const;
32 int get_valuelen(const char* key, int* valuelen, int* flag) const;
33 static Info* f2c(int id);
36 } // namespace simgrid::smpi