ScalarTypeConversion.h
Go to the documentation of this file.
1 #ifndef GfxTL__SCALARTYPECONVERSION_HEADER__
2 #define GfxTL__SCALARTYPECONVERSION_HEADER__
3 
4 namespace GfxTL
5 {
6  template< class A, class B >
8  {};
9 
10  template< >
11  struct ScalarTypeConversion< char, char >
12  {
13  typedef short DifferenceType;
14  typedef short AdditionType;
15  typedef short MultiplicationType;
16  typedef float DivisionType;
17  };
18 
19  template< >
20  struct ScalarTypeConversion< short, short >
21  {
22  typedef int DifferenceType;
23  typedef int AdditionType;
24  typedef int MultiplicationType;
25  typedef float DivisionType;
26  };
27 
28  template< >
29  struct ScalarTypeConversion< int, int >
30  {
31  typedef int DifferenceType;
32  typedef int AdditionType;
33  typedef int MultiplicationType;
34  typedef float DivisionType;
35  };
36 
37  template< >
39  {
40  typedef float DifferenceType;
41  typedef float AdditionType;
42  typedef float MultiplicationType;
43  typedef float DivisionType;
44  };
45 
46  template< >
47  struct ScalarTypeConversion< double, double >
48  {
49  typedef double DifferenceType;
50  typedef double AdditionType;
51  typedef double MultiplicationType;
52  typedef double DivisionType;
53  };
54 
55  template< >
56  struct ScalarTypeConversion< char, short >
57  : public ScalarTypeConversion< short, short >
58  {};
59 
60  template< >
61  struct ScalarTypeConversion< short, char >
62  : public ScalarTypeConversion< short, short >
63  {};
64 
65  template< >
66  struct ScalarTypeConversion< char, int >
67  : public ScalarTypeConversion< int, int >
68  {};
69 
70  template< >
71  struct ScalarTypeConversion< int, char >
72  : public ScalarTypeConversion< int, int >
73  {};
74 
75  template< >
76  struct ScalarTypeConversion< char, float >
77  : public ScalarTypeConversion< float, float >
78  {};
79 
80  template< >
81  struct ScalarTypeConversion< float, char >
82  : public ScalarTypeConversion< float, float >
83  {};
84 
85  template< >
86  struct ScalarTypeConversion< char, double >
87  : public ScalarTypeConversion< double, double >
88  {};
89 
90  template< >
91  struct ScalarTypeConversion< double, char >
92  : public ScalarTypeConversion< double, double >
93  {};
94 
95  template< >
96  struct ScalarTypeConversion< short, int >
97  : public ScalarTypeConversion< int, int >
98  {};
99 
100  template< >
101  struct ScalarTypeConversion< int, short >
102  : public ScalarTypeConversion< int, int >
103  {};
104 
105  template< >
106  struct ScalarTypeConversion< short, float >
107  : public ScalarTypeConversion< float, float >
108  {};
109 
110  template< >
111  struct ScalarTypeConversion< float, short >
112  : public ScalarTypeConversion< float, float >
113  {};
114 
115  template< >
116  struct ScalarTypeConversion< short, double >
117  : public ScalarTypeConversion< double, double >
118  {};
119 
120  template< >
121  struct ScalarTypeConversion< double, short >
122  : public ScalarTypeConversion< double, double >
123  {};
124 
125  template< >
127  : public ScalarTypeConversion< float, float >
128  {};
129 
130  template< >
132  : public ScalarTypeConversion< float, float >
133  {};
134 
135  template< >
136  struct ScalarTypeConversion< int, double >
137  : public ScalarTypeConversion< double, double >
138  {};
139 
140  template< >
141  struct ScalarTypeConversion< double, int >
142  : public ScalarTypeConversion< double, double >
143  {};
144 
145  template< >
146  struct ScalarTypeConversion< float, double >
147  : public ScalarTypeConversion< double, double >
148  {};
149 
150  template< >
151  struct ScalarTypeConversion< double, float >
152  : public ScalarTypeConversion< double, double >
153  {};
154 };
155 
156 #endif
GfxTL::ScalarTypeConversion< int, int >::AdditionType
int AdditionType
Definition: ScalarTypeConversion.h:32
GfxTL::ScalarTypeConversion< int, int >::DifferenceType
int DifferenceType
Definition: ScalarTypeConversion.h:31
GfxTL::ScalarTypeConversion< float, float >::DifferenceType
float DifferenceType
Definition: ScalarTypeConversion.h:40
GfxTL::ScalarTypeConversion< float, float >::MultiplicationType
float MultiplicationType
Definition: ScalarTypeConversion.h:42
GfxTL::ScalarTypeConversion< short, short >::DifferenceType
int DifferenceType
Definition: ScalarTypeConversion.h:22
GfxTL::ScalarTypeConversion< float, float >::AdditionType
float AdditionType
Definition: ScalarTypeConversion.h:41
GfxTL::ScalarTypeConversion< char, char >::AdditionType
short AdditionType
Definition: ScalarTypeConversion.h:14
GfxTL::ScalarTypeConversion< char, char >::DivisionType
float DivisionType
Definition: ScalarTypeConversion.h:16
GfxTL::ScalarTypeConversion< double, double >::DifferenceType
double DifferenceType
Definition: ScalarTypeConversion.h:49
GfxTL::ScalarTypeConversion< double, double >::AdditionType
double AdditionType
Definition: ScalarTypeConversion.h:50
GfxTL::ScalarTypeConversion< char, char >::DifferenceType
short DifferenceType
Definition: ScalarTypeConversion.h:13
GfxTL::ScalarTypeConversion< short, short >::DivisionType
float DivisionType
Definition: ScalarTypeConversion.h:25
GfxTL::ScalarTypeConversion< char, char >::MultiplicationType
short MultiplicationType
Definition: ScalarTypeConversion.h:15
GfxTL::ScalarTypeConversion< short, short >::MultiplicationType
int MultiplicationType
Definition: ScalarTypeConversion.h:24
GfxTL::ScalarTypeConversion< double, double >::DivisionType
double DivisionType
Definition: ScalarTypeConversion.h:52
GfxTL::ScalarTypeConversion< float, float >::DivisionType
float DivisionType
Definition: ScalarTypeConversion.h:43
GfxTL
Definition: AABox.h:8
GfxTL::ScalarTypeConversion< short, short >::AdditionType
int AdditionType
Definition: ScalarTypeConversion.h:23
GfxTL::ScalarTypeConversion
Definition: ScalarTypeConversion.h:7
GfxTL::ScalarTypeConversion< int, int >::DivisionType
float DivisionType
Definition: ScalarTypeConversion.h:34
float
#define float
Definition: 16_Level.h:22
GfxTL::ScalarTypeConversion< double, double >::MultiplicationType
double MultiplicationType
Definition: ScalarTypeConversion.h:51
GfxTL::ScalarTypeConversion< int, int >::MultiplicationType
int MultiplicationType
Definition: ScalarTypeConversion.h:33