Mountain
1.0.0
Simple C++ 2D Game Framework
|
Defines utilities for meta programming and template manipulation. More...
#include "Mountain/core.hpp"
#include <map>
#include <type_traits>
#include <Maths/quaternion.hpp>
#include <Maths/vector2.hpp>
#include <Maths/vector3.hpp>
#include "Mountain/utils/concepts.hpp"
Go to the source code of this file.
Classes | |
class | Mountain::Pointer< T > |
Custom Mountain smart pointer. Represents both a std::shared_ptr and a std::weak_ptr . More... | |
class | Mountain::List< T > |
A dynamic array implementation. Wrapper around the std::vector class. More... | |
Namespaces | |
Mountain | |
Contains all declarations of the Mountain Framework. | |
Meta | |
Defines utilities for meta programming and template manipulation. | |
Typedefs | |
template<bool_t Test> | |
using | Mountain::Meta::EnableIf = std::enable_if_t< Test > |
template<typename T > | |
using | Mountain::Meta::RemoveArraySpecifier = std::remove_extent_t< T > |
Removes the array specification from T . More... | |
template<typename T > | |
using | Mountain::Meta::RemovePointerSpecifier = std::remove_pointer_t< T > |
Removes the pointer specification from T . More... | |
template<typename T > | |
using | Mountain::Meta::RemoveConstSpecifier = std::remove_const_t< T > |
Removes the const specification from T . More... | |
template<Concepts::EnumT T> | |
using | Mountain::Meta::UnderlyingEnumType = std::underlying_type_t< T > |
template<Concepts::EnumT T> | |
using | Mountain::Meta::Flags = UnderlyingEnumType< T > |
Variables | |
template<typename Base , typename Derived > | |
constexpr bool_t | Mountain::Meta::IsBaseOf = std::is_base_of_v<Base, Derived> |
Checks whether Derived is a derived class of Base . More... | |
template<typename A , typename B > | |
constexpr bool_t | Mountain::Meta::IsSame = std::is_same_v<A, B> |
Checks whether A and B are the same type. More... | |
template<typename T , typename... Other> | |
constexpr bool_t | Mountain::Meta::IsAny = (std::is_same_v<T, Other> || ...) |
Checks whether T is any of the provided types in Other . More... | |
template<typename T > | |
constexpr bool_t | Mountain::Meta::IsArray = std::is_array_v<T> |
Checks whether T is an array. More... | |
template<typename T > | |
constexpr bool_t | Mountain::Meta::IsPointer = std::is_pointer_v<T> |
Checks whether T is a pointer. More... | |
template<typename T > | |
constexpr bool_t | Mountain::Meta::IsClass = std::is_class_v<T> |
Checks whether T is a class. More... | |
template<typename T > | |
constexpr bool_t | Mountain::Meta::IsEnum = std::is_enum_v<T> |
Checks whether T is an enum. More... | |
template<typename T > | |
constexpr bool_t | Mountain::Meta::IsIntegral = std::is_integral_v<T> |
Checks whether T is an integral type. More... | |
template<typename T > | |
constexpr bool_t | Mountain::Meta::IsFloatingPoint = std::is_floating_point_v<T> |
Checks whether T is a floating type. More... | |
template<typename T > | |
constexpr bool_t | Mountain::Meta::IsAbstract = std::is_abstract_v<T> |
Checks whether T is an abstract class. More... | |
template<typename T > | |
constexpr bool_t | Mountain::Meta::IsDefaultConstructible = std::is_default_constructible_v<T> |
Checks whether T is default constructible (has a public constructor, with no parameters) More... | |
template<typename T > | |
constexpr bool_t | Mountain::Meta::IsCopyAssignable = std::is_copy_assignable_v<T> |
Checks whether T can be copied without semantics. More... | |
template<typename > | |
constexpr bool_t | Mountain::Meta::IsStdVector = false |
Checks whether the type is a std::vector . | |
template<typename > | |
constexpr bool_t | Mountain::Meta::IsStdFunction = false |
Checks whether the type is a std::vector . | |
template<typename > | |
constexpr bool_t | Mountain::Meta::IsStdMap = false |
Checks whether the type is a std::vector . | |
template<typename > | |
constexpr bool_t | Mountain::Meta::IsMountainList = false |
Checks whether the type is a List. | |
template<typename T > | |
constexpr bool_t | Mountain::Meta::IsMountainList< List< T > > = true |
template<typename > | |
constexpr bool_t | Mountain::Meta::IsMountainPointer = false |
Checks whether the type is a Pointer. | |
template<typename T > | |
constexpr bool_t | Mountain::Meta::IsNativeType = IsAny<T, uint8_t, int8_t, uint16_t, int16_t, uint32_t, int32_t, uint64_t, int64_t, float_t, double_t, bool_t> |
Checks if T is a native type. More... | |
template<typename T > | |
constexpr bool_t | Mountain::Meta::IsIntegralOrFloating = IsAny<T, uint8_t, int8_t, uint16_t, int16_t, uint32_t, int32_t, uint64_t, int64_t, float_t, double_t> |
Checks if T is an integral or a floating type. More... | |
template<typename T > | |
constexpr bool_t | Mountain::Meta::IsMathType = IsAny<T, Vector2, Vector2i, Vector3, Vector4, Quaternion> |
Checks if T is a math type. More... | |
template<typename T > | |
constexpr bool_t | Mountain::Meta::IsColorType = IsAny<T, Color, ColorHsva> |
Checks if T is a color type. More... | |
Defines utilities for meta programming and template manipulation.
Definition in file meta_programming.hpp.
using Mountain::Meta::RemoveArraySpecifier = typedef std::remove_extent_t<T> |
Removes the array specification from T
.
e.g. if T
was int
[4], then RemoveArraySpecifier<T>
will be int
Definition at line 102 of file meta_programming.hpp.
using Mountain::Meta::RemoveConstSpecifier = typedef std::remove_const_t<T> |
Removes the const specification from T
.
e.g. if T
was const
int, then RemoveConstSpecifier<T>
will be int
Definition at line 116 of file meta_programming.hpp.
using Mountain::Meta::RemovePointerSpecifier = typedef std::remove_pointer_t<T> |
Removes the pointer specification from T
.
e.g. if T
was int*
, then RemovePointerSpecifier<T>
will be int
Definition at line 109 of file meta_programming.hpp.
constexpr bool_t Mountain::Meta::IsAbstract = std::is_abstract_v<T> |
Checks whether T
is an abstract class.
T | Type |
Definition at line 82 of file meta_programming.hpp.
constexpr bool_t Mountain::Meta::IsAny = (std::is_same_v<T, Other> || ...) |
Checks whether T
is any of the provided types in Other
.
T | Type |
Other | Other types |
Definition at line 47 of file meta_programming.hpp.
constexpr bool_t Mountain::Meta::IsArray = std::is_array_v<T> |
Checks whether T
is an array.
T | Type |
Definition at line 52 of file meta_programming.hpp.
constexpr bool_t Mountain::Meta::IsBaseOf = std::is_base_of_v<Base, Derived> |
Checks whether Derived
is a derived class of Base
.
Base | Base class |
Derived | Derived class |
Definition at line 35 of file meta_programming.hpp.
constexpr bool_t Mountain::Meta::IsClass = std::is_class_v<T> |
Checks whether T
is a class.
T | Type |
Definition at line 62 of file meta_programming.hpp.
constexpr bool_t Mountain::Meta::IsColorType = IsAny<T, Color, ColorHsva> |
Checks if T is a color type.
A color type is one of the following types:
T | Type |
Definition at line 208 of file meta_programming.hpp.
constexpr bool_t Mountain::Meta::IsCopyAssignable = std::is_copy_assignable_v<T> |
Checks whether T
can be copied without semantics.
T | Type |
Definition at line 92 of file meta_programming.hpp.
constexpr bool_t Mountain::Meta::IsDefaultConstructible = std::is_default_constructible_v<T> |
Checks whether T
is default constructible (has a public constructor, with no parameters)
T | Type |
Definition at line 87 of file meta_programming.hpp.
constexpr bool_t Mountain::Meta::IsEnum = std::is_enum_v<T> |
Checks whether T
is an enum.
T | Type |
Definition at line 67 of file meta_programming.hpp.
constexpr bool_t Mountain::Meta::IsFloatingPoint = std::is_floating_point_v<T> |
Checks whether T
is a floating type.
T | Type |
Definition at line 77 of file meta_programming.hpp.
constexpr bool_t Mountain::Meta::IsIntegral = std::is_integral_v<T> |
Checks whether T
is an integral type.
T | Type |
Definition at line 72 of file meta_programming.hpp.
constexpr bool_t Mountain::Meta::IsIntegralOrFloating = IsAny<T, uint8_t, int8_t, uint16_t, int16_t, uint32_t, int32_t, uint64_t, int64_t, float_t, double_t> |
Checks if T is an integral or a floating type.
A int/float type is one of the following types:
T | Type |
Definition at line 185 of file meta_programming.hpp.
constexpr bool_t Mountain::Meta::IsMathType = IsAny<T, Vector2, Vector2i, Vector3, Vector4, Quaternion> |
Checks if T is a math type.
A math type is one of the following types:
T | Type |
Definition at line 198 of file meta_programming.hpp.
constexpr bool_t Mountain::Meta::IsNativeType = IsAny<T, uint8_t, int8_t, uint16_t, int16_t, uint32_t, int32_t, uint64_t, int64_t, float_t, double_t, bool_t> |
Checks if T is a native type.
A native type is one of the following types:
T | Type |
Definition at line 169 of file meta_programming.hpp.
constexpr bool_t Mountain::Meta::IsPointer = std::is_pointer_v<T> |
Checks whether T
is a pointer.
T | Type |
Definition at line 57 of file meta_programming.hpp.
constexpr bool_t Mountain::Meta::IsSame = std::is_same_v<A, B> |
Checks whether A
and B
are the same type.
A | First type |
B | Second type |
Definition at line 41 of file meta_programming.hpp.