OpenShot Audio Library | OpenShotAudio: juce::TypeHelpers Namespace Reference

OpenShot Audio Library | OpenShotAudio 0.3.0

Loading...
Searching...
No Matches
Classes
juce::TypeHelpers Namespace Reference

## Classes
struct | ParameterType
struct | SmallestFloatType
struct | UnsignedTypeWithSize

## 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 637 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 662 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 673 of file juce_MathsFunctions.h.