Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Document the new mkfile buildin command
[simgrid.git] / tools / tesh2 / include / fstreams.h
1 /*\r
2  * include/fstreams.h - type representing a vector of file streams.\r
3  *\r
4  * Copyright 2008,2009 Martin Quinson, Malek Cherier All right reserved. \r
5  *\r
6  * This program is free software; you can redistribute it and/or modify it \r
7  * under the terms of the license (GNU LGPL) which comes with this package.\r
8  *\r
9  * Purpose:\r
10  *              This file contains all the declarations of the functions related with\r
11  *              the tesh fstreams type.\r
12  *\r
13  */\r
14 #ifndef __FSTREAMS_H\r
15 #define __FSTREAMS_H\r
16 \r
17 #include <com.h>\r
18 \r
19 #ifdef __cplusplus\r
20 extern "C" {\r
21 #endif\r
22 \r
23 /*! \brief fstreams_new - create a new fstreams.\r
24  *\r
25  * \param directory     The directory of the tesh file.\r
26  * \param name          The name of the tesh file.\r
27  *\r
28  * \return                      If successful the function returns the newly created\r
29  *                                      unit. Otherwise the function returns NULL and sets the\r
30  *                                      global variable errno with the appropiate error code.\r
31  * remarks:\r
32  *                                      If the parameter directory is NULL, the parameter name\r
33  *                                      must be `stdin`.\r
34  *\r
35  * errors :\r
36  *                                      [EINVAL] if one of the parameters is invalid.\r
37  *                                      [ENOMEM] if the system has not enough space to allocate\r
38  *                                               the file stream.\r
39  */\r
40 fstreams_t\r
41 fstreams_new(void_f_pvoid_t fn_finalize);\r
42 \r
43 int\r
44 fstreams_exclude(fstreams_t fstreams, excludes_t excludes);\r
45 \r
46 int \r
47 fstreams_contains(fstreams_t fstreams, fstream_t fstream);\r
48 \r
49 int\r
50 fstreams_add(fstreams_t fstreams, fstream_t fstream);\r
51 \r
52 int\r
53 fstreams_free(void** fstreamsptr);\r
54 \r
55 int\r
56 fstreams_get_size(fstreams_t fstreams);\r
57 \r
58 int\r
59 fstreams_is_empty(fstreams_t fstreams);\r
60 \r
61 int \r
62 fstreams_contains(fstreams_t fstreams, fstream_t fstream);\r
63 \r
64 int\r
65 fstreams_load(fstreams_t fstreams);\r
66 \r
67 \r
68 \r
69 #ifdef __cplusplus\r
70 }\r
71 #endif\r
72 \r
73 \r
74 #endif /* !__FSTREAMS_H */\r