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 intGetBranch ( ) const
unsigned intGetBuild ( ) const
RED::HOST_PRODUCTGetHostProduct ( ) const
unsigned intGetMajor ( ) const
unsigned intGetMinor ( ) const
RED::PRODUCTGetProduct ( ) const
booloperator< ( const Version & iOther ) const
booloperator<= ( const Version & iOther ) const
booloperator== ( const Version & iOther ) const
RED::StringToString ( ) const

Public static functions:

static RED::VersionFromString ( 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:

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::PRODUCTiProduct,
RED::HOST_PRODUCTiHostProduct,
unsigned intiMajor,
unsigned intiMinor,
unsigned intiBranch,
unsigned intiBuild
)

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.

Default constructor.

public virtual RED::Version::~Version()

Destructor.

public unsigned int RED::Version::GetBranch() const

Returns:

The code branch number of a product verion.
public unsigned int RED::Version::GetBuild() const

Returns:

The build number of a product verion.

Returns:

The host product description.
public unsigned int RED::Version::GetMajor() const

Returns:

The major part of a product verion.
public unsigned int RED::Version::GetMinor() const

Returns:

The minor part of a product verion.

Returns:

The product alias.
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:

true if the test has succeeded, false otherwise.
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:

true if the test has succeeded, false otherwise.
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.

Returns a string representation of the object.

Helpful to serialize version objects. Object members are separated by '$' chars in the output string.

Returns:

a string representation of the object.
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:

the newly created version object.

Variables documentation

protected unsigned int RED::Version::_branch

Code branch number.

protected unsigned int RED::Version::_build

build number.

host product description.

protected unsigned int RED::Version::_major

major version number.

protected unsigned int RED::Version::_minor

minor version number.

alias identifying the product.