Porytiles
Loading...
Searching...
No Matches
porytiles::PaletteIndex Class Reference

Represents a palette index value within a particular palette. More...

#include <palette_index.hpp>

Public Member Functions

 PaletteIndex (std::size_t value)
 
auto operator<=> (const PaletteIndex &) const =default
 
 operator const std::size_t & () const &
 
 operator std::size_t && () &&
 
const std::size_t & value () const &
 
std::size_t && value () &&
 
std::size_t index () const
 

Detailed Description

Represents a palette index value within a particular palette.

PaletteIndex is a semantic wrapper around an unsigned integer that represents an index into a palette (or palette-like configuration file).

Invariant
The underlying index value will always be between 0 and 15.

Definition at line 23 of file palette_index.hpp.

Constructor & Destructor Documentation

◆ PaletteIndex()

porytiles::PaletteIndex::PaletteIndex ( std::size_t  value)
inline

Definition at line 26 of file palette_index.hpp.

Member Function Documentation

◆ index()

std::size_t porytiles::PaletteIndex::index ( ) const
inline

Definition at line 57 of file palette_index.hpp.

◆ operator const std::size_t &()

porytiles::PaletteIndex::operator const std::size_t & ( ) const &
inline

Definition at line 36 of file palette_index.hpp.

◆ operator std::size_t &&()

porytiles::PaletteIndex::operator std::size_t && ( ) &&
inline

Definition at line 42 of file palette_index.hpp.

◆ operator<=>()

auto porytiles::PaletteIndex::operator<=> ( const PaletteIndex ) const
default

◆ value() [1/2]

std::size_t && porytiles::PaletteIndex::value ( ) &&
inline

Definition at line 52 of file palette_index.hpp.

◆ value() [2/2]

const std::size_t & porytiles::PaletteIndex::value ( ) const &
inline

Definition at line 47 of file palette_index.hpp.


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