OpenVDB 13.1.0
Loading...
Searching...
No Matches
Version Class Reference

Bit-compacted representation of all three version numbers. More...

#include <nanovdb/NanoVDB.h>

Public Member Functions

 Version ()
 Default constructor.
 Version (uint32_t data)
 Constructor from a raw uint32_t data representation.
 Version (uint32_t major, uint32_t minor, uint32_t patch)
 Constructor from major.minor.patch version numbers.
bool operator== (const Version &rhs) const
bool operator< (const Version &rhs) const
bool operator<= (const Version &rhs) const
bool operator> (const Version &rhs) const
bool operator>= (const Version &rhs) const
uint32_t id () const
uint32_t getMajor () const
uint32_t getMinor () const
uint32_t getPatch () const
bool isCompatible () const
int age () const
 Returns the difference between major version of this instance and NANOVDB_MAJOR_VERSION_NUMBER.

Static Public Attributes

static constexpr uint32_t End = 0
static constexpr uint32_t StrLen = 8

Detailed Description

Bit-compacted representation of all three version numbers.

major is the top 11 bits, minor is the 11 middle bits and patch is the lower 10 bits

Constructor & Destructor Documentation

◆ Version() [1/3]

Version ( )
inline

Default constructor.

◆ Version() [2/3]

Version ( uint32_t data)
inline

Constructor from a raw uint32_t data representation.

◆ Version() [3/3]

Version ( uint32_t major,
uint32_t minor,
uint32_t patch )
inline

Constructor from major.minor.patch version numbers.

Member Function Documentation

◆ age()

int age ( ) const
inline

Returns the difference between major version of this instance and NANOVDB_MAJOR_VERSION_NUMBER.

Returns
return 0 if the major version equals NANOVDB_MAJOR_VERSION_NUMBER, else a negative age if this instance has a smaller major verion (is older), and a positive age if it is newer, i.e. larger.

◆ getMajor()

uint32_t getMajor ( ) const
inline

◆ getMinor()

uint32_t getMinor ( ) const
inline

◆ getPatch()

uint32_t getPatch ( ) const
inline

◆ id()

uint32_t id ( ) const
inline

◆ isCompatible()

bool isCompatible ( ) const
inline

◆ operator<()

bool operator< ( const Version & rhs) const
inline

◆ operator<=()

bool operator<= ( const Version & rhs) const
inline

◆ operator==()

bool operator== ( const Version & rhs) const
inline

◆ operator>()

bool operator> ( const Version & rhs) const
inline

◆ operator>=()

bool operator>= ( const Version & rhs) const
inline

Member Data Documentation

◆ End

uint32_t End = 0
staticconstexpr

◆ StrLen

uint32_t StrLen = 8
static