DAZ Script | |
---|---|
DzVersion | fromString ( String versionStr ) |
DAZ Script | |
---|---|
Boolean | equal ( DzVersion version ) |
Number | getBuildNumber () |
String | getLongVersionString () |
Number | getMajorVersion () |
Number | getMinorVersion () |
Number | getRevisionNumber () |
Number | getVersionNumber () |
Number | getVersionNumber32 () |
String | getVersionString () |
Boolean | greaterThan ( DzVersion version ) |
Boolean | greaterThanOrEqual ( DzVersion version ) |
Boolean | isValid () |
Boolean | lessThan ( DzVersion version ) |
Boolean | lessThanOrEqual ( DzVersion version ) |
Boolean | notEqual ( DzVersion version ) |
void | setVersionNumber ( Number version ) |
void | setVersionNumber ( Number major, Number minor, Number revision, Number build ) |
String | toString () |
This class was added to DAZ Studio 4.x to make it easier to work with 64-bit version numbers and to facilitate compatibility with the old 32-bit version numbers.
Version numbers are typically displayed to the user as short version strings, e.g. 4.0, or long version strings, e.g. 4.0.0.0.
The version number consists of 4 components: The Major version number, the Minor version number, the Revision number, and the Build number. This is displayed in the following order: Major.Minor.Revision.Build.
In DAZ Studio, version numbers are typically stored as 64-bit unsigned integers with 16 bits for each number. This means that each number has a valid range of 0-65535. The most significant 16 bits are the Major version number, the next most significant 16 bits are the Minor version number, the next most significant 16 bits are the Revision number and the least significant 16 bits are the Build number. So, a packed version number in hexadecimal notation might look like: 0x1111222233334444 where 1111 is the Major version number, 2222 is the Minor version number 3333 is the Revision number and 4444 is the build number.
It is recommended that this class be used when possible to reduce confusion when dealing with version numbers in code.
This class provides methods for all of the numerical comparison operators (<, >, ⇐, >=, ==, !=
) to make it easy to compare version numbers without directly using the packed value, or the individual components.
Since:
DzVersion : fromString( String versionStr )
Parses a version string into a version number.
Parameter(s):
Return Value:
Default constructor. Creates an empty version number - i.e. 0.0.0.0
Creates a version number by parsing a version string.
Parameter(s):
DzVersion( Number major, Number minor, Number revision, Number build )
Creates a version number from the 4 16-bit components.
Parameter(s):
Compatibility constructor. Creates a 64-bit version number from an old 32-bit version number.
Parameter(s):
Creates a version number from a 64-bit packed representation.
Parameter(s):
DzVersion( DzVersion version )
Copy constructor. Creates a version that is a copy of the given number.
Parameter(s):
Boolean : equal( DzVersion version )
Parameter(s):
Return Value:
true
if the version numbers are the same, otherwise false
.Number : getBuildNumber()
Return Value:
String : getLongVersionString()
Return Value:
Return Value:
Return Value:
Return Value:
Return Value:
Return Value:
Attention:
Return Value:
Boolean : greaterThan( DzVersion version )
Parameter(s):
Return Value:
true
if the version number is greater than (newer than) this version number, otherwise false
.Boolean : greaterThanOrEqual( DzVersion version )
Parameter(s):
Return Value:
true
if the version number is greater than or equal (newer than or the same as) this version number, otherwise false
.Return Value:
true
if the version number has been initialized, otherwise false
.Boolean : lessThan( DzVersion version )
Parameter(s):
Return Value:
true
if the version number is less than (older than) this version number, otherwise false
.Boolean : lessThanOrEqual( DzVersion version )
Parameter(s):
Return Value:
true
if the version number is less than or equal (older than or the same as) this version number, otherwise false
.Boolean : notEqual( DzVersion version )
Parameter(s):
Return Value:
true
if the version numbers are different, otherwise false
.void : setVersionNumber( Number version )
Sets the 64-bit version number from an old 32-bit version number.
Parameter(s):
Sets the version number from a 64-bit packed version number.
Parameter(s):
void : setVersionNumber( Number major, Number minor, Number revision, Number build )
Sets the version number from the 4 16-bit components.
Parameter(s):
Return Value: