Twitch SDK (Internal)
Public Member Functions | Private Attributes | List of all members
ttv::json::EnumMapping< EnumType > Class Template Reference

#include <jsonserialization.h>

Public Member Functions

constexpr EnumMapping (const char *string, EnumType value)
 
template<typename InputType >
constexpr bool Match (const InputType &type) const
 
constexpr EnumType GetValue () const
 
constexpr const char * GetString () const
 

Private Attributes

const char * mString
 
EnumType mValue
 

Detailed Description

template<typename EnumType>
class ttv::json::EnumMapping< EnumType >

A class used by EnumDescriptions to indicate how a particular string appearing in JSON corresponds to an enumeration value. Instantiating these objects directly is not recommended. Instead, use the make_enum_mapping function instead.

Constructor & Destructor Documentation

◆ EnumMapping()

template<typename EnumType >
constexpr ttv::json::EnumMapping< EnumType >::EnumMapping ( const char *  string,
EnumType  value 
)
inline

Member Function Documentation

◆ GetString()

template<typename EnumType >
constexpr const char* ttv::json::EnumMapping< EnumType >::GetString ( ) const
inline

◆ GetValue()

template<typename EnumType >
constexpr EnumType ttv::json::EnumMapping< EnumType >::GetValue ( ) const
inline

◆ Match()

template<typename EnumType >
template<typename InputType >
constexpr bool ttv::json::EnumMapping< EnumType >::Match ( const InputType &  type) const
inline

Member Data Documentation

◆ mString

template<typename EnumType >
const char* ttv::json::EnumMapping< EnumType >::mString
private

◆ mValue

template<typename EnumType >
EnumType ttv::json::EnumMapping< EnumType >::mValue
private

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