OpenVDB 13.0.0

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

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

`#include <nanovdb/NanoVDB.h>`

## Public Member Functions
__hostdev__ | Version ()
| Default constructor.
__hostdev__ | Version (uint32_t data)
| Constructor from a raw uint32_t data representation.
__hostdev__ | Version (uint32_t major, uint32_t minor, uint32_t patch)
| Constructor from major.minor.patch version numbers.
__hostdev__ bool | operator== (const Version &rhs) const
__hostdev__ bool | operator< (const Version &rhs) const
__hostdev__ bool | operator<= (const Version &rhs) const
__hostdev__ bool | operator> (const Version &rhs) const
__hostdev__ bool | operator>= (const Version &rhs) const
__hostdev__ uint32_t | id () const
__hostdev__ uint32_t | getMajor () const
__hostdev__ uint32_t | getMinor () const
__hostdev__ uint32_t | getPatch () const
__hostdev__ bool | isCompatible () const
__hostdev__ 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]

__hostdev__ Version | ( |  | ) |
| inline

Default constructor.

## ◆ Version() [2/3]

__hostdev__ Version | ( | uint32_t | data | ) |
| inline

Constructor from a raw uint32_t data representation.

## ◆ Version() [3/3]

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

Constructor from major.minor.patch version numbers.

## Member Function Documentation

## ◆ age()

__hostdev__ 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()

__hostdev__ uint32_t getMajor | ( |  | ) | const
| inline

## ◆ getMinor()

__hostdev__ uint32_t getMinor | ( |  | ) | const
| inline

## ◆ getPatch()

__hostdev__ uint32_t getPatch | ( |  | ) | const
| inline

## ◆ id()

__hostdev__ uint32_t id | ( |  | ) | const
| inline

## ◆ isCompatible()

__hostdev__ bool isCompatible | ( |  | ) | const
| inline

## ◆ operator<()

__hostdev__ bool operator< | ( | const Version & | rhs | ) | const
| inline

## ◆ operator<=()

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

## ◆ operator==()

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

## ◆ operator>()

__hostdev__ bool operator> | ( | const Version & | rhs | ) | const
| inline

## ◆ operator>=()

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

## Member Data Documentation

## ◆ End

uint32_t End = 0
| static constexpr

## ◆ StrLen

uint32_t StrLen = 8
| static