The Battle for Wesnoth
1.15.8+dev
modules
mariadbpp
include
mariadb++
decimal.hpp
Go to the documentation of this file.
1
//
2
// M A R I A D B + +
3
//
4
// Copyright The ViaDuck Project 2016 - 2018.
5
// Distributed under the Boost Software License, Version 1.0.
6
// (See accompanying file LICENSE or copy at
7
// http://www.boost.org/LICENSE_1_0.txt)
8
9
#ifndef _MARIADB_DECIMAL_HPP_
10
#define _MARIADB_DECIMAL_HPP_
11
12
#include <string>
13
#include <
mariadb++/types.hpp
>
14
#include <
mariadb++/conversion_helper.hpp
>
15
16
namespace
mariadb
{
17
class
decimal
{
18
public
:
19
explicit
decimal
(
std::string
str
=
""
) :
mStr
(
std
::move(
str
)) { }
20
21
std::string
str
()
const
{
22
return
mStr
;
23
}
24
25
f32
float32
()
const
{
26
return
string_cast
<
f32
>(
mStr
);
27
}
28
29
f64
double64
()
const
{
30
return
string_cast
<
f64
>(
mStr
);
31
}
32
33
private
:
34
std::string
mStr
;
35
};
36
}
37
38
#endif
mariadb::f64
double f64
Definition:
types.hpp:27
mariadb::decimal::double64
f64 double64() const
Definition:
decimal.hpp:29
mariadb
Definition:
account.hpp:18
std
STL namespace.
types.hpp
mariadb::decimal::float32
f32 float32() const
Definition:
decimal.hpp:25
mariadb::f32
float f32
Definition:
types.hpp:26
string_cast
T string_cast(const std::string &str)
Definition:
conversion_helper.hpp:28
conversion_helper.hpp
mariadb::decimal::decimal
decimal(std::string str="")
Definition:
decimal.hpp:19
mariadb::decimal::mStr
std::string mStr
Definition:
decimal.hpp:34
mariadb::value::string
Definition:
types.hpp:51
mariadb::decimal::str
std::string str() const
Definition:
decimal.hpp:21
mariadb::decimal
Definition:
decimal.hpp:17
Generated by
1.8.13