NeXus  4.4.3
 All Data Structures Files Functions Variables Typedefs Macros Pages
nxstack.h
Go to the documentation of this file.
1 /*
2  This is some code to handle a stack of NeXus files. This is used to implement
3  external linking within the NeXus-API
4 
5  Copyright (C) 1997-2006 Mark Koennecke
6 
7  This library is free software; you can redistribute it and/or
8  modify it under the terms of the GNU Lesser General Public
9  License as published by the Free Software Foundation; either
10  version 2 of the License, or (at your option) any later version.
11 
12  This library is distributed in the hope that it will be useful,
13  but WITHOUT ANY WARRANTY; without even the implied warranty of
14  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15  Lesser General Public License for more details.
16 
17  You should have received a copy of the GNU Lesser General Public
18  License along with this library; if not, write to the Free Software
19  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20 
21  For further information, see <http://www.nexusformat.org>
22 
23  Added functions to deal with the path stack for NXgetpath
24  Mark Koennecke, October 2009
25 
26 */
27 #ifndef NEXUSFILESTACK
28 #define NEXUSFILESTACK
29 
30 typedef struct __fileStack *pFileStack;
31 #define MAXEXTERNALDEPTH 16
32 
33 pFileStack makeFileStack();
34 void killFileStack(pFileStack self);
35 int getFileStackSize();
36 
37 void pushFileStack(pFileStack self, pNexusFunction pDriv, char *filename);
38 void popFileStack(pFileStack self);
39 
40 pNexusFunction peekFileOnStack(pFileStack self);
41 char *peekFilenameOnStack(pFileStack self);
42 void peekIDOnStack(pFileStack self, NXlink *id);
43 void setCloseID(pFileStack self, NXlink id);
44 
45 int fileStackDepth(pFileStack self);
46 
47 void pushPath(pFileStack self, const char *name);
48 void popPath(pFileStack self);
49 int buildPath(pFileStack self, char *path, int pathlen);
50 
51 #endif
52 
struct __fileStack * pFileStack
Definition: nxstack.h:30
pFileStack makeFileStack()
Definition: nxstack.c:50
void pushFileStack(pFileStack self, pNexusFunction pDriv, char *file)
Definition: nxstack.c:73
void killFileStack(pFileStack self)
Definition: nxstack.c:63
void peekIDOnStack(pFileStack self, NXlink *id)
Definition: nxstack.c:101
char * peekFilenameOnStack(pFileStack self)
Definition: nxstack.c:97
int buildPath(pFileStack self, char *path, int pathlen)
Definition: nxstack.c:125
void popPath(pFileStack self)
Definition: nxstack.c:118
int fileStackDepth(pFileStack self)
Definition: nxstack.c:109
void pushPath(pFileStack self, const char *name)
Definition: nxstack.c:113
int getFileStackSize()
Definition: nxstack.c:69
void setCloseID(pFileStack self, NXlink id)
Definition: nxstack.c:105
pNexusFunction peekFileOnStack(pFileStack self)
Definition: nxstack.c:93
void popFileStack(pFileStack self)
Definition: nxstack.c:86