Photon Engine 2.0.0-beta
A physically based renderer.
Loading...
Searching...
No Matches
ph::TSdlEnum< EnumType > Class Template Reference

A helper for accessing SDL enum properties. More...

#include <TSdlEnum.h>

Public Member Functions

EnumType operator[] (std::string_view entryName) const
 Get enum value from its name.
 
std::string_view operator[] (EnumType enumValue) const
 Get enum name from its value.
 

Detailed Description

template<typename EnumType>
class ph::TSdlEnum< EnumType >

A helper for accessing SDL enum properties.

This is a base type without any functionality implemented. Specializations are required to provide implementation for the methods, and this is generally done by providing an enum definition via PH_DEFINE_SDL_ENUM().

Member Function Documentation

◆ operator[]() [1/2]

template<typename EnumType >
std::string_view ph::TSdlEnum< EnumType >::operator[] ( EnumType enumValue) const
inline

Get enum name from its value.

The memory for the view object is backed by the class instance.

◆ operator[]() [2/2]

template<typename EnumType >
EnumType ph::TSdlEnum< EnumType >::operator[] ( std::string_view entryName) const
inline

Get enum value from its name.


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