PackedList< Width >::reference Class Reference

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

Inheritance diagram for PackedList< Width >::reference:
[legend]

Public Member Functions

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

Protected Member Functions

void operator& ()=delete
 
 reference (PackedList *parent, const label index)
 
unsigned int get () const
 Get value as unsigned, no range-checking. More...
 
bool set (unsigned int val)
 Set value, returning true if changed, no range-checking. More...
 

Protected Attributes

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

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 465 of file PackedList.H.

Constructor & Destructor Documentation

◆ reference() [1/3]

reference ( PackedList parent,
const label  index 
)
inlineprotected

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

◆ reference() [2/3]

reference ( const reference )
default

Copy construct.

◆ reference() [3/3]

reference ( reference &&  )
default

Move construct.

Member Function Documentation

◆ operator&()

void operator& ( )
protecteddelete

◆ get()

unsigned int get
inlineprotected

Get value as unsigned, no range-checking.

Definition at line 302 of file PackedListI.H.

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

Referenced by PackedList< Width >::get(), and PackedList< Width >::remove().

Here is the caller graph for this function:

◆ set()

bool set ( unsigned int  val)
inlineprotected

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

Definition at line 309 of file PackedListI.H.

Referenced by PackedList< Width >::append(), PackedList< Width >::set(), and PackedList< Width >::unset().

Here is the caller graph for this function:

◆ operator=() [1/2]

void operator= ( const reference other)
inline

Value assignment.

Definition at line 329 of file PackedListI.H.

References PackedList< Width >::set().

Here is the call graph for this function:

◆ operator=() [2/2]

void operator= ( const unsigned int  val)
inline

Value assignment.

Definition at line 340 of file PackedListI.H.

◆ operator unsigned int()

operator unsigned int
inline

Conversion operator.

Definition at line 350 of file PackedListI.H.

References PackedList< Width >::get().

Here is the call graph for this function:

Friends And Related Function Documentation

◆ PackedList

friend class PackedList
friend

Definition at line 469 of file PackedList.H.

Member Data Documentation

◆ ref_

block_type& ref_
protected

Reference to the block.

Definition at line 473 of file PackedList.H.

Referenced by PackedList< Width >::reference::get().

◆ shift_

unsigned shift_
protected

The bit shift to access the given sub-portion.

Definition at line 476 of file PackedList.H.

Referenced by PackedList< Width >::reference::get().


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