CGR Localization
 All Classes Namespaces Files Functions Variables Macros Pages
extensions.h
Go to the documentation of this file.
1 //========================================================================
2 // This software is free: you can redistribute it and/or modify
3 // it under the terms of the GNU Lesser General Public License Version 3,
4 // as published by the Free Software Foundation.
5 //
6 // This software is distributed in the hope that it will be useful,
7 // but WITHOUT ANY WARRANTY; without even the implied warranty of
8 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
9 // GNU Lesser General Public License for more details.
10 //
11 // You should have received a copy of the GNU Lesser General Public License
12 // Version 3 in the file COPYING that came with this distribution.
13 // If not, see <http://www.gnu.org/licenses/>.
14 //========================================================================
20 //========================================================================
21 
22 #include <string>
23 #include "geometry.h"
24 
25 using namespace std;
26 
27 
30 #define TYPE_CHECK(Type) \
31  const char* typeCheck(const Type p){ \
32  return #Type; \
33  } \
34  int typeCheckID(const Type p){ \
35  return CustomExtensions::t##Type; \
36  }
37 
38 namespace CustomExtensions{
39  typedef enum {
40  tuchar,
41  tuint,
42  tulong,
43  tulonglong,
44  tchar,
45  tint,
46  tlong,
47  tlonglong,
48  tfloat,
49  tdouble,
50  tvector2i,
51  tvector2f,
52  tvector2d,
53  tvector3i,
54  tvector3f,
55  tvector3d,
56  tline2i,
57  tline2f,
58  tline2d,
59  tstring,
60  }TypeIDs;
61 
62  typedef unsigned char uchar;
63  typedef unsigned int uint;
64  typedef unsigned long ulong;
65  typedef long long longlong;
66  typedef unsigned long long ulonglong;
67 
68  TYPE_CHECK(uchar)
69  TYPE_CHECK(uint)
70  TYPE_CHECK(ulong)
71  TYPE_CHECK(ulonglong)
72  TYPE_CHECK(char)
73  TYPE_CHECK(int)
74  TYPE_CHECK(long)
75  TYPE_CHECK(longlong)
76  TYPE_CHECK(double)
77  TYPE_CHECK(float)
78  TYPE_CHECK(string)
88 }
89 
90 
91 
92 
Definition: line.h:33
#define TYPE_CHECK(Type)
Definition: extensions.h:30