class RED::Version
This class defines a generic version object for product version management. More...
#include <REDVersion.h>
Public functions:
Version ( RED::PRODUCT iProduct, RED::HOST_PRODUCT iHostProduct, unsigned int iMajor, unsigned int iMinor, unsigned int iBranch, unsigned int iBuild ) | |
Version ( ) | |
virtual | ~Version ( ) |
unsigned int | GetBranch ( ) const |
unsigned int | GetBuild ( ) const |
RED::HOST_PRODUCT | GetHostProduct ( ) const |
unsigned int | GetMajor ( ) const |
unsigned int | GetMinor ( ) const |
RED::PRODUCT | GetProduct ( ) const |
bool | operator< ( const Version & iOther ) const |
bool | operator<= ( const Version & iOther ) const |
bool | operator== ( const Version & iOther ) const |
RED::String | ToString ( ) const |
Public static functions:
static RED::Version | FromString ( const RED::String & iString ) |
Protected variables:
unsigned int | _branch |
unsigned int | _build |
HOST_PRODUCT | _hostproduct |
unsigned int | _major |
unsigned int | _minor |
PRODUCT | _product |
Detailed description:
This class defines a generic version object for product version management.
A version object is made of:
- a product identifier
- a host product description (for plug-ins)
- a major version number
- a minor version number
- a build number
Each product must have its own version object to allow compatibility checks and easy customers support.
The current REDsdk version is accessed from the RED::ILicense interface, using the RED::ILicense::GetSDKVersion method.
Functions documentation
public RED::Version::Version | ( | RED::PRODUCT | iProduct, |
RED::HOST_PRODUCT | iHostProduct, | ||
unsigned int | iMajor, | ||
unsigned int | iMinor, | ||
unsigned int | iBranch, | ||
unsigned int | iBuild | ||
) |
Build a Version object.
Parameters:
iProduct: | Number identifying the product. |
iHostProduct: | Host product description. |
iMajor: | Major version number. |
iMinor: | Minor version number. |
iBranch: | Source code branch. |
iBuild: | Build number. |
public RED::Version::Version | ( | ) |
Default constructor.
public virtual RED::Version::~Version | ( | ) |
Destructor.
public unsigned int RED::Version::GetBranch | ( | ) const |
Returns:
public unsigned int RED::Version::GetBuild | ( | ) const |
Returns:
public RED::HOST_PRODUCT RED::Version::GetHostProduct | ( | ) const |
Returns:
public unsigned int RED::Version::GetMajor | ( | ) const |
Returns:
public unsigned int RED::Version::GetMinor | ( | ) const |
Returns:
public RED::PRODUCT RED::Version::GetProduct | ( | ) const |
Returns:
public bool RED::Version::operator< | ( | const Version & | iOther | ) const |
Anteriority test operator.
The test is performed only on the _minor, _major and _build members of the version objects (the _buildname member is ignored). If the three members are equals, the test returns false.
Parameters:
iOther: | Version to test with. |
Returns:
public bool RED::Version::operator<= | ( | const Version & | iOther | ) const |
Relaxed anteriority test operator.
The test is performed only on the _minor, _major and _build members of the version objects (the _buildname member is ignored).
Parameters:
iOther: | Version to test with. |
Returns:
public bool RED::Version::operator== | ( | const Version & | iOther | ) const |
Equality test operator.
Two versions are considered as equals if their minor, major and build members all are identical.
Parameters:
iOther: | Version to test with. |
public RED::String RED::Version::ToString | ( | ) const |
Returns a string representation of the object.
Helpful to serialize version objects. Object members are separated by '$' chars in the output string.
Returns:
public static RED::Version RED::Version::FromString | ( | const RED::String & | iString | ) |
Constructs a version object from a string.
See RED::Version::ToString for further details.
Parameters:
iString: | string containing the serialized representation of a version object. |
Returns:
Variables documentation
Code branch number.
build number.
host product description.
major version number.
minor version number.
alias identifying the product.