Version
Functions
Version |
|
Version |
|
~Version |
|
PRODUCT |
GetProduct |
HOST_PRODUCT |
GetHostProduct |
unsigned int | GetMinor |
unsigned int | GetMajor |
unsigned int | GetBranch |
bool | operator== |
bool | operator |
bool | operator |
String | ToString |
Version | FromString |
Detailed Description
-
class
Version
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.
Public Functions
-
Version
() Default constructor.
-
Version
(RED::PRODUCT iProduct, RED::HOST_PRODUCT iHostProduct, unsigned int iMajor, unsigned int iMinor, unsigned int iBranch) 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.
-
virtual
~Version
() Destructor.
-
inline RED::HOST_PRODUCT
GetHostProduct
() const Returns: The host product description.
-
inline unsigned int
GetMinor
() const Returns: The minor part of a product verion.
-
inline unsigned int
GetMajor
() const Returns: The major part of a product verion.
-
inline unsigned int
GetBranch
() const Returns: The code branch number of a product verion.
-
bool
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.
-
bool
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: true if the test has succeeded, false otherwise.
-
inline bool
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: true if the test has succeeded, false otherwise.
Public Static Functions