Photon Quantum 3.0.0

Public Member Functions | Static Public Member Functions | Properties | List of all members
Quantum.Mask256 Struct Reference

Mask256 is a 256-bit mask that can be used to store 256 boolean values. More...

Inherits IEquatable< Mask256 >.

Public Member Functions

 Mask256 (long a, long b=0, long c=0, long d=0)
 Creates a new mask with specified initial values. More...
 
void Clear ()
 Sets all bits to 0. More...
 
bool Equals (Mask256 other)
 Returns true if the masks are equal. More...
 
override bool Equals (object obj)
 Returns true if the masks are equal. More...
 
bool GetBit (int bitIndex)
 Returns a specific bit from the mask. More...
 
override int GetHashCode ()
 Calculates the hash code of the mask. More...
 
bool IsNothing ()
 Returns true if the mask is empty. More...
 
void SetBit (int bitIndex, bool set)
 Sets a specific bit in the mask. More...
 
override string ToString ()
 Converts the mask to a string in the form of "a:b:c:d". More...
 

Static Public Member Functions

static implicit operator long (Mask256 mask)
 Equivalent to More...
 
static implicit operator Mask256 (long value)
 Converts a long value to a mask. More...
 
static Mask256 operator& (Mask256 a, Mask256 b)
 Performs a logical-AND operation. More...
 
static Mask256 operator| (Mask256 a, Mask256 b)
 Performs a logical-OR operation. More...
 
static Mask256 operator~ (Mask256 a)
 Performs a logical-NOT operation. More...
 

Properties

long this[int i] [get, set]
 Returns selected 64-bit value from the mask. More...
 

Detailed Description

Mask256 is a 256-bit mask that can be used to store 256 boolean values.

Constructor & Destructor Documentation

◆ Mask256()

Quantum.Mask256.Mask256 ( long  a,
long  b = 0,
long  c = 0,
long  d = 0 
)
inline

Creates a new mask with specified initial values.

Member Function Documentation

◆ Clear()

void Quantum.Mask256.Clear ( )
inline

Sets all bits to 0.

◆ SetBit()

void Quantum.Mask256.SetBit ( int  bitIndex,
bool  set 
)
inline

Sets a specific bit in the mask.

◆ GetBit()

bool Quantum.Mask256.GetBit ( int  bitIndex)
inline

Returns a specific bit from the mask.

◆ operator long()

static implicit Quantum.Mask256.operator long ( Mask256  mask)
inlinestatic

Equivalent to

mask[0]

◆ operator Mask256()

static implicit Quantum.Mask256.operator Mask256 ( long  value)
inlinestatic

Converts a long value to a mask.

◆ operator&()

static Mask256 Quantum.Mask256.operator& ( Mask256  a,
Mask256  b 
)
inlinestatic

Performs a logical-AND operation.

◆ operator|()

static Mask256 Quantum.Mask256.operator| ( Mask256  a,
Mask256  b 
)
inlinestatic

Performs a logical-OR operation.

◆ operator~()

static Mask256 Quantum.Mask256.operator~ ( Mask256  a)
inlinestatic

Performs a logical-NOT operation.

◆ Equals() [1/2]

override bool Quantum.Mask256.Equals ( object  obj)
inline

Returns true if the masks are equal.

◆ GetHashCode()

override int Quantum.Mask256.GetHashCode ( )
inline

Calculates the hash code of the mask.

◆ Equals() [2/2]

bool Quantum.Mask256.Equals ( Mask256  other)
inline

Returns true if the masks are equal.

◆ IsNothing()

bool Quantum.Mask256.IsNothing ( )
inline

Returns true if the mask is empty.

Returns

◆ ToString()

override string Quantum.Mask256.ToString ( )
inline

Converts the mask to a string in the form of "a:b:c:d".

Property Documentation

◆ this[int i]

long Quantum.Mask256.this[int i]
getset

Returns selected 64-bit value from the mask.

Parameters
i