Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Further cleanups in SMPI includes
[simgrid.git] / src / smpi / smpi_info.hpp
1 /* Copyright (c) 2009-2010, 2012-2017. The SimGrid Team.
2  * All rights reserved.                                                     */
3
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. */
6
7 #ifndef SMPI_INFO_HPP
8 #define SMPI_INFO_HPP
9
10 #include "src/smpi/smpi_f2c.hpp"
11 #include "smpi/smpi.h"
12 #include "xbt/dict.h"
13
14 namespace simgrid{
15 namespace smpi{
16
17 class Info : public F2C{
18   private:
19     xbt_dict_t dict_;
20     int refcount_;
21   public:
22     explicit Info();
23     explicit Info(Info* orig);
24     ~Info();
25     void ref();
26     static void unref(MPI_Info info);
27     void set(char *key, char *value);
28     int get(char *key,int valuelen, char *value, int *flag);
29     int remove(char* key);
30     int get_nkeys(int *nkeys);
31     int get_nthkey(int n, char *key);
32     int get_valuelen(char *key, int *valuelen, int *flag);
33     static Info* f2c(int id);
34 };
35
36 }
37 }
38
39 #endif