System::Collections::BitArray::Reference Class Reference

Reference class to allow treating BitArray elements in contexts where bool is required. More...

Public Member Functions

 ~Reference ()
 Deletes reference. More...
 
 operator bool () const
 
bool operator~ () const
 
Referenceoperator= (bool value)
 
Referenceoperator= (const Reference &reference)
 
Referenceoperator|= (bool value)
 
Referenceoperator&= (bool value)
 
Referenceoperator^= (bool value)
 
Referenceoperator-= (bool value)
 

Detailed Description

Reference class to allow treating BitArray elements in contexts where bool is required.

Constructor & Destructor Documentation

◆ ~Reference()

System::Collections::BitArray::Reference::~Reference ( )

Deletes reference.

Member Function Documentation

◆ operator bool()

System::Collections::BitArray::Reference::operator bool ( ) const

Converts referenced value to bool.

Returns
true if bit is non-zero, false otherwise.

◆ operator&=()

Reference& System::Collections::BitArray::Reference::operator &= ( bool  value)

Assignment end operator.

Parameters
valueRHS operand.
Returns
This reference.

◆ operator-=()

Reference& System::Collections::BitArray::Reference::operator-= ( bool  value)

Assignment substraction operator.

Parameters
valueRHS operand.
Returns
This reference.

◆ operator=() [1/2]

Reference& System::Collections::BitArray::Reference::operator= ( bool  value)

Sets referenced bit value.

Parameters
valueto set.
Returns
This reference.

◆ operator=() [2/2]

Reference& System::Collections::BitArray::Reference::operator= ( const Reference reference)

Copies bit value.

Parameters
referenceReference to source bit.
Returns
This reference.

◆ operator^=()

Reference& System::Collections::BitArray::Reference::operator^= ( bool  value)

Assignment xor operator.

Parameters
valueRHS operand.
Returns
This reference.

◆ operator|=()

Reference& System::Collections::BitArray::Reference::operator|= ( bool  value)

Assignment or operator.

Parameters
valueRHS operand.
Returns
This reference.

◆ operator~()

bool System::Collections::BitArray::Reference::operator~ ( ) const

Inverts referenced value.

Returns
true if bit is zero, false otherwise.