Loading...
Searching...
No Matches
PackedList< Width >::reference Class Reference

A reference supporting read/write access to an entry. More...

#include <PackedList.H>

Inheritance diagram for PackedList< Width >::reference:

Public Member Functions

 reference (const reference &) noexcept=default
 Copy construct.
 reference (reference &&) noexcept=default
 Move construct.
void operator= (const reference &other)
 Value assignment.
void operator= (const unsigned int val)
 Value assignment.
 operator unsigned int () const
 Conversion operator.

Protected Member Functions

void operator& ()=delete
 reference (PackedList *parent, const label index)
 Construct by taking reference of block from within the list and the specified index.
unsigned int get () const
 Get value as unsigned, no range-checking.
bool set (unsigned int val)
 Set value, returning true if changed, no range-checking.

Protected Attributes

block_typeref_
 Reference to the block.
unsigned shift_
 The bit shift to access the given sub-portion.

Friends

class PackedList

Detailed Description

template<unsigned Width>
class Foam::PackedList< Width >::reference

A reference supporting read/write access to an entry.

Definition at line 693 of file PackedList.H.

Constructor & Destructor Documentation

◆ reference() [1/3]

template<unsigned Width>
reference ( PackedList * parent,
const label index )
inlineprotected

Construct by taking reference of block from within the list and the specified index.

References PackedList.

Referenced by operator=(), reference(), and reference().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ reference() [2/3]

template<unsigned Width>
reference ( const reference & )
defaultnoexcept

Copy construct.

References reference().

Here is the call graph for this function:

◆ reference() [3/3]

template<unsigned Width>
reference ( reference && )
defaultnoexcept

Move construct.

References Foam::noexcept, and reference().

Here is the call graph for this function:

Member Function Documentation

◆ operator&()

template<unsigned Width>
void operator& ( )
protecteddelete

◆ get()

template<unsigned Width>
unsigned int get ( ) const
inlineprotected

Get value as unsigned, no range-checking.

Definition at line 362 of file PackedListI.H.

References PackedList< Width >::max_value, ref_, and shift_.

Referenced by operator unsigned int(), and PackedList< Width >::remove().

Here is the caller graph for this function:

◆ set()

template<unsigned Width>
bool set ( unsigned int val)
inlineprotected

Set value, returning true if changed, no range-checking.

Definition at line 369 of file PackedListI.H.

References PackedList< Width >::max_value, and shift_.

Referenced by operator=(), operator=(), and PackedList< Width >::unset().

Here is the caller graph for this function:

◆ operator=() [1/2]

template<unsigned Width>
void operator= ( const reference & other)
inline

Value assignment.

Definition at line 389 of file PackedListI.H.

References reference(), and set().

Here is the call graph for this function:

◆ operator=() [2/2]

template<unsigned Width>
void operator= ( const unsigned int val)
inline

Value assignment.

Definition at line 400 of file PackedListI.H.

References set().

Here is the call graph for this function:

◆ operator unsigned int()

template<unsigned Width>
operator unsigned int ( ) const
inline

Conversion operator.

Definition at line 410 of file PackedListI.H.

References get().

Here is the call graph for this function:

◆ PackedList

template<unsigned Width>
friend class PackedList
friend

Definition at line 697 of file PackedList.H.

References PackedList.

Referenced by PackedList, bitSet::reference::reference(), and reference().

Member Data Documentation

◆ ref_

template<unsigned Width>
block_type& ref_
protected

Reference to the block.

Definition at line 703 of file PackedList.H.

Referenced by bitSet::reference::flip(), and get().

◆ shift_

template<unsigned Width>
unsigned shift_
protected

The bit shift to access the given sub-portion.

Definition at line 708 of file PackedList.H.

Referenced by bitSet::reference::flip(), get(), and set().


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