AGX Dynamics  2.35.0.1
agx::BitArray< NUM_BITS >::reference Class Reference

Class which is a reference into an existing bitarray. More...

#include <BitArray.h>

Public Member Functions

 reference (BitArray *array, size_t index)
 
 reference (const reference &other)
 Copy constructor. More...
 
 operator bool () const
 Cast operator to read a referenced value as a bool. More...
 
reference & operator= (const bool val)
 Assignment of a bool value into the bitarray index. More...
 
reference & operator= (const reference &other)
 assignment operator More...
 

Detailed Description

template<size_t NUM_BITS>
class agx::BitArray< NUM_BITS >::reference

Class which is a reference into an existing bitarray.

Definition at line 116 of file BitArray.h.

Constructor & Destructor Documentation

◆ reference() [1/2]

template<size_t NUM_BITS>
agx::BitArray< NUM_BITS >::reference::reference ( BitArray *  array,
size_t  index 
)
inline

Definition at line 119 of file BitArray.h.

◆ reference() [2/2]

template<size_t NUM_BITS>
agx::BitArray< NUM_BITS >::reference::reference ( const reference &  other)
inline

Copy constructor.

Definition at line 147 of file BitArray.h.

Member Function Documentation

◆ operator bool()

template<size_t NUM_BITS>
agx::BitArray< NUM_BITS >::reference::operator bool ( ) const
inline

Cast operator to read a referenced value as a bool.

Returns
value of the referenced bit in the referenced bitarray

Definition at line 128 of file BitArray.h.

References agxAssert1, agx::BitArray< NUM_BITS >::get(), and agx::BitArray< NUM_BITS >::size().

◆ operator=() [1/2]

template<size_t NUM_BITS>
reference& agx::BitArray< NUM_BITS >::reference::operator= ( const bool  val)
inline

Assignment of a bool value into the bitarray index.

Definition at line 138 of file BitArray.h.

References agxAssert1, agx::BitArray< NUM_BITS >::set(), and agx::BitArray< NUM_BITS >::size().

◆ operator=() [2/2]

template<size_t NUM_BITS>
reference& agx::BitArray< NUM_BITS >::reference::operator= ( const reference &  other)
inline

assignment operator

Definition at line 153 of file BitArray.h.


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