| LicenseSpring C++ SDK 7.32.0 Easily add Software Licensing to your application

Public Member Functions | Static Public Member Functions | List of all members
LicenseSpring::VersionEx Class Reference

Extended class for handling app versions, compliant with Semantic Versioning 2.0.0 Format: Major.Minor.Patch[PrereleaseIdentifier].Build[BuildMetadata], see https://semver.org For example: "1.3.4573-alpha.3+sha:dff8df7gdsvnx", "2.13.3735b2.0-stable". More...

`#include <LicenseSpring/Version.h>`

Inheritance diagram for LicenseSpring::VersionEx:

## Public Member Functions
| VersionEx ()
| VersionEx (int major, int minor, int patch, char delimeter='.')
| VersionEx (int major, int minor, int patch, int build, char delimeter='.')
| VersionEx (const std::string &version, char delimeter='.')
void | setPrereleaseType (PrereleaseType type)
PrereleaseType | prereleaseType () const
bool | isPrerelease () const
const std::string & | prereleaseVersion () const
void | setPrereleaseVersion (const std::string &version)
const std::string & | buildMetadata () const
void | setBuildMetadata (const std::string &data)
std::string | toString () const override
int | compare (const VersionBase &baseVer) const override
Public Member Functions inherited from LicenseSpring::Version
| Version ()
| Version (int major, int minor, char delimeter='.')
| Version (int major, int minor, int patch, char delimeter='.')
| Version (int major, int minor, int patch, int build, char delimeter='.')
| Version (const std::string &version, char delimeter='.')
int | patchVersion () const
int | buildVersion () const
bool | hasPatchVersion () const
bool | hasBuildVersion () const
void | setPatchVersion (int number)
void | setBuildVersion (int number)
size_t | length () const override
Public Member Functions inherited from LicenseSpring::VersionBase
| VersionBase ()
| VersionBase (int major, int minor, char delimeter='.')
virtual | ~VersionBase ()=default
int | majorVersion () const
int | minorVersion () const
char | delimeter () const
void | setDelimeter (char delimeter)
size_t | size () const
| operator std::string () const
bool | operator== (const VersionBase &version) const
bool | operator!= (const VersionBase &version) const
bool | operator< (const VersionBase &version) const
bool | operator> (const VersionBase &version) const
bool | operator<= (const VersionBase &version) const
bool | operator>= (const VersionBase &version) const

## Static Public Member Functions
static VersionEx | fromString (const std::string &input, char delimeter='.')
Static Public Member Functions inherited from LicenseSpring::Version
static Version | fromString (const std::string &input, char delimeter='.')
Static Public Member Functions inherited from LicenseSpring::VersionBase
static int | compare (const VersionBase &left, const VersionBase &right)

## Additional Inherited Members
Static Public Attributes inherited from LicenseSpring::Version
static Version | InvalidVersion
Static Public Attributes inherited from LicenseSpring::VersionBase
static constexpr int | INVALID_VERSION_NUMBER = -1
Protected Attributes inherited from LicenseSpring::Version
int | m_patch
int | m_build
Protected Attributes inherited from LicenseSpring::VersionBase
int | m_major
int | m_minor
char | m_delimeter

## Detailed Description

Extended class for handling app versions, compliant with Semantic Versioning 2.0.0 Format: Major.Minor.Patch[PrereleaseIdentifier].Build[BuildMetadata], see https://semver.org For example: "1.3.4573-alpha.3+sha:dff8df7gdsvnx", "2.13.3735b2.0-stable".

Definition at line 147 of file Version.h.

## Constructor & Destructor Documentation

## ◆ VersionEx() [1/4]

LicenseSpring::VersionEx::VersionEx | ( |  | ) |

## ◆ VersionEx() [2/4]

LicenseSpring::VersionEx::VersionEx | ( | int | major,
|  | int | minor,
|  | int | patch,
|  | char | delimeter = `'.'`
| ) |  |

## ◆ VersionEx() [3/4]

LicenseSpring::VersionEx::VersionEx | ( | int | major,
|  | int | minor,
|  | int | patch,
|  | int | build,
|  | char | delimeter = `'.'`
| ) |  |

## ◆ VersionEx() [4/4]

LicenseSpring::VersionEx::VersionEx | ( | const std::string & | version,
|  | char | delimeter = `'.'`
| ) |  |

## Member Function Documentation

## ◆ setPrereleaseType()

void LicenseSpring::VersionEx::setPrereleaseType | ( | PrereleaseType | type | ) |
| inline

Definition at line 155 of file Version.h.

## ◆ prereleaseType()

PrereleaseType LicenseSpring::VersionEx::prereleaseType | ( |  | ) | const
| inline

Definition at line 156 of file Version.h.

## ◆ isPrerelease()

bool LicenseSpring::VersionEx::isPrerelease | ( |  | ) | const
| inline

Definition at line 157 of file Version.h.

## ◆ prereleaseVersion()

const std::string& LicenseSpring::VersionEx::prereleaseVersion | ( |  | ) | const
| inline

Definition at line 159 of file Version.h.

## ◆ setPrereleaseVersion()

void LicenseSpring::VersionEx::setPrereleaseVersion | ( | const std::string & | version | ) |
| inline

Definition at line 160 of file Version.h.

## ◆ buildMetadata()

const std::string& LicenseSpring::VersionEx::buildMetadata | ( |  | ) | const
| inline

Definition at line 162 of file Version.h.

## ◆ setBuildMetadata()

void LicenseSpring::VersionEx::setBuildMetadata | ( | const std::string & | data | ) |
| inline

Definition at line 163 of file Version.h.

## ◆ toString()

std::string LicenseSpring::VersionEx::toString | ( |  | ) | const
| override virtual

Reimplemented from LicenseSpring::Version.

## ◆ compare()

int LicenseSpring::VersionEx::compare | ( | const VersionBase & | baseVer | ) | const
| override virtual

Reimplemented from LicenseSpring::Version.

## ◆ fromString()

static VersionEx LicenseSpring::VersionEx::fromString | ( | const std::string & | input,
|  | char | delimeter = `'.'`
| ) |  |
| static

The documentation for this class was generated from the following file:

- LicenseSpring/Version.h