SPARK  0.1.0
A general purpose game engine written in C++.
Loading...
Searching...
No Matches
BaseType.h
1#pragma once
2
3#include "spark/mpl/typelist.h"
4
5#include "boost/preprocessor/seq/to_tuple.hpp"
6#include "boost/preprocessor/tuple/rem.hpp"
7
8namespace spark::base
9{
10 // BoostPP sequence of all primitive types
11# define SPARK_BASE_ALL_PRIMITIVE_TYPE_SEQ (bool) \
12 (char) \
13 (short) \
14 (int) \
15 (long long) \
16 (unsigned char) \
17 (unsigned short) \
18 (unsigned int) \
19 (unsigned long long) \
20 (float) \
21 (double)
22
23 // BoostPP sequence of all scalar primitive types
24# define SPARK_BASE_ALL_SCALAR_PRIMITIVE_TYPE_SEQ (char) \
25 (short) \
26 (int) \
27 (long long) \
28 (unsigned char) \
29 (unsigned short) \
30 (unsigned int) \
31 (unsigned long long) \
32 (float) \
33 (double)
34
35
36 // BoostPP sequence of all integer types
37# define SPARK_BASE_ALL_INTEGER_PRIMITIVE_TYPE_SEQ (char) \
38 (short) \
39 (int) \
40 (long long) \
41 (unsigned char) \
42 (unsigned short) \
43 (unsigned int) \
44 (unsigned long long)
45
46 // BoostPP sequence of all floating types
47# define SPARK_BASE_ALL_FLOATING_PRIMITIVE_TYPE_SEQ (float)(double)
48
49 using AllPrimitiveTypesList = mpl::typelist<BOOST_PP_TUPLE_REM_CTOR(BOOST_PP_SEQ_TO_TUPLE(SPARK_BASE_ALL_PRIMITIVE_TYPE_SEQ))>;
50 using AllScalarPrimitiveTypesList = mpl::typelist<BOOST_PP_TUPLE_REM_CTOR(BOOST_PP_SEQ_TO_TUPLE(SPARK_BASE_ALL_SCALAR_PRIMITIVE_TYPE_SEQ))>;
51 using AllIntegerPrimitiveTypesList = mpl::typelist<BOOST_PP_TUPLE_REM_CTOR(BOOST_PP_SEQ_TO_TUPLE(SPARK_BASE_ALL_INTEGER_PRIMITIVE_TYPE_SEQ))>;
52 using AllFloatingPrimitiveTypesList = mpl::typelist<BOOST_PP_TUPLE_REM_CTOR(BOOST_PP_SEQ_TO_TUPLE(SPARK_BASE_ALL_FLOATING_PRIMITIVE_TYPE_SEQ))>;
53}