FreeWRL/FreeX3D  3.0.0
CParseGeneral.h
1 /*
2 
3 
4 General header for VRML-parser (lexer/parser)
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_CPARSE_GENERAL_H__
29 #define __FREEWRL_CPARSE_GENERAL_H__
30 
31 /* Typedefs for VRML-types. */
32 typedef int vrmlBoolT;
33 typedef struct SFColor vrmlColorT;
34 typedef struct SFColorRGBA vrmlColorRGBAT;
35 typedef float vrmlFloatT;
36 typedef int vrmlInt32T;
37 typedef struct Multi_Int32 vrmlImageT;
38 typedef struct X3D_Node* vrmlNodeT;
39 typedef struct SFRotation vrmlRotationT;
40 typedef struct Uni_String* vrmlStringT;
41 typedef double vrmlTimeT;
42 typedef double vrmlDoubleT;
43 typedef struct SFVec2f vrmlVec2fT;
44 typedef struct SFVec2d vrmlVec2dT;
45 typedef struct SFVec3d vrmlVec3dT;
46 typedef struct SFVec4f vrmlVec4fT;
47 typedef struct SFVec4d vrmlVec4dT;
48 typedef struct SFColor vrmlVec3fT;
49 typedef struct SFMatrix3f vrmlMatrix3fT;
50 typedef struct SFMatrix3d vrmlMatrix3dT;
51 typedef struct SFMatrix4f vrmlMatrix4fT;
52 typedef struct SFMatrix4d vrmlMatrix4dT;
53 
54 /* This is an union to hold every vrml-type */
55 union anyVrml
56 {
57  #define SF_TYPE(fttype, type, ttype) \
58  vrml##ttype##T type;
59  #define MF_TYPE(fttype, type, ttype) \
60  struct Multi_##ttype type;
61  #include "VrmlTypeList.h"
62  #undef SF_TYPE
63  #undef MF_TYPE
64 };
65 
66 #define parseError(msg) \
67  (ConsoleMessage("Parse error: " msg "\n")) \
68 
69 /* tie assert in here to give better failure methodology */
70 /* #define ASSERT(cond) if(!(cond)){fw_assert(__FILE__,__LINE__);} */
71 /* void fw_assert(char *,int); */
72 
73 
74 #endif /* __FREEWRL_CPARSE_GENERAL_H__ */