OCILIB (C and C++ Driver for Oracle)  4.7.6
Open source and cross platform Oracle Driver delivering efficient access to Oracle databases.
NumericTypeResolver.hpp
1 /*
2  * OCILIB - C Driver for Oracle (C Wrapper for Oracle OCI)
3  *
4  * Website: http://www.ocilib.net
5  *
6  * Copyright (c) 2007-2023 Vincent ROGIER <vince.rogier@ocilib.net>
7  *
8  * Licensed under the Apache License, Version 2.0 (the "License");
9  * you may not use this file except in compliance with the License.
10  * You may obtain a copy of the License at
11  *
12  * http://www.apache.org/licenses/LICENSE-2.0
13  *
14  * Unless required by applicable law or agreed to in writing, software
15  * distributed under the License is distributed on an "AS IS" BASIS,
16  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17  * See the License for the specific language governing permissions and
18  * limitations under the License.
19  */
20 
21 #pragma once
22 
23 #include "ocilibcpp/config.hpp"
24 
25 namespace ocilib
26 {
27  namespace support
28  {
32  template<class T> struct NumericTypeResolver {};
33 
34  template<> struct NumericTypeResolver<OCI_Number*> { enum { Value = NumericNumber }; };
35  template<> struct NumericTypeResolver<Number> { enum { Value = NumericNumber }; };
36  template<> struct NumericTypeResolver<short> { enum { Value = NumericShort }; };
37  template<> struct NumericTypeResolver<unsigned short> { enum { Value = NumericUnsignedShort }; };
38  template<> struct NumericTypeResolver<int> { enum { Value = NumericInt }; };
39  template<> struct NumericTypeResolver<unsigned int> { enum { Value = NumericUnsignedInt }; };
40  template<> struct NumericTypeResolver<big_int> { enum { Value = NumericBigInt }; };
41  template<> struct NumericTypeResolver<big_uint> { enum { Value = NumericUnsignedBigInt }; };
42  template<> struct NumericTypeResolver<double> { enum { Value = NumericDouble }; };
43  template<> struct NumericTypeResolver<float> { enum { Value = NumericFloat }; };
44  }
45 }
long long big_int
big_int is a C scalar integer (32 or 64 bits) depending on compiler support for 64bits integers....
Definition: platform.h:281
struct OCI_Number OCI_Number
Oracle NUMBER representation.
Definition: types.h:269
OCILIB ++ Namespace.
@ NumericDouble
Definition: types.hpp:146
@ NumericInt
Definition: types.hpp:136
@ NumericUnsignedBigInt
Definition: types.hpp:144
@ NumericUnsignedShort
Definition: types.hpp:140
@ NumericBigInt
Definition: types.hpp:138
@ NumericNumber
Definition: types.hpp:150
@ NumericFloat
Definition: types.hpp:148
@ NumericUnsignedInt
Definition: types.hpp:142
@ NumericShort
Definition: types.hpp:134
Allow resolving a the C API numeric enumerated type from a C++ type.