Photon Quantum 3.0.0

Public Member Functions | Public Attributes | Properties | List of all members
Quantum.BitSetRef Struct Reference

A variable sized bitmask. More...

Public Member Functions

 BitSetRef (ulong *bits, int bitsSize)
 Create a bitmask with the given bits and size. More...
 
void Clear (Int32 bit)
 Remove the bit from the bitmask. More...
 
void ClearAll ()
 Clear all bits in the bitmask. More...
 
Boolean IsSet (Int32 bit)
 Check if a bit is set in the bitmask. More...
 
void Set (Int32 bit)
 Set a bit in the bitmask. More...
 

Public Attributes

readonly ulong * Bits
 The unsinged long array that holds the bits. More...
 
readonly int BitsSize
 The number of bit that the bitmask can hold. More...
 

Properties

Int32 Length [get]
 Returns the size of the bitmask More...
 

Detailed Description

A variable sized bitmask.

Constructor & Destructor Documentation

◆ BitSetRef()

Quantum.BitSetRef.BitSetRef ( ulong *  bits,
int  bitsSize 
)
inline

Create a bitmask with the given bits and size.

Parameters
bitsThe ulong array to save the bit information
bitsSizeThe maximum bit index of the bitmask

Member Function Documentation

◆ Set()

void Quantum.BitSetRef.Set ( Int32  bit)
inline

Set a bit in the bitmask.

Parameters
bitBit index, must be less than Length

◆ Clear()

void Quantum.BitSetRef.Clear ( Int32  bit)
inline

Remove the bit from the bitmask.

Parameters
bitBit to remove, must be less than Length

◆ ClearAll()

void Quantum.BitSetRef.ClearAll ( )
inline

Clear all bits in the bitmask.

◆ IsSet()

Boolean Quantum.BitSetRef.IsSet ( Int32  bit)
inline

Check if a bit is set in the bitmask.

Parameters
bitBit to check, must be less than Length
Returns

Member Data Documentation

◆ Bits

readonly ulong* Quantum.BitSetRef.Bits

The unsinged long array that holds the bits.

◆ BitsSize

readonly int Quantum.BitSetRef.BitsSize

The number of bit that the bitmask can hold.

Property Documentation

◆ Length

Int32 Quantum.BitSetRef.Length
get

Returns the size of the bitmask