MACSio  0.9
Multi-purpose, Application-Centric, Scalable I/O Proxy App
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
macsio_iface.h
Go to the documentation of this file.
1 #ifndef _MACSIO_IFACE_H
2 #define _MACSIO_IFACE_H
3 /*
4 Copyright (c) 2015, Lawrence Livermore National Security, LLC.
5 Produced at the Lawrence Livermore National Laboratory.
6 Written by Mark C. Miller
7 
8 LLNL-CODE-676051. All rights reserved.
9 
10 This file is part of MACSio
11 
12 Please also read the LICENSE file at the top of the source code directory or
13 folder hierarchy.
14 
15 This program is free software; you can redistribute it and/or modify it under
16 the terms of the GNU General Public License (as published by the Free Software
17 Foundation) version 2, dated June 1991.
18 
19 This program is distributed in the hope that it will be useful, but WITHOUT
20 ANY WARRANTY; without even the IMPLIED WARRANTY OF MERCHANTABILITY or FITNESS
21 FOR A PARTICULAR PURPOSE. See the terms and conditions of the GNU General
22 Public License for more details.
23 
24 You should have received a copy of the GNU General Public License along with
25 this program; if not, write to the Free Software Foundation, Inc., 59 Temple
26 Place, Suite 330, Boston, MA 02111-1307 USA
27 */
28 
29 #warning ELIMINATE USE OF JSON HEADER FILE HERE
30 #include <json-c/json.h>
31 
32 #define MACSIO_IFACE_MAX_COUNT 128
33 #define MACSIO_IFACE_MAX_NAME 64
34 
35 #ifdef __cplusplus
36 extern "C" {
37 #endif
38 
39 /*
40  * Entry methods of an I/O library Interace
41  */
42 
43 typedef void (*DumpFunc)(int argi, int argc, char **argv, json_object *main_obj, int dumpNum, double dumpTime);
44 typedef void (*LoadFunc)(int argi, int argc, char **argv, char const *path, json_object *main_obj,
45  json_object **data_read_obj);
46 typedef int (*ProcessArgsFunc) (int argi, int argc, char **argv);
47 typedef int (*QueryFeaturesFunc)(void);
48 typedef int (*IdentifyFileFunc) (char const *pathname);
49 
50 #warning ALLOCATE MPI TAG IDS HERE TOO
51 
52 #warning MAKE THE MAKEFILE LINK ANY .o FILES WITH A GIVEN NAME SCHEME
53 typedef struct MACSIO_IFACE_Handle_t
56 #warning DEFAULT FILE EXTENSION HERE
57 #warning Features: Async, compression, sif, grid types, uni-modal or bi-modal
58  int slotUsed;
65 
66 extern int MACSIO_IFACE_Register(MACSIO_IFACE_Handle_t const *iface);
67 extern void MACSIO_IFACE_GetIds(int *cnt, int **ids);
68 extern void MACSIO_IFACE_GetIdsMatchingFileExtension(int *cnt, int **ids, char const *ext);
69 extern int MACSIO_IFACE_GetId(char const *name);
70 extern char const *MACSIO_IFACE_GetName(int id);
71 extern MACSIO_IFACE_Handle_t const *MACSIO_IFACE_GetByName(char const *name);
72 extern MACSIO_IFACE_Handle_t const *MACSIO_IFACE_GetById(int id);
73 
74 #ifdef __cplusplus
75 }
76 #endif
77 
78 #endif /* #ifndef _MACSIO_IFACE_H */
MACSIO_IFACE_Handle_t const * MACSIO_IFACE_GetByName(char const *name)
Definition: macsio_iface.c:100
IdentifyFileFunc identifyFileFunc
Definition: macsio_iface.h:63
int(* QueryFeaturesFunc)(void)
Definition: macsio_iface.h:47
void(* DumpFunc)(int argi, int argc, char **argv, json_object *main_obj, int dumpNum, double dumpTime)
Definition: macsio_iface.h:43
int MACSIO_IFACE_GetId(char const *name)
Definition: macsio_iface.c:48
ProcessArgsFunc processArgsFunc
Definition: macsio_iface.h:59
#define MACSIO_IFACE_MAX_NAME
Definition: macsio_iface.h:33
QueryFeaturesFunc queryFeaturesFunc
Definition: macsio_iface.h:62
struct MACSIO_IFACE_Handle_t MACSIO_IFACE_Handle_t
char const * MACSIO_IFACE_GetName(int id)
Definition: macsio_iface.c:60
char ext[MACSIO_IFACE_MAX_NAME]
Definition: macsio_iface.h:55
void(* LoadFunc)(int argi, int argc, char **argv, char const *path, json_object *main_obj, json_object **data_read_obj)
Definition: macsio_iface.h:44
int(* ProcessArgsFunc)(int argi, int argc, char **argv)
Definition: macsio_iface.h:46
int MACSIO_IFACE_Register(MACSIO_IFACE_Handle_t const *iface)
Definition: macsio_iface.c:35
void MACSIO_IFACE_GetIds(int *cnt, int **ids)
Definition: macsio_iface.c:88
char name[MACSIO_IFACE_MAX_NAME]
Definition: macsio_iface.h:54
int(* IdentifyFileFunc)(char const *pathname)
Definition: macsio_iface.h:48
void MACSIO_IFACE_GetIdsMatchingFileExtension(int *cnt, int **ids, char const *ext)
Definition: macsio_iface.c:67
MACSIO_IFACE_Handle_t const * MACSIO_IFACE_GetById(int id)
Definition: macsio_iface.c:93