OpenShot Library | libopenshot-audio  0.2.0
juce::TypeHelpers Namespace Reference

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

Classes

struct  ParameterType
 The ParameterType struct is used to find the best type to use when passing some kind of object as a parameter. More...
 
struct  SmallestFloatType
 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. More...
 
struct  UnsignedTypeWithSize
 These templates are designed to take an integer type, and return an unsigned int version with the same size. More...
 

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 654 of file juce_MathsFunctions.h.

Class Members
typedef const Type & type

◆ juce::TypeHelpers::SmallestFloatType

struct juce::TypeHelpers::SmallestFloatType

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

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 679 of file juce_MathsFunctions.h.

Class Members
typedef float type

◆ 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 690 of file juce_MathsFunctions.h.