HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
UT_Version.h File Reference

Helpers for dealing with versioning in the HDK. More...

#include "pxr/pxr.h"
#include <UT/UT_Version.h>
+ Include dependency graph for UT_Version.h:

Go to the source code of this file.

Macros

#define _GUSD_MAX_VERS   10000
 
#define _GUSD_VER_INT(major, minor, build, patch)
 
#define _GUSD_CURR_VER_INT_1   _GUSD_VER_INT(UT_MAJOR_VERSION_INT,0,0,0)
 
#define _GUSD_CURR_VER_INT_2
 
#define _GUSD_CURR_VER_INT_3
 
#define _GUSD_CURR_VER_INT_4
 
#define GUSD_VER_CMP_1(op, major)   _GUSD_CURR_VER_INT_1 op _GUSD_VER_INT(major,0,0,0)
 
#define GUSD_VER_CMP_2(op, major, minor)   _GUSD_CURR_VER_INT_2 op _GUSD_VER_INT(major,minor,0,0)
 
#define GUSD_VER_CMP_3(op, major, minor, build)   _GUSD_CURR_VER_INT_3 op _GUSD_VER_INT(major,minor,build,0)
 
#define GUSD_VER_CMP_4(op, major, minor, build, patch)   _GUSD_CURR_VER_INT_4 op _GUSD_VER_INT(major,minor,build,patch)
 

Detailed Description

Helpers for dealing with versioning in the HDK.

Definition in file UT_Version.h.

Macro Definition Documentation

#define _GUSD_CURR_VER_INT_1   _GUSD_VER_INT(UT_MAJOR_VERSION_INT,0,0,0)

Construct a consolidated version integer for the current Houdini version. Each macro specifies a different level of granularity.

Definition at line 51 of file UT_Version.h.

#define _GUSD_CURR_VER_INT_2
Value:
#define UT_MINOR_VERSION_INT
Definition: UT_Version.h:34
#define _GUSD_VER_INT(major, minor, build, patch)
Definition: UT_Version.h:43
#define UT_MAJOR_VERSION_INT
Definition: UT_Version.h:33

Construct a consolidated version integer for the current Houdini version. Each macro specifies a different level of granularity.

Definition at line 53 of file UT_Version.h.

#define _GUSD_CURR_VER_INT_3
Value:
#define UT_MINOR_VERSION_INT
Definition: UT_Version.h:34
#define _GUSD_VER_INT(major, minor, build, patch)
Definition: UT_Version.h:43
#define UT_BUILD_VERSION_INT
Definition: UT_Version.h:35
#define UT_MAJOR_VERSION_INT
Definition: UT_Version.h:33

Construct a consolidated version integer for the current Houdini version. Each macro specifies a different level of granularity.

Definition at line 56 of file UT_Version.h.

#define _GUSD_CURR_VER_INT_4
Value:
#define UT_MINOR_VERSION_INT
Definition: UT_Version.h:34
#define _GUSD_VER_INT(major, minor, build, patch)
Definition: UT_Version.h:43
#define UT_BUILD_VERSION_INT
Definition: UT_Version.h:35
#define UT_PATCH_VERSION_INT
Definition: UT_Version.h:36
#define UT_MAJOR_VERSION_INT
Definition: UT_Version.h:33

Construct a consolidated version integer for the current Houdini version. Each macro specifies a different level of granularity.

Definition at line 60 of file UT_Version.h.

#define _GUSD_MAX_VERS   10000

Max number of versions for any component (major,minor,etc.) of the current build. Should be at least 1K under current conventions.

Definition at line 39 of file UT_Version.h.

#define _GUSD_VER_INT (   major,
  minor,
  build,
  patch 
)
Value:
build*_GUSD_MAX_VERS + patch)
#define _GUSD_MAX_VERS
Definition: UT_Version.h:39

Construct a single, consolidated integer value that allows legal comparison between the combination of major+minor+build+patch components.

