MySQL 5.6.14 Source Code Document
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
ndbjtie_defs.hpp
1 /*
2  Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
3 
4  This program is free software; you can redistribute it and/or modify
5  it under the terms of the GNU General Public License as published by
6  the Free Software Foundation; version 2 of the License.
7 
8  This program is distributed in the hope that it will be useful,
9  but WITHOUT ANY WARRANTY; without even the implied warranty of
10  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11  GNU General Public License for more details.
12 
13  You should have received a copy of the GNU General Public License
14  along with this program; if not, write to the Free Software
15  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
16 */
17 /*
18  * ndbjtie_defs.hpp
19  */
20 
21 #ifndef ndbjtie_defs_hpp
22 #define ndbjtie_defs_hpp
23 
24 // API to implement against
25 #include "ndb_types.h"
26 
27 // libraries
28 #include "helpers.hpp"
29 #include "jtie.hpp"
30 
31 // the applied Java mapping of basic variable-width C++ types
32 #define JTIE_JNI_SHORT_T jshort
33 #define JTIE_JNI_INT_T jint
34 #define JTIE_JNI_LONG_T jint
35 #define JTIE_JNI_LONGLONG_T jlong
36 #define JTIE_JNI_LONGDOUBLE_T jdouble
37 #include "jtie_tconv_vwidth.hpp"
38 
39 // ---------------------------------------------------------------------------
40 // NDB JTie Type Definitions
41 // ---------------------------------------------------------------------------
42 
43 // compatibility layer typedefs: mapping trait type aliases for NDB types
44 JTIE_DEFINE_BASIC_TYPE_MAPPING_SET( jbyte, Int8, Int8 )
45 JTIE_DEFINE_BASIC_TYPE_MAPPING_SET( jbyte, Uint8, Uint8 )
46 JTIE_DEFINE_BASIC_TYPE_MAPPING_SET( jshort, Int16, Int16 )
47 JTIE_DEFINE_BASIC_TYPE_MAPPING_SET( jshort, Uint16, Uint16 )
48 JTIE_DEFINE_BASIC_TYPE_MAPPING_SET( jint, Int32, Int32 )
49 JTIE_DEFINE_BASIC_TYPE_MAPPING_SET( jint, Uint32, Uint32 )
50 JTIE_DEFINE_BASIC_TYPE_MAPPING_SET( jlong, Int64, Int64 )
51 JTIE_DEFINE_BASIC_TYPE_MAPPING_SET( jlong, Uint64, Uint64 )
52 
53 // XXXXX temporary, for testing
54 #if 1
55 # define NDBJTIE_USE_WRAPPED_VARIANT_FOR_CONST_OVERLOADED_FUNCTION 1
56 # define NDBJTIE_USE_WRAPPED_VARIANT_FOR_OVERLOADED_FUNCTION 1
57 # define NDBJTIE_USE_WRAPPED_VARIANT_FOR_FUNCTION 1
58 #else
59 
60 // workaround for Sun Studio compilers (disambiguation of overloads)
61 // (Studio 12.1 = 5.10):
62 #if defined(__SUNPRO_CC)
63 //# if (__SUNPRO_CC == 0x510)
64 # define NDBJTIE_USE_WRAPPED_VARIANT_FOR_CONST_OVERLOADED_FUNCTION 1
65 //# endif
66 #endif
67 // workaround for MS Visual Studio compilers (disambiguation of overloads)
68 // (VC7 = VS2003 = 1310, VC8 = VS2005 = 1400, VC9 = VS2008 = 1500, ...?):
69 #if defined(_MSC_VER)
70 //# if (1300 <= _MSC_VER) && (_MSC_VER <= 1600)
71 # define NDBJTIE_USE_WRAPPED_VARIANT_FOR_OVERLOADED_FUNCTION 1
72 # define NDBJTIE_USE_WRAPPED_VARIANT_FOR_CONST_OVERLOADED_FUNCTION 1
73 //# endif
74 #endif
75 
76 #endif
77 
78 // XXX: document why clearing cdelegate in wrapper object upon delete
79 #define JTIE_OBJECT_CLEAR_ADDRESS_UPON_DELETE 1
80 
81 // ---------------------------------------------------------------------------
82 
83 #endif // ndbjtie_defs_hpp