From b0f9d97e5ee70b999b2774ae747791560297dffb Mon Sep 17 00:00:00 2001 From: yumetodo Date: Mon, 14 Mar 2016 15:43:30 +0900 Subject: [PATCH] =?UTF-8?q?bel=E3=82=AF=E3=83=A9=E3=82=B9=E3=81=AE?= =?UTF-8?q?=E4=BD=9C=E6=88=90=E9=96=8B=E5=A7=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- dxlibex/basic_types.hpp | 1 + dxlibex/basic_types/bel.hpp | 24 ++++++++++++++++++++++++ dxlibex/type_traits.hpp | 1 + dxlibex/type_traits/is_ratio.hpp | 17 +++++++++++++++++ 4 files changed, 43 insertions(+) create mode 100644 dxlibex/basic_types/bel.hpp create mode 100644 dxlibex/type_traits/is_ratio.hpp diff --git a/dxlibex/basic_types.hpp b/dxlibex/basic_types.hpp index 2aaa240..7e6160d 100644 --- a/dxlibex/basic_types.hpp +++ b/dxlibex/basic_types.hpp @@ -11,6 +11,7 @@ #include "dxlibex/basic_types/point3d.hpp" #include "dxlibex/basic_types/size.hpp" #include "dxlibex/basic_types/tchar.hpp" +#include "dxlibex/basic_types/bel.hpp" namespace dxle { //operators betwin point_c and size_c diff --git a/dxlibex/basic_types/bel.hpp b/dxlibex/basic_types/bel.hpp new file mode 100644 index 0000000..fe7e15f --- /dev/null +++ b/dxlibex/basic_types/bel.hpp @@ -0,0 +1,24 @@ +/*============================================================================= +Copyright (C) 2015-2016 DxLibEx project +https://github.com/Nagarei/DxLibEx/ + +Distributed under the Boost Software License, Version 1.0. +(See http://www.boost.org/LICENSE_1_0.txt) +=============================================================================*/ +#ifndef DXLE_INC_BASIC_TYPES_BEL_HPP_ +#define DXLE_INC_BASIC_TYPES_BEL_HPP_ +#include +#include +#include +#include "dxlibex/type_traits/is_ratio.hpp" +#include "dxlibex/type_traits/enable_if.hpp" +namespace dxle { + typedef std::ratio<1, 10000> myrio; + namespace sound_units { + template::value, nullptr_t> = nullptr> + class bel { + + }; + } +} +#endif //DXLE_INC_BASIC_TYPES_BEL_HPP_ diff --git a/dxlibex/type_traits.hpp b/dxlibex/type_traits.hpp index ef250e7..493e78e 100644 --- a/dxlibex/type_traits.hpp +++ b/dxlibex/type_traits.hpp @@ -17,5 +17,6 @@ #include "dxlibex/type_traits/is_nothrow.hpp" #include "dxlibex/type_traits/is_representable.hpp" #include "dxlibex/type_traits/is_well_format.hpp" +#include "dxlibex/type_traits/is_ratio.hpp" #endif//#ifndef DXLE_INC_TYPE_TRAITS_HPP_ diff --git a/dxlibex/type_traits/is_ratio.hpp b/dxlibex/type_traits/is_ratio.hpp new file mode 100644 index 0000000..4a656b2 --- /dev/null +++ b/dxlibex/type_traits/is_ratio.hpp @@ -0,0 +1,17 @@ +/*============================================================================= +Copyright (C) 2015-2016 DxLibEx project +https://github.com/Nagarei/DxLibEx/ + +Distributed under the Boost Software License, Version 1.0. +(See http://www.boost.org/LICENSE_1_0.txt) +=============================================================================*/ +#ifndef DXLE_INC_TYPE_TRAITS_IS_RATIO_HPP_ +#define DXLE_INC_TYPE_TRAITS_IS_RATIO_HPP_ +#include +#include +#include +namespace dxle { + template struct is_ratio : std::false_type {}; + template struct is_ratio> : std::true_type {}; +} +#endif //DXLE_INC_TYPE_TRAITS_IS_RATIO_HPP_