Definition at line 43 of file UT_Version.h.

#define GUSD_VER_CMP_1 (   op,
  major 
)    _GUSD_CURR_VER_INT_1 op _GUSD_VER_INT(major,0,0,0)

Compare the current Houdini version against some other version.

op should be a comparison operator (<,>,...). The major, minor,... args form the right-hand side of the comparison.

These are typically used to simplify expressions that are used to control compilation that must change from version to version. The different macros each compare the version at a different level of granularity, from the major version all the way down to the patch.

Example usage:

#if (GUSD_VER_CMP_2(>=, 13, 256))
// special code path
...

This is equivalent to the comparison, "major.minor >= 13.256"

Note
: Only the components of the version int specified in the comparison operator are compared. For example, take the following expression:
GUSD_VER_CMP_2(>, 13, 1)

The expression above will evaluate to false when the internal Houdini version is 13.1.211, because only the major and minor components are being compared; any build difference is ignored.

Definition at line 96 of file UT_Version.h.

#define GUSD_VER_CMP_2 (   op,
  major,
  minor 
)    _GUSD_CURR_VER_INT_2 op _GUSD_VER_INT(major,minor,0,0)

Compare the current Houdini version against some other version.

op should be a comparison operator (<,>,...). The major, minor,... args form the right-hand side of the comparison.

These are typically used to simplify expressions that are used to control compilation that must change from version to version. The different macros each compare the version at a different level of granularity, from the major version all the way down to the patch.

Example usage:

#if (GUSD_VER_CMP_2(>=, 13, 256))
// special code path
...

This is equivalent to the comparison, "major.minor >= 13.256"

Note
: Only the components of the version int specified in the comparison operator are compared. For example, take the following expression:
GUSD_VER_CMP_2(>, 13, 1)

The expression above will evaluate to false when the internal Houdini version is 13.1.211, because only the major and minor components are being compared; any build difference is ignored.

Definition at line 99 of file UT_Version.h.

#define GUSD_VER_CMP_3 (   op,
  major,
  minor,
  build 
)    _GUSD_CURR_VER_INT_3 op _GUSD_VER_INT(major,minor,build,0)

Compare the current Houdini version against some other version.

op should be a comparison operator (<,>,...). The major, minor,... args form the right-hand side of the comparison.

These are typically used to simplify expressions that are used to control compilation that must change from version to version. The different macros each compare the version at a different level of granularity, from the major version all the way down to the patch.

Example usage:

#if (GUSD_VER_CMP_2(>=, 13, 256))
// special code path
...

This is equivalent to the comparison, "major.minor >= 13.256"

Note
: Only the components of the version int specified in the comparison operator are compared. For example, take the following expression:
GUSD_VER_CMP_2(>, 13, 1)

The expression above will evaluate to false when the internal Houdini version is 13.1.211, because only the major and minor components are being compared; any build difference is ignored.

Definition at line 102 of file UT_Version.h.

#define GUSD_VER_CMP_4 (   op,
  major,
  minor,
  build,
  patch 
)    _GUSD_CURR_VER_INT_4 op _GUSD_VER_INT(major,minor,build,patch)

Compare the current Houdini version against some other version.

op should be a comparison operator (<,>,...). The major, minor,... args form the right-hand side of the comparison.

These are typically used to simplify expressions that are used to control compilation that must change from version to version. The different macros each compare the version at a different level of granularity, from the major version all the way down to the patch.

Example usage:

#if (GUSD_VER_CMP_2(>=, 13, 256))
// special code path
...

This is equivalent to the comparison, "major.minor >= 13.256"

Note
: Only the components of the version int specified in the comparison operator are compared. For example, take the following expression:
GUSD_VER_CMP_2(>, 13, 1)

The expression above will evaluate to false when the internal Houdini version is 13.1.211, because only the major and minor components are being compared; any build difference is ignored.

Definition at line 105 of file UT_Version.h.