TinyLib 0.1.1
Loading...
Searching...
No Matches
tl::Bitset Class Reference

#include <Bitset.h>

Public Member Functions

 Bitset ()
 
 ~Bitset ()
 
void set (u8, bit)
 Set the bit at index to value.
 
bit get (u8) const
 Get the value of the bit at index.
 
void flip (u8)
 Flip bit at index. True if false, false if true.
 
void reset (bit=false)
 Reset all bits in the bitset to off by default.
 

Detailed Description

Definition at line 7 of file Bitset.h.

Constructor & Destructor Documentation

◆ Bitset()

tl::Bitset::Bitset ( )

Definition at line 4 of file Bitset.cpp.

◆ ~Bitset()

tl::Bitset::~Bitset ( )

Definition at line 10 of file Bitset.cpp.

Member Function Documentation

◆ flip()

void tl::Bitset::flip ( u8 index)

Flip bit at index. True if false, false if true.

Parameters
indexWhich bit to flip.

Definition at line 40 of file Bitset.cpp.

◆ get()

tl::bit tl::Bitset::get ( u8 index) const

Get the value of the bit at index.

Parameters
indexWhich bit to get.
Returns
If this bit is true or false.

Definition at line 32 of file Bitset.cpp.

◆ reset()

void tl::Bitset::reset ( tl::bit value = false)

Reset all bits in the bitset to off by default.

Parameters
valueTrue or false what the bitset is reset to.

Definition at line 48 of file Bitset.cpp.

◆ set()

void tl::Bitset::set ( u8 index,
bit value )

Set the bit at index to value.

Parameters
indexWhich bit will be set.
valueTrue/false for the bit.

Definition at line 19 of file Bitset.cpp.


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