NeXus  4.4.3
 All Data Structures Files Functions Variables Typedefs Macros Pages
napi_internal.h
Go to the documentation of this file.
1 /*---------------------------------------------------------------------------
2  NeXus - Neutron & X-ray Common Data Format
3 
4  Application Program Interface Header File
5 
6  Copyright (C) 2015 NeXus International Advisory Committee
7 
8  This library is free software; you can redistribute it and/or
9  modify it under the terms of the GNU Lesser General Public
10  License as published by the Free Software Foundation; either
11  version 2 of the License, or (at your option) any later version.
12 
13  This library is distributed in the hope that it will be useful,
14  but WITHOUT ANY WARRANTY; without even the implied warranty of
15  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16  Lesser General Public License for more details.
17 
18  You should have received a copy of the GNU Lesser General Public
19  License along with this library; if not, write to the Free Software
20  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
21 
22  For further information, see <http://www.nexusformat.org>
23 
24  ----------------------------------------------------------------------------*/
25 
26 #ifndef NEXUS_INTERNAL_API
27 #define NEXUS_INTERNAL_API
28 
29 #include <napi.h>
30 
31 /*-----------------------------------------------------------------------
32  NAPI internals
33 ------------------------------------------------------------------------*/
34 
35 #ifdef __cplusplus
36 extern "C" {
37 #endif /* __cplusplus */
38 
39 
40  typedef struct {
41  NXhandle pNexusData;
42  NXstatus ( *nxreopen)(NXhandle pOrigHandle, NXhandle* pNewHandle);
43  NXstatus ( *nxclose)(NXhandle* pHandle);
44  NXstatus ( *nxflush)(NXhandle* pHandle);
45  NXstatus ( *nxmakegroup) (NXhandle handle, CONSTCHAR *name, CONSTCHAR* NXclass);
46  NXstatus ( *nxopengroup) (NXhandle handle, CONSTCHAR *name, CONSTCHAR* NXclass);
47  NXstatus ( *nxclosegroup)(NXhandle handle);
48  NXstatus ( *nxmakedata64) (NXhandle handle, CONSTCHAR* label, int datatype, int rank, int64_t dim[]);
49  NXstatus ( *nxcompmakedata64) (NXhandle handle, CONSTCHAR* label, int datatype, int rank, int64_t dim[], int comp_typ, int64_t bufsize[]);
50  NXstatus ( *nxcompress) (NXhandle handle, int compr_type);
51  NXstatus ( *nxopendata) (NXhandle handle, CONSTCHAR* label);
52  NXstatus ( *nxclosedata)(NXhandle handle);
53  NXstatus ( *nxputdata)(NXhandle handle, const void* data);
54  NXstatus ( *nxputattr)(NXhandle handle, CONSTCHAR* name, const void* data, int iDataLen, int iType);
55  NXstatus ( *nxputattra)(NXhandle handle, CONSTCHAR* name, const void* data, const int rank, const int dim[], const int iType);
56  NXstatus ( *nxputslab64)(NXhandle handle, const void* data, const int64_t start[], const int64_t size[]);
57  NXstatus ( *nxgetdataID)(NXhandle handle, NXlink* pLink);
58  NXstatus ( *nxmakelink)(NXhandle handle, NXlink* pLink);
59  NXstatus ( *nxmakenamedlink)(NXhandle handle, CONSTCHAR *newname, NXlink* pLink);
60  NXstatus ( *nxgetdata)(NXhandle handle, void* data);
61  NXstatus ( *nxgetinfo64)(NXhandle handle, int* rank, int64_t dimension[], int* datatype);
62  NXstatus ( *nxgetnextentry)(NXhandle handle, NXname name, NXname nxclass, int* datatype);
63  NXstatus ( *nxgetslab64)(NXhandle handle, void* data, const int64_t start[], const int64_t size[]);
64  NXstatus ( *nxgetnextattr)(NXhandle handle, NXname pName, int *iLength, int *iType);
65  NXstatus ( *nxgetnextattra)(NXhandle handle, NXname pName, int *rank, int dim[], int *iType);
66  NXstatus ( *nxgetattr)(NXhandle handle, const char* name, void* data, int* iDataLen, int* iType);
67  NXstatus ( *nxgetattra)(NXhandle handle, const char* name, void* data);
68  NXstatus ( *nxgetattrainfo)(NXhandle handle, NXname pName, int *rank, int dim[], int *iType);
69  NXstatus ( *nxgetattrinfo)(NXhandle handle, int* no_items);
70  NXstatus ( *nxgetgroupID)(NXhandle handle, NXlink* pLink);
71  NXstatus ( *nxgetgroupinfo)(NXhandle handle, int* no_items, NXname name, NXname nxclass);
72  NXstatus ( *nxsameID)(NXhandle handle, NXlink* pFirstID, NXlink* pSecondID);
73  NXstatus ( *nxinitgroupdir)(NXhandle handle);
74  NXstatus ( *nxinitattrdir)(NXhandle handle);
75  NXstatus ( *nxsetnumberformat)(NXhandle handle, int type, char *format);
76  NXstatus ( *nxprintlink)(NXhandle handle, NXlink* link);
77  NXstatus ( *nxnativeexternallink)(NXhandle handle, CONSTCHAR* name, CONSTCHAR* externalfile, CONSTCHAR* remotetarget);
78  NXstatus ( *nxnativeinquirefile)(NXhandle handle, char* externalfile, const int filenamelength);
79  NXstatus ( *nxnativeisexternallink)(NXhandle handle, CONSTCHAR* name, char* url, int urllen);
80  int stripFlag;
82  NXaccess access_mode;
84  /*---------------------*/
85  extern long nx_cacheSize;
86 
87 #ifdef __cplusplus
88 };
89 #endif /* __cplusplus */
90 
91 #endif /* NEXUS_INTERNAL_API */
NXaccess access_mode
Definition: napi_internal.h:82
long nx_cacheSize
Definition: napi.c:248
struct NexusFunction * pNexusFunction
NXhandle pNexusData
Definition: napi_internal.h:41