Classes | |
struct | ParameterType |
struct | ParameterType< bool > |
struct | ParameterType< char > |
struct | ParameterType< double > |
struct | ParameterType< float > |
struct | ParameterType< int > |
struct | ParameterType< int64 > |
struct | ParameterType< long > |
struct | ParameterType< short > |
struct | ParameterType< Type & > |
struct | ParameterType< Type * > |
struct | ParameterType< uint64 > |
struct | ParameterType< unsigned char > |
struct | ParameterType< unsigned int > |
struct | ParameterType< unsigned long > |
struct | ParameterType< unsigned short > |
struct | UnsignedTypeWithSize |
struct | UnsignedTypeWithSize< 1 > |
struct | UnsignedTypeWithSize< 2 > |
struct | UnsignedTypeWithSize< 4 > |
struct | UnsignedTypeWithSize< 8 > |
Typedefs | |
template<typename Type> | |
using | SmallestFloatType = std::conditional_t<std::is_same_v<Type, double>, double, float> |
This namespace contains a few template classes for helping work out class type variations.
struct juce::TypeHelpers::ParameterType |
The ParameterType struct is used to find the best type to use when passing some kind of object as a parameter.
Of course, this is only likely to be useful in certain esoteric template situations.
E.g. "myFunction (typename TypeHelpers::ParameterType<int>::type, typename TypeHelpers::ParameterType<MyObject>::type)" would evaluate to "myfunction (int, const MyObject&)", keeping any primitive types as pass-by-value, but passing objects as a const reference, to avoid copying.
Definition at line 752 of file juce_MathsFunctions.h.
Class Members | ||
---|---|---|
typedef const Type & | type const Type& |
struct juce::TypeHelpers::ParameterType< bool > |
Definition at line 767 of file juce_MathsFunctions.h.
Class Members | ||
---|---|---|
typedef const bool & | type | |
typedef bool | type bool |
struct juce::TypeHelpers::ParameterType< char > |
Definition at line 757 of file juce_MathsFunctions.h.
Class Members | ||
---|---|---|
typedef const char & | type | |
typedef char | type char |
struct juce::TypeHelpers::ParameterType< double > |
Definition at line 769 of file juce_MathsFunctions.h.
Class Members | ||
---|---|---|
typedef const double & | type | |
typedef double | type double |
struct juce::TypeHelpers::ParameterType< float > |
Definition at line 768 of file juce_MathsFunctions.h.
Class Members | ||
---|---|---|
typedef const float & | type | |
typedef float | type float |
struct juce::TypeHelpers::ParameterType< int > |
Definition at line 761 of file juce_MathsFunctions.h.
Class Members | ||
---|---|---|
typedef const int & | type | |
typedef int | type int |
struct juce::TypeHelpers::ParameterType< int64 > |
Definition at line 765 of file juce_MathsFunctions.h.
Class Members | ||
---|---|---|
typedef const int64 & | type | |
typedef int64 | type int64 |
struct juce::TypeHelpers::ParameterType< long > |
Definition at line 763 of file juce_MathsFunctions.h.
Class Members | ||
---|---|---|
typedef const long & | type | |
typedef long | type long |
struct juce::TypeHelpers::ParameterType< short > |
Definition at line 759 of file juce_MathsFunctions.h.
Class Members | ||
---|---|---|
typedef const short & | type | |
typedef short | type short |
struct juce::TypeHelpers::ParameterType< Type & > |
Definition at line 755 of file juce_MathsFunctions.h.
Class Members | ||
---|---|---|
typedef const Type & | type | |
typedef Type & | type Type& |
struct juce::TypeHelpers::ParameterType< Type * > |
Definition at line 756 of file juce_MathsFunctions.h.
Class Members | ||
---|---|---|
typedef const Type & | type | |
typedef Type * | type Type* |
struct juce::TypeHelpers::ParameterType< uint64 > |
Definition at line 766 of file juce_MathsFunctions.h.
Class Members | ||
---|---|---|
typedef const uint64 & | type | |
typedef uint64 | type uint64 |
struct juce::TypeHelpers::ParameterType< unsigned char > |
Definition at line 758 of file juce_MathsFunctions.h.
Class Members | ||
---|---|---|
typedef const unsigned char & | type | |
typedef unsigned char | type unsigned char |
struct juce::TypeHelpers::ParameterType< unsigned int > |
Definition at line 762 of file juce_MathsFunctions.h.
Class Members | ||
---|---|---|
typedef const unsigned int & | type | |
typedef unsigned int | type unsigned int |
struct juce::TypeHelpers::ParameterType< unsigned long > |
Definition at line 764 of file juce_MathsFunctions.h.
Class Members | ||
---|---|---|
typedef const unsigned long & | type | |
typedef unsigned long | type unsigned long |
struct juce::TypeHelpers::ParameterType< unsigned short > |
Definition at line 760 of file juce_MathsFunctions.h.
Class Members | ||
---|---|---|
typedef const unsigned short & | type | |
typedef unsigned short | type unsigned short |
struct juce::TypeHelpers::UnsignedTypeWithSize |
These templates are designed to take an integer type, and return an unsigned int version with the same size.
Definition at line 785 of file juce_MathsFunctions.h.
struct juce::TypeHelpers::UnsignedTypeWithSize< 1 > |
Definition at line 788 of file juce_MathsFunctions.h.
Class Members | ||
---|---|---|
typedef uint8 | type uint8 |
struct juce::TypeHelpers::UnsignedTypeWithSize< 2 > |
Definition at line 789 of file juce_MathsFunctions.h.
Class Members | ||
---|---|---|
typedef uint16 | type uint16 |
struct juce::TypeHelpers::UnsignedTypeWithSize< 4 > |
Definition at line 790 of file juce_MathsFunctions.h.
Class Members | ||
---|---|---|
typedef uint32 | type uint32 |
struct juce::TypeHelpers::UnsignedTypeWithSize< 8 > |
Definition at line 791 of file juce_MathsFunctions.h.
Class Members | ||
---|---|---|
typedef uint64 | type uint64 |
using juce::TypeHelpers::SmallestFloatType = std::conditional_t<std::is_same_v<Type, double>, double, float> |
These templates are designed to take a type, and if it's a double, they return a double type; for anything else, they return a float type.
Definition at line 778 of file juce_MathsFunctions.h.