Loading...
Searching...
No Matches
labelBits Class Reference

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

#include <labelBits.H>

Public Member Functions

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

Static Public Member Functions

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

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]

labelBits ( )
inlineconstexprnoexcept

Default construct as zero initialized.

Definition at line 105 of file labelBits.H.

References Foam::noexcept.

Referenced by operator!=, operator<<, operator==, and operator>>.

Here is the caller graph for this function:

◆ labelBits() [2/3]

labelBits ( const label val,
const direction bits )
inline

Construct from components.

Definition at line 113 of file labelBits.H.

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

Here is the call graph for this function:

◆ labelBits() [3/3]

labelBits ( Istream & is)
inlineexplicit

Read construct from Istream.

Definition at line 121 of file labelBits.H.

Member Function Documentation

◆ pack()

constexpr label pack ( const label val,
const direction bits )
inlinestaticconstexprnoexcept

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

Definition at line 88 of file labelBits.H.

References bits(), and val().

Referenced by labelBits(), setBits(), and 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.

References Foam::noexcept.

◆ val()

label val ( ) const
inlinenoexcept

Return the integer value.

Definition at line 137 of file labelBits.H.

References Foam::noexcept.

Referenced by indexedOctreeBase::getContent(), indexedOctreeBase::getNode(), labelBits(), pack(), setBits(), and 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.

References Foam::noexcept.

Referenced by labelBits(), pack(), setBits(), and 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 bits(), pack(), and 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 bits(), pack(), and val().

Here is the call graph for this function:

◆ operator==

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

Definition at line 164 of file labelBits.H.

References b, and labelBits().

◆ operator!=

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

Definition at line 170 of file labelBits.H.

References b, and labelBits().

◆ operator>>

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

Definition at line 179 of file labelBits.H.

References labelBits(), and Foam::rhs().

◆ operator<<

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

Definition at line 185 of file labelBits.H.

References labelBits(), os(), and Foam::rhs().


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