OpenVDB  12.0.0
Public Member Functions | Static Public Attributes | List of all members
Version Class Reference

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

#include <nanovdb/NanoVDB.h>

Public Member Functions

__hostdev__ Version ()
 Default constructor. More...
 
__hostdev__ Version (uint32_t data)
 Constructor from a raw uint32_t data representation. More...
 
__hostdev__ Version (uint32_t major, uint32_t minor, uint32_t patch)
 Constructor from major.minor.patch version numbers. More...
 
__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. More...
 

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

__hostdev__ Version ( )
inline

Default constructor.

__hostdev__ Version ( uint32_t  data)
inline

Constructor from a raw uint32_t data representation.

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

Constructor from major.minor.patch version numbers.

Member Function Documentation

__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.
__hostdev__ uint32_t getMajor ( ) const
inline
__hostdev__ uint32_t getMinor ( ) const
inline
__hostdev__ uint32_t getPatch ( ) const
inline
__hostdev__ uint32_t id ( ) const
inline
__hostdev__ bool isCompatible ( ) const
inline
__hostdev__ bool operator< ( const Version rhs) const
inline
__hostdev__ bool operator<= ( const Version rhs) const
inline
__hostdev__ bool operator== ( const Version rhs) const
inline
__hostdev__ bool operator> ( const Version rhs) const
inline
__hostdev__ bool operator>= ( const Version rhs) const
inline

Member Data Documentation

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