The Battle for Wesnoth  1.15.3+dev
types.hpp
Go to the documentation of this file.
1 //
2 // M A R I A D B + +
3 //
4 // Copyright Sylvain Rochette Langlois 2013,
5 // The ViaDuck Project 2016 - 2018.
6 // Distributed under the Boost Software License, Version 1.0.
7 // (See accompanying file LICENSE or copy at
8 // http://www.boost.org/LICENSE_1_0.txt)
9 
10 #ifndef _MARIADB_TYPES_HPP_
11 #define _MARIADB_TYPES_HPP_
12 
13 #include <mysql.h>
14 #include <memory>
15 
16 namespace mariadb {
17  //
18  // Default types
19  //
20  typedef unsigned char u8;
21  typedef unsigned short u16;
22  typedef unsigned int u32;
23  typedef signed char s8;
24  typedef signed short s16;
25  typedef signed int s32;
26  typedef float f32;
27  typedef double f64;
28  typedef long double f128;
29 
30  #if defined(_MSC_VER) || defined(__BORLANDC__)
31  typedef unsigned __int64 u64;
32  typedef signed __int64 s64;
33  #else
34  typedef unsigned long long u64;
35  typedef signed long long s64;
36  #endif
37 
38  typedef u64 handle;
39 
40  //
41  // Value type
42  //
43  namespace value {
44  enum type {
45  null = 0,
65  };
66  }
67 
68  //
69  // Isolation level
70  //
71  namespace isolation {
73  }
74 
75  //
76  // Stream
77  //
78  typedef std::shared_ptr<std::istream> stream_ref;
79 }
80 
81 #if !defined(MARIADB_BASE_VERSION) && MYSQL_VERSION_ID > 80000
82 // Assume MySQL Community 8.0+
83 typedef bool my_bool;
84 #endif
85 
86 #endif
signed int s32
Definition: types.hpp:25
double f64
Definition: types.hpp:27
float f32
Definition: types.hpp:26
std::shared_ptr< std::istream > stream_ref
Definition: types.hpp:78
long double f128
Definition: types.hpp:28
u64 handle
Definition: types.hpp:38
unsigned char u8
Definition: types.hpp:20
unsigned short u16
Definition: types.hpp:21
signed long long s64
Definition: types.hpp:35
signed short s16
Definition: types.hpp:24
unsigned long long u64
Definition: types.hpp:34
unsigned int u32
Definition: types.hpp:22
signed char s8
Definition: types.hpp:23