OpenShot Audio Library | OpenShotAudio 0.4.0
 
Loading...
Searching...
No Matches
juce::TypeHelpers Namespace Reference

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>
 

Detailed Description

This namespace contains a few template classes for helping work out class type variations.


Class Documentation

◆ juce::TypeHelpers::ParameterType

struct juce::TypeHelpers::ParameterType
template<typename Type>
struct juce::TypeHelpers::ParameterType< Type >

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&

◆ juce::TypeHelpers::ParameterType< bool >

struct juce::TypeHelpers::ParameterType< bool >

Definition at line 767 of file juce_MathsFunctions.h.

Class Members
typedef const bool & type
typedef bool type bool

◆ juce::TypeHelpers::ParameterType< char >

struct juce::TypeHelpers::ParameterType< char >

Definition at line 757 of file juce_MathsFunctions.h.

Class Members
typedef const char & type
typedef char type char

◆ juce::TypeHelpers::ParameterType< double >

struct juce::TypeHelpers::ParameterType< double >

Definition at line 769 of file juce_MathsFunctions.h.

Class Members
typedef const double & type
typedef double type double

◆ juce::TypeHelpers::ParameterType< float >

struct juce::TypeHelpers::ParameterType< float >

Definition at line 768 of file juce_MathsFunctions.h.

Class Members
typedef const float & type
typedef float type float

◆ juce::TypeHelpers::ParameterType< int >

struct juce::TypeHelpers::ParameterType< int >

Definition at line 761 of file juce_MathsFunctions.h.

Class Members
typedef const int & type
typedef int type int

◆ juce::TypeHelpers::ParameterType< int64 >

struct juce::TypeHelpers::ParameterType< int64 >

Definition at line 765 of file juce_MathsFunctions.h.

Class Members
typedef const int64 & type
typedef int64 type int64

◆ juce::TypeHelpers::ParameterType< long >

struct juce::TypeHelpers::ParameterType< long >

Definition at line 763 of file juce_MathsFunctions.h.

Class Members
typedef const long & type
typedef long type long

◆ juce::TypeHelpers::ParameterType< short >

struct juce::TypeHelpers::ParameterType< short >

Definition at line 759 of file juce_MathsFunctions.h.

Class Members
typedef const short & type
typedef short type short

◆ juce::TypeHelpers::ParameterType< Type & >

struct juce::TypeHelpers::ParameterType< Type & >
template<typename Type>
struct juce::TypeHelpers::ParameterType< Type & >

Definition at line 755 of file juce_MathsFunctions.h.

Class Members
typedef const Type & type
typedef Type & type Type&

◆ juce::TypeHelpers::ParameterType< Type * >

struct juce::TypeHelpers::ParameterType< Type * >
template<typename 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*

◆ juce::TypeHelpers::ParameterType< uint64 >

struct juce::TypeHelpers::ParameterType< uint64 >

Definition at line 766 of file juce_MathsFunctions.h.

Class Members
typedef const uint64 & type
typedef uint64 type uint64

◆ juce::TypeHelpers::ParameterType< unsigned char >

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

◆ juce::TypeHelpers::ParameterType< unsigned int >

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

◆ juce::TypeHelpers::ParameterType< unsigned long >

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

◆ juce::TypeHelpers::ParameterType< unsigned short >

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

◆ juce::TypeHelpers::UnsignedTypeWithSize

struct juce::TypeHelpers::UnsignedTypeWithSize
template<int bytes>
struct juce::TypeHelpers::UnsignedTypeWithSize< bytes >

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.

◆ juce::TypeHelpers::UnsignedTypeWithSize< 1 >

struct juce::TypeHelpers::UnsignedTypeWithSize< 1 >

Definition at line 788 of file juce_MathsFunctions.h.

Class Members
typedef uint8 type uint8

◆ juce::TypeHelpers::UnsignedTypeWithSize< 2 >

struct juce::TypeHelpers::UnsignedTypeWithSize< 2 >

Definition at line 789 of file juce_MathsFunctions.h.

Class Members
typedef uint16 type uint16

◆ juce::TypeHelpers::UnsignedTypeWithSize< 4 >

struct juce::TypeHelpers::UnsignedTypeWithSize< 4 >

Definition at line 790 of file juce_MathsFunctions.h.

Class Members
typedef uint32 type uint32

◆ juce::TypeHelpers::UnsignedTypeWithSize< 8 >

struct juce::TypeHelpers::UnsignedTypeWithSize< 8 >

Definition at line 791 of file juce_MathsFunctions.h.

Class Members
typedef uint64 type uint64

Typedef Documentation

◆ SmallestFloatType

template<typename Type>
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.