NetCDF  4.6.2
netcdf_mem.h
Go to the documentation of this file.
1 
12 #ifndef NETCDF_MEM_H
13 #define NETCDF_MEM_H 1
14 
15 typedef struct NC_memio {
16  size_t size;
17  void* memory;
18  int flags;
19 #define NC_MEMIO_LOCKED 1 /* Do not try to realloc or free provided memory */
20 } NC_memio;
21 
22 #if defined(__cplusplus)
23 extern "C" {
24 #endif
25 
26 /* Treate a memory block as a file; read-only */
27 EXTERNL int nc_open_mem(const char* path, int mode, size_t size, void* memory, int* ncidp);
28 
29 EXTERNL int nc_create_mem(const char* path, int mode, size_t initialsize, int* ncidp);
30 
31 /* Alternative to nc_open_mem with extended capabilites
32  See docs/inmemory.md
33  */
34 EXTERNL int nc_open_memio(const char* path, int mode, NC_memio* info, int* ncidp);
35 
36 /* Close memory file and return the final memory state */
37 EXTERNL int nc_close_memio(int ncid, NC_memio* info);
38 
39 #if defined(__cplusplus)
40 }
41 #endif
42 
43 #endif /* NETCDF_MEM_H */
EXTERNL int nc_close_memio(int ncid, NC_memio *info)
Do a normal close (see nc_close()) on an in-memory dataset, then return a copy of the final memory co...
Definition: dfile.c:1527
EXTERNL int nc_open_memio(const char *path, int mode, NC_memio *info, int *ncidp)
Open a netCDF file with the contents taken from a block of memory.
Definition: dfile.c:997
EXTERNL int nc_open_mem(const char *path, int mode, size_t size, void *memory, int *ncidp)
Open a netCDF file with the contents taken from a block of memory.
Definition: dfile.c:932
#define EXTERNL
Needed for DLL build.
Definition: netcdf.h:502
EXTERNL int nc_create_mem(const char *path, int mode, size_t initialsize, int *ncidp)
Create a netCDF file with the contents stored in memory.
Definition: dfile.c:672

Return to the Main Unidata NetCDF page.
Generated on Wed Dec 12 2018 10:27:40 for NetCDF. NetCDF is a Unidata library.