Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
read, seek + init
[simgrid.git] / src / smpi / include / smpi_file.hpp
1 /* Copyright (c) 2010-2019. The SimGrid Team.\r
2  * All rights reserved.                                                     */\r
3 \r
4 /* This program is free software; you can redistribute it and/or modify it\r
5  * under the terms of the license (GNU LGPL) which comes with this package. */\r
6 \r
7 #ifndef SMPI_FILE_HPP_INCLUDED\r
8 #define SMPI_FILE_HPP_INCLUDED\r
9 #include "simgrid/plugins/file_system.h"\r
10 \r
11 \r
12 namespace simgrid{\r
13 namespace smpi{\r
14 class File{\r
15   MPI_Comm comm_;\r
16   int flags_;\r
17   simgrid::s4u::File* file_;\r
18   MPI_Info info_;\r
19   public:\r
20   File(MPI_Comm comm, char *filename, int amode, MPI_Info info);\r
21   ~File();\r
22   int size();\r
23   int flags();\r
24   int sync();\r
25   int seek(MPI_Offset offset, int whence);\r
26   int read(void *buf, int count,MPI_Datatype datatype, MPI_Status *status);\r
27   static int close(MPI_File *fh);\r
28   static int del(char *filename, MPI_Info info);\r
29 };\r
30 }\r
31 }\r
32 #endif\r