HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
nanovdb::Version Class Reference

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

#include <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...
 
const char * c_str () const
 returns a c-string of the semantic version, i.e. major.minor.patch More...
 

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

Definition at line 924 of file NanoVDB.h.

Constructor & Destructor Documentation

__hostdev__ nanovdb::Version::Version ( )
inline

Default constructor.

Definition at line 929 of file NanoVDB.h.

__hostdev__ nanovdb::Version::Version ( uint32_t  data)
inline

Constructor from a raw uint32_t data representation.

Definition at line 936 of file NanoVDB.h.

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

Constructor from major.minor.patch version numbers.

Definition at line 938 of file NanoVDB.h.

Member Function Documentation

__hostdev__ int nanovdb::Version::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.

Definition at line 958 of file NanoVDB.h.

const char* nanovdb::Version::c_str ( void  ) const
inline

returns a c-string of the semantic version, i.e. major.minor.patch

Definition at line 962 of file NanoVDB.h.

__hostdev__ uint32_t nanovdb::Version::getMajor ( ) const
inline

Definition at line 951 of file NanoVDB.h.

__hostdev__ uint32_t nanovdb::Version::getMinor ( ) const
inline

Definition at line 952 of file NanoVDB.h.

__hostdev__ uint32_t nanovdb::Version::getPatch ( ) const
inline

Definition at line 953 of file NanoVDB.h.

__hostdev__ uint32_t nanovdb::Version::id ( ) const
inline

Definition at line 950 of file NanoVDB.h.

__hostdev__ bool nanovdb::Version::isCompatible ( ) const
inline

Definition at line 954 of file NanoVDB.h.

__hostdev__ bool nanovdb::Version::operator< ( const Version rhs) const
inline

Definition at line 946 of file NanoVDB.h.

__hostdev__ bool nanovdb::Version::operator<= ( const Version rhs) const
inline

Definition at line 947 of file NanoVDB.h.

__hostdev__ bool nanovdb::Version::operator== ( const Version rhs) const
inline

Definition at line 945 of file NanoVDB.h.

__hostdev__ bool nanovdb::Version::operator> ( const Version rhs) const
inline

Definition at line 948 of file NanoVDB.h.

__hostdev__ bool nanovdb::Version::operator>= ( const Version rhs) const
inline

Definition at line 949 of file NanoVDB.h.


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