labelBits Class Reference

A 29bits (or 61bits) integer label with 3bits direction (eg, octant) packed into single label. More...

Public Member Functions

constexpr labelBits () noexcept
 Default construct as zero initialized. More...
 
 labelBits (const label val, const direction bits)
 Construct from components. More...
 
 labelBits (Istream &is)
 Read construct from Istream. More...
 
label data () const noexcept
 The raw data value. More...
 
label val () const noexcept
 Return the integer value. More...
 
direction bits () const noexcept
 Return the octant direction. More...
 
void setVal (const label val)
 Set the integer value. More...
 
void setBits (const direction bits)
 Set the octant direction. More...
 

Static Public Member Functions

static constexpr label pack (const label val, const direction bits) noexcept
 Pack integer value and bits (octant) into a label. More...
 

Friends

bool operator== (const labelBits &a, const labelBits &b)
 
bool operator!= (const labelBits &a, const labelBits &b)
 
Istreamoperator>> (Istream &is, labelBits &rhs)
 
Ostreamoperator<< (Ostream &os, const labelBits &rhs)
 

Detailed Description

A 29bits (or 61bits) integer label with 3bits direction (eg, octant) packed into single label.

Definition at line 48 of file labelBits.H.

Constructor & Destructor Documentation

◆ labelBits() [1/3]

constexpr labelBits ( )
inlinenoexcept

Default construct as zero initialized.

Definition at line 105 of file labelBits.H.

◆ labelBits() [2/3]

labelBits ( const label  val,
const direction  bits 
)
inline

Construct from components.

Definition at line 113 of file labelBits.H.

◆ labelBits() [3/3]

labelBits ( Istream is)
inlineexplicit

Read construct from Istream.

Definition at line 121 of file labelBits.H.

Member Function Documentation

◆ pack()

static constexpr label pack ( const label  val,
const direction  bits 
)
inlinestaticnoexcept

Pack integer value and bits (octant) into a label.

Definition at line 89 of file labelBits.H.

References labelBits::bits(), and labelBits::val().

Referenced by labelBits::setBits(), and labelBits::setVal().

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

◆ data()

label data ( ) const
inlinenoexcept

The raw data value.

Definition at line 132 of file labelBits.H.

◆ val()

label val ( ) const
inlinenoexcept

Return the integer value.

Definition at line 137 of file labelBits.H.

Referenced by indexedOctreeBase::getContent(), indexedOctreeBase::getNode(), labelBits::pack(), labelBits::setBits(), and labelBits::setVal().

Here is the caller graph for this function:

◆ bits()

direction bits ( ) const
inlinenoexcept

Return the octant direction.

Definition at line 142 of file labelBits.H.

Referenced by labelBits::pack(), labelBits::setBits(), and labelBits::setVal().

Here is the caller graph for this function:

◆ setVal()

void setVal ( const label  val)
inline

Set the integer value.

Definition at line 147 of file labelBits.H.

References labelBits::bits(), labelBits::pack(), and labelBits::val().

Here is the call graph for this function:

◆ setBits()

void setBits ( const direction  bits)
inline

Set the octant direction.

Definition at line 155 of file labelBits.H.

References labelBits::bits(), labelBits::pack(), and labelBits::val().

Here is the call graph for this function:

Friends And Related Function Documentation

◆ operator==

bool operator== ( const labelBits a,
const labelBits b 
)
friend

Definition at line 164 of file labelBits.H.

◆ operator!=

bool operator!= ( const labelBits a,
const labelBits b 
)
friend

Definition at line 170 of file labelBits.H.

◆ operator>>

Istream& operator>> ( Istream is,
labelBits rhs 
)
friend

Definition at line 179 of file labelBits.H.

◆ operator<<

Ostream& operator<< ( Ostream os,
const labelBits rhs 
)
friend

Definition at line 185 of file labelBits.H.


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