FreeWRL/FreeX3D  3.0.0
EAIHelpers.h
1 /*
2 
3 
4 EAI Helpers functions
5 
6 */
7 
8 /****************************************************************************
9  This file is part of the FreeWRL/FreeX3D Distribution.
10 
11  Copyright 2009 CRC Canada. (http://www.crc.gc.ca)
12 
13  FreeWRL/FreeX3D is free software: you can redistribute it and/or modify
14  it under the terms of the GNU Lesser Public License as published by
15  the Free Software Foundation, either version 3 of the License, or
16  (at your option) any later version.
17 
18  FreeWRL/FreeX3D is distributed in the hope that it will be useful,
19  but WITHOUT ANY WARRANTY; without even the implied warranty of
20  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21  GNU General Public License for more details.
22 
23  You should have received a copy of the GNU General Public License
24  along with FreeWRL/FreeX3D. If not, see <http://www.gnu.org/licenses/>.
25 ****************************************************************************/
26 
27 
28 #ifndef __FREEWRL_EAI_HELPERS_H__
29 #define __FREEWRL_EAI_HELPERS_H__
30 
31 #include "../vrml_parser/Structs.h"
32 
33 //extern char *outBuffer;
34 //extern int outBufferLen;
35 
36 struct Uni_String *newASCIIString(char *str);
37 void verify_Uni_String(struct Uni_String *unis, char *str);
38 struct X3D_Node *getEAINodeFromTable(int index, int field);
39 int getEAINodeTypeFromTable(int node) ;
40 int returnElementRowSize (int type); /* from EAI_C_CommonFunctions.c */
41 int returnElementLength(int type); /* from EAI_C_CommonFunctions.c */
42 int getEAIActualOffset(int node, int field);
43 char *getEAIMemoryPointer (int node, int field);
44 int registerEAINodeForAccess(struct X3D_Node* myn);
45 void handleEAIGetValue (char command, char *bufptr, int repno);
46 int EAI_GetRootNode(void);
47 
48 void EAI_GetType(int cNode, char *ctmp, char *dtmp, int *cNodePtr, int *fieldOffset, int *dataLen, int *typeString, int *scripttype, int *accessType);
49 
50 int mapToKEYWORDindex(indexT pkwIndex);
51 void outBufferCat (char *str);
52 
53 int EAI_GetNodeParents(int cNode, int **parentNodesAdr);
54 
55 
56 int isSForMFType(int itype);
57 int sizeofSF(int itype);
58 int isSFType(int itype);
59 int sizeofSForMF(int itype);
60 int type2SF(int itype);
61 
62 #endif /* __FREEWRL_EAI_HELPERS_H__ */
63