Shaka Player Embedded
shaka::impl::ConvertHelper< T, typename > Struct Template Reference

#include <convert_js.h>

Detailed Description

template<typename T, typename = typename _SelectSpecialTypes<T>::type>
struct shaka::impl::ConvertHelper< T, typename >

A template type that defines two conversion functions to convert between C++ and JavaScript. This should be instantiated with a single type argument for the type being converted (without cv-qualifiers or references). The second template argument is deduced based on the first. It is used to select which specialization to use.

It is fine to add more specializations after this, so long as it appears before it is being used. If the specialization is for a specific type (e.g. MyType), or it is for a templated type (e.g. std::vector<T>), you can just add a new specialization:

template <> struct ConvertHelper<MyType, void> { ... };
// -or-
template <typename T> struct ConvertHelper<std::vector<T>, void> { ... };

If the specialization is for a "category" of types (e.g. numbers, where the type would be T), then you need to add a new identifier and specialization above.

Definition at line 82 of file convert_js.h.


The documentation for this struct was generated from the following file: