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

A set of colors represented as a bitset. More...

#include <color_set.hpp>

Public Member Functions

 ColorSet ()=default
 
bool test (ColorIndex index) const
 
void set (ColorIndex index, bool value=true)
 
void reset (ColorIndex index)
 
const std::bitset< num_colors > & colors () const
 
bool operator== (const ColorSet &other) const =default
 

Detailed Description

A set of colors represented as a bitset.

ColorSet tracks which colors are present in a set using a fixed-size bitset. Each bit position corresponds to a specific color index.

Definition at line 26 of file color_set.hpp.

Constructor & Destructor Documentation

◆ ColorSet()

porytiles::ColorSet::ColorSet ( )
default

Member Function Documentation

◆ colors()

const std::bitset< num_colors > & porytiles::ColorSet::colors ( ) const
inline

Definition at line 36 of file color_set.hpp.

◆ operator==()

bool porytiles::ColorSet::operator== ( const ColorSet other) const
default

◆ reset()

void porytiles::ColorSet::reset ( ColorIndex  index)

Definition at line 15 of file color_set.cpp.

◆ set()

void porytiles::ColorSet::set ( ColorIndex  index,
bool  value = true 
)

Definition at line 10 of file color_set.cpp.

◆ test()

bool porytiles::ColorSet::test ( ColorIndex  index) const

Definition at line 5 of file color_set.cpp.


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