Web Analytics Made Easy - Statcounter
Skip to content

Class SBCContainerVersionNumber#

ClassList > SBCContainerVersionNumber

This class describes a version number. More...

  • #include <SBCContainerVersionNumber.hpp>

Public Functions#

Type Name
SBCContainerVersionNumber () noexcept
Constructs the 0.0.0 version number.
SBCContainerVersionNumber (const std::string & versionNumberString)
Constructs a version number from a versionNumberString .
SBCContainerVersionNumber (const SBCContainerVersionNumber & versionNumber)
Constructs a version number from a versionNumber .
SBCContainerVersionNumber (unsigned int majorVersionNumber, unsigned int minorVersionNumber, unsigned int patchVersionNumber) noexcept
Constructs a version number majorVersionNumber .minorVersionNumber .patchVersionNumber .
unsigned int getMajorVersionNumber () noexcept const
Returns the major version number.
unsigned int getMinorVersionNumber () noexcept const
Returns the minor version number.
unsigned int getPatchVersionNumber () noexcept const
Returns the patch version number.
bool isValid () const
Returns true if and only if the version number is valid.
bool operator!= (const SBCContainerVersionNumber & versionNumber) noexcept const
Inequality operator.
std::string operator() () const
Returns the version number as a string.
bool operator< (const SBCContainerVersionNumber & versionNumber) noexcept const
Comparison with another version.
bool operator<= (const SBCContainerVersionNumber & versionNumber) noexcept const
Comparison with another version.
SBCContainerVersionNumber & operator= (const SBCContainerVersionNumber & versionNumber)
Assignment operator.
bool operator== (const SBCContainerVersionNumber & versionNumber) noexcept const
Equality operator.
bool operator> (const SBCContainerVersionNumber & versionNumber) noexcept const
Comparison with another version.
bool operator>= (const SBCContainerVersionNumber & versionNumber) noexcept const
Comparison with another version.
void setMajorVersionNumber (unsigned int majorVersionNumber)
Sets the major version number.
void setMinorVersionNumber (unsigned int minorVersionNumber)
Sets the minor version number.
void setPatchVersionNumber (unsigned int patchVersionNumber)
Sets the patch version number.
virtual ~SBCContainerVersionNumber ()
Destructs the version number.

Public Static Functions#

Type Name
bool getCompatibilityStatus (const SBCContainerVersionNumber & sdkVersionNumber, const SBCContainerVersionNumber & coreVersionNumber)
Returns whether a sdkVersionNumber is compatible with acoreVersionNumber .

Detailed Description#

This class describes a version number in SAMSON, composed of three non-negative integers:

  • a major version number
  • a minor version number
  • a patch version number

Because SAMSON Extensions depend on the version of the SDK with which they are developed, SAMSON has a strict versioning policy. Please refer to the chapter about Versioning for more information.

Short name: SBVersionNumber

Public Functions Documentation#

function SBCContainerVersionNumber [1/4]#

Constructs the 0.0.0 version number.

SBCContainerVersionNumber::SBCContainerVersionNumber () noexcept

Default-constructs a version number initialized to 0.0.0.


function SBCContainerVersionNumber [2/4]#

Constructs a version number from a versionNumberString .

SBCContainerVersionNumber::SBCContainerVersionNumber (
    const std::string & versionNumberString
) 

Constructs a version number from a string representation.

Parses the supplied version string and extracts the major, minor, and patch components.

Parameters:

  • versionNumberString A string in the form "major.minor.patch".

function SBCContainerVersionNumber [3/4]#

Constructs a version number from a versionNumber .

SBCContainerVersionNumber::SBCContainerVersionNumber (
    const SBCContainerVersionNumber & versionNumber
) 

Copy-constructs a version number from another instance.

Parameters:

  • versionNumber The version number to copy.

function SBCContainerVersionNumber [4/4]#

Constructs a version number majorVersionNumber .minorVersionNumber .patchVersionNumber .

SBCContainerVersionNumber::SBCContainerVersionNumber (
    unsigned int majorVersionNumber,
    unsigned int minorVersionNumber,
    unsigned int patchVersionNumber
) noexcept

Constructs a version number from individual components.

Parameters:

  • majorVersionNumber The major component of the version.
  • minorVersionNumber The minor component of the version.
  • patchVersionNumber The patch component of the version.

function getMajorVersionNumber#

Returns the major version number.

unsigned int SBCContainerVersionNumber::getMajorVersionNumber () noexcept const

Retrieves the major component of the version number.

Returns:

The major version number.


function getMinorVersionNumber#

Returns the minor version number.

