NetCDF
4.8.1
netcdf_mem.h
Go to the documentation of this file.
1
12
/*
13
* In order to use any of the netcdf_XXX.h files, it is necessary
14
* to include netcdf.h followed by any netcdf_XXX.h files.
15
* Various things (like EXTERNL) are defined in netcdf.h
16
* to make them available for use by the netcdf_XXX.h files.
17
*/
18
19
#ifndef NETCDF_MEM_H
20
#define NETCDF_MEM_H 1
21
22
typedef
struct
NC_memio
{
23
size_t
size;
24
void
* memory;
25
int
flags;
26
#define NC_MEMIO_LOCKED 1
/* Do not try to realloc or free provided memory */
27
}
NC_memio
;
28
29
#if defined(__cplusplus)
30
extern
"C"
{
31
#endif
32
33
/* Treat a memory block as a file; read-only */
34
EXTERNL
int
nc_open_mem
(
const
char
* path,
int
mode,
size_t
size,
void
* memory,
int
* ncidp);
35
36
EXTERNL
int
nc_create_mem
(
const
char
* path,
int
mode,
size_t
initialsize,
int
* ncidp);
37
38
/* Alternative to nc_open_mem with extended capabilities
39
See docs/inmemory.md
40
*/
41
EXTERNL
int
nc_open_memio
(
const
char
* path,
int
mode,
NC_memio
* info,
int
* ncidp);
42
43
/* Close memory file and return the final memory state */
44
EXTERNL
int
nc_close_memio
(
int
ncid,
NC_memio
* info);
45
46
#if defined(__cplusplus)
47
}
48
#endif
49
50
#endif
/* NETCDF_MEM_H */
EXTERNL
#define EXTERNL
Needed for DLL build.
Definition:
netcdf.h:521
nc_close_memio
EXTERNL int nc_close_memio(int ncid, NC_memio *info)
Definition:
dfile.c:1350
nc_open_memio
EXTERNL int nc_open_memio(const char *path, int mode, NC_memio *info, int *ncidp)
Definition:
dfile.c:832
NC_memio
Definition:
netcdf_mem.h:22
nc_open_mem
EXTERNL int nc_open_mem(const char *path, int mode, size_t size, void *memory, int *ncidp)
Definition:
dfile.c:767
nc_create_mem
EXTERNL int nc_create_mem(const char *path, int mode, size_t initialsize, int *ncidp)
Definition:
dfile.c:507
Return to the Main Unidata NetCDF page.
Generated on Mon Aug 23 2021 13:28:32 for NetCDF. NetCDF is a
Unidata
library.