Photon Engine 2.0.0-beta
A physically based renderer.
Loading...
Searching...
No Matches
ph::SdlEnum Class Referenceabstract

Describes enum in SDL. More...

#include <SdlEnum.h>

Inheritance diagram for ph::SdlEnum:
ph::TSdlGeneralEnum< InEnumType, MAX_ENTRIES >

Classes

struct  TEntry
 

Public Types

using Entry = TEntry<int64>
 

Public Member Functions

 SdlEnum (std::string name)
 
virtual Entry getEntry (std::size_t entryIndex) const =0
 
virtual std::size_t numEntries () const =0
 
const std::string & getName () const
 
const std::string & getDescription () const
 
std::string getEntryDescription (std::size_t entryIndex) const
 

Protected Member Functions

SdlEnumsetDescription (std::string description)
 
SdlEnumsetEntryDescription (std::size_t entryIndex, std::string description)
 

Detailed Description

Describes enum in SDL.

Note that it is highly encouraged to follow several conventions while using SDL enum:

  • Define an entry with value = 0 to indicate a default/unspecified state.
  • Define only unique enum entries–no identical enum values or enum names.

Member Typedef Documentation

◆ Entry

using ph::SdlEnum::Entry = TEntry<int64>

Constructor & Destructor Documentation

◆ SdlEnum()

ph::SdlEnum::SdlEnum ( std::string name)
inlineexplicit

Member Function Documentation

◆ getDescription()

const std::string & ph::SdlEnum::getDescription ( ) const
inline

◆ getEntry()

virtual Entry ph::SdlEnum::getEntry ( std::size_t entryIndex) const
pure virtual

◆ getEntryDescription()

std::string ph::SdlEnum::getEntryDescription ( std::size_t entryIndex) const
inline

◆ getName()

const std::string & ph::SdlEnum::getName ( ) const
inline

◆ numEntries()

virtual std::size_t ph::SdlEnum::numEntries ( ) const
pure virtual

◆ setDescription()

SdlEnum & ph::SdlEnum::setDescription ( std::string description)
inlineprotected

◆ setEntryDescription()

SdlEnum & ph::SdlEnum::setEntryDescription ( std::size_t entryIndex,
std::string description )
inlineprotected

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