Tizen 2.1 base
[framework/osp/uifw.git] / src / ui / effects / inc / renderer / system / FUiEffects_RendererSystemTypeTraits.h
1 //
2 // Open Service Platform
3 // Copyright (c) 2012-2013 Samsung Electronics Co., Ltd.
4 //
5 // Licensed under the Flora License, Version 1.0 (the License);
6 // you may not use this file except in compliance with the License.
7 // You may obtain a copy of the License at
8 //
9 //     http://floralicense.org/license/
10 //
11 // Unless required by applicable law or agreed to in writing, software
12 // distributed under the License is distributed on an AS IS BASIS,
13 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 // See the License for the specific language governing permissions and
15 // limitations under the License.
16 //
17
18 /**
19  * @file       FUiEffects_RendererSystemTypeTraits.h
20  * @brief      The TypeTraits template
21  *
22  */
23
24 #ifndef FUI_EFFECTS_INTERNAL_RENDERER_SYSTEM_TYPE_TRAITS_H_
25 #define FUI_EFFECTS_INTERNAL_RENDERER_SYSTEM_TYPE_TRAITS_H_
26
27 namespace Tizen { namespace Ui { namespace Effects { namespace _Renderer { namespace System
28 {
29
30 template <typename T>
31 class IsStdSignedInts
32 {
33         public:
34                 enum { VALUE = 0 };
35 };
36
37 template <typename T>
38 class IsStdUnsignedInts
39 {
40         public:
41                 enum { VALUE = 0 };
42 };
43
44 template <typename T>
45 class IsStdOtherInts
46 {
47         public:
48                 enum { VALUE = 0 };
49 };
50
51 template <typename T>
52 class IsStdFloats
53 {
54         public:
55                 enum { VALUE = 0 };
56 };
57
58 template <typename T>
59 class TypeTraits
60 {
61         public:
62                 enum {isStdSignedInt = IsStdSignedInts<T>::VALUE };
63                 enum {isStdUnsignedInt = IsStdUnsignedInts<T>::VALUE };
64                 enum {isStdOtherInt = IsStdOtherInts<T>::VALUE };
65                 enum {isStdFloat = IsStdFloats<T>::VALUE };
66
67                 enum {isStdIntegral = isStdSignedInt || isStdUnsignedInt || isStdOtherInt };
68
69                 enum {isStdArith = isStdIntegral || isStdFloat };
70
71                 enum {isStdFundamental = isStdIntegral || isStdFloat };
72
73                 enum {isFundamental = isStdFundamental };
74 };
75
76 template <>
77 class IsStdSignedInts<signed char>
78 {
79         public:
80                 enum { VALUE = 1 };
81 };
82
83 template <>
84 class IsStdSignedInts<short>
85 {
86         public:
87                 enum { VALUE = 1 };
88 };
89
90 template <>
91 class IsStdSignedInts<int>
92 {
93         public:
94                 enum { VALUE = 1 };
95 };
96
97 template <>
98 class IsStdSignedInts<long int>
99 {
100         public:
101                 enum { VALUE = 1 };
102 };
103
104 template <>
105 class IsStdSignedInts<long long>
106 {
107         public:
108                 enum { VALUE = 1 };
109 };
110
111 template <>
112 class IsStdUnsignedInts<unsigned char>
113 {
114         public:
115                 enum { VALUE = 1 };
116 };
117
118 template <>
119 class IsStdUnsignedInts<unsigned short int>
120 {
121         public:
122                 enum { VALUE = 1 };
123 };
124
125 template <>
126 class IsStdUnsignedInts<unsigned int>
127 {
128         public:
129                 enum { VALUE = 1 };
130 };
131
132 template <>
133 class IsStdUnsignedInts<unsigned long int>
134 {
135         public:
136                 enum { VALUE = 1 };
137 };
138
139 template <>
140 class IsStdUnsignedInts<unsigned long long>
141 {
142         public:
143                 enum { VALUE = 1 };
144 };
145
146 template <>
147 class IsStdOtherInts<bool>
148 {
149         public:
150                 enum { VALUE = 1 };
151 };
152
153 template <>
154 class IsStdOtherInts<char>
155 {
156         public:
157                 enum { VALUE = 1 };
158 };
159
160 template <>
161 class IsStdFloats<float>
162 {
163         public:
164                 enum { VALUE = 1 };
165 };
166
167 template <>
168 class IsStdFloats<double>
169 {
170         public:
171                 enum { VALUE = 1 };
172 };
173
174 template <>
175 class IsStdFloats<long double>
176 {
177         public:
178                 enum { VALUE = 1 };
179 };
180
181 }}}}} //Tizen::Ui::Effects::_Renderer::System
182
183
184 #endif // FUI_EFFECTS_INTERNAL_RENDERER_SYSTEM_TYPE_TRAITS_H_