unsigned int SBCContainerVersionNumber::getMinorVersionNumber () noexcept const

Retrieves the minor component of the version number.

Returns:

The minor version number.


function getPatchVersionNumber#

Returns the patch version number.

unsigned int SBCContainerVersionNumber::getPatchVersionNumber () noexcept const

Retrieves the patch component of the version number.

Returns:

The patch version number.


function isValid#

Returns true if and only if the version number is valid.

bool SBCContainerVersionNumber::isValid () const

Checks whether the version number is valid (at least one component is non-zero).

Returns:

true if the version number is valid, false otherwise.


function operator!=#

Inequality operator.

bool SBCContainerVersionNumber::operator!= (
    const SBCContainerVersionNumber & versionNumber
) noexcept const

Tests inequality of two version numbers.

Parameters:

  • versionNumber The version number to compare with.

Returns:

true if the version numbers are not equal, false otherwise.


function operator()#

Returns the version number as a string.

std::string SBCContainerVersionNumber::operator() () const

Returns a string representation of the version number in "major.minor.patch" format.

Returns:

The version number as a string.


function operator<#

Comparison with another version.

bool SBCContainerVersionNumber::operator< (
    const SBCContainerVersionNumber & versionNumber
) noexcept const

Determines whether this version number is less than another.

Compares the version components in order of significance (major, then minor, then patch).

Parameters:

  • versionNumber The version number to compare with.

Returns:

true if this version number is less than the given version number, false otherwise.


function operator<=#

Comparison with another version.

bool SBCContainerVersionNumber::operator<= (
    const SBCContainerVersionNumber & versionNumber
) noexcept const

Determines whether this version number is less than or equal to another.

Parameters:

  • versionNumber The version number to compare with.

Returns:

true if this version number is less than or equal to the given version number, false otherwise.


function operator=#

Assignment operator.

SBCContainerVersionNumber & SBCContainerVersionNumber::operator= (
    const SBCContainerVersionNumber & versionNumber
) 

Assigns another version number to this instance.

Parameters:

  • versionNumber The version number to assign.

Returns:

Reference to this version number after assignment.


function operator==#

Equality operator.

bool SBCContainerVersionNumber::operator== (
    const SBCContainerVersionNumber & versionNumber
) noexcept const

Tests equality of two version numbers.

Parameters:

  • versionNumber The version number to compare with.

Returns:

true if both version numbers are equal, false otherwise.


function operator>#

Comparison with another version.

bool SBCContainerVersionNumber::operator> (
    const SBCContainerVersionNumber & versionNumber
) noexcept const

Determines whether this version number is greater than another.

Compares the version components in order of significance (major, then minor, then patch).

Parameters:

  • versionNumber The version number to compare with.

Returns:

true if this version number is greater than the given version number, false otherwise.


function operator>=#

Comparison with another version.

bool SBCContainerVersionNumber::operator>= (
    const SBCContainerVersionNumber & versionNumber
) noexcept const

Determines whether this version number is greater than or equal to another.

Parameters:

  • versionNumber The version number to compare with.

Returns:

true if this version number is greater than or equal to the given version number, false otherwise.


function setMajorVersionNumber#

Sets the major version number.

void SBCContainerVersionNumber::setMajorVersionNumber (
    unsigned int majorVersionNumber
) 

Sets the major component of the version number.

Parameters:

  • majorVersionNumber The new major version number.

function setMinorVersionNumber#

Sets the minor version number.

void SBCContainerVersionNumber::setMinorVersionNumber (
    unsigned int minorVersionNumber
) 

Sets the minor component of the version number.

Parameters:

  • minorVersionNumber The new minor version number.

function setPatchVersionNumber#

Sets the patch version number.

void SBCContainerVersionNumber::setPatchVersionNumber (
    unsigned int patchVersionNumber
) 

Sets the patch component of the version number.

Parameters:

  • patchVersionNumber The new patch version number.

function ~SBCContainerVersionNumber#

Destructs the version number.

virtual SBCContainerVersionNumber::~SBCContainerVersionNumber () 

Destroys the version number.


Public Static Functions Documentation#

function getCompatibilityStatus#

Returns whether a sdkVersionNumber is compatible with acoreVersionNumber .

static bool SBCContainerVersionNumber::getCompatibilityStatus (
    const SBCContainerVersionNumber & sdkVersionNumber,
    const SBCContainerVersionNumber & coreVersionNumber
) 

Determines whether a SDK version is compatible with a core version.

Parameters:

  • sdkVersionNumber The SDK version number.
  • coreVersionNumber The core version number.

Returns:

true if the SDK version is compatible with the core version, false otherwise.