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

Public Member Functions | Static Public Member Functions | Static Public Attributes | Protected Attributes | List of all members
LicenseSpring::Version Class Reference

Simple class for handling app versions. Format: Major.Minor.Patch.Build, where all parts are integer numbers. In case you use such version format without alphabetical symbols then it fits your needs. For example: "1.3.0.45", "2.13.1.3735". More...

`#include <LicenseSpring/Version.h>`

Inheritance diagram for LicenseSpring::Version:

## Public Member Functions
| 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
std::string | toString () const override
int | compare (const VersionBase &baseVer) 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 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)

## Static Public Attributes
static Version | InvalidVersion
Static Public Attributes inherited from LicenseSpring::VersionBase
static constexpr int | INVALID_VERSION_NUMBER = -1

## Protected Attributes
int | m_patch
int | m_build
Protected Attributes inherited from LicenseSpring::VersionBase
int | m_major
int | m_minor
char | m_delimeter

## Detailed Description

Simple class for handling app versions. Format: Major.Minor.Patch.Build, where all parts are integer numbers. In case you use such version format without alphabetical symbols then it fits your needs. For example: "1.3.0.45", "2.13.1.3735".

Definition at line 66 of file Version.h.

## Constructor & Destructor Documentation

## ◆ Version() [1/5]

LicenseSpring::Version::Version | ( |  | ) |

## ◆ Version() [2/5]

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

## ◆ Version() [3/5]

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

## ◆ Version() [4/5]

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

## ◆ Version() [5/5]

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

## Member Function Documentation

## ◆ patchVersion()

int LicenseSpring::Version::patchVersion | ( |  | ) | const
| inline

Definition at line 75 of file Version.h.

## ◆ buildVersion()

int LicenseSpring::Version::buildVersion | ( |  | ) | const
| inline

Definition at line 76 of file Version.h.

## ◆ hasPatchVersion()

bool LicenseSpring::Version::hasPatchVersion | ( |  | ) | const
| inline

Definition at line 77 of file Version.h.

## ◆ hasBuildVersion()

bool LicenseSpring::Version::hasBuildVersion | ( |  | ) | const
| inline

Definition at line 78 of file Version.h.

## ◆ setPatchVersion()

void LicenseSpring::Version::setPatchVersion | ( | int | number | ) |

## ◆ setBuildVersion()

void LicenseSpring::Version::setBuildVersion | ( | int | number | ) |

## ◆ length()

size_t LicenseSpring::Version::length | ( |  | ) | const
| override virtual

Reimplemented from LicenseSpring::VersionBase.

## ◆ toString()

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

Reimplemented from LicenseSpring::VersionBase.

Reimplemented in LicenseSpring::VersionEx.

## ◆ compare()

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

Reimplemented from LicenseSpring::VersionBase.

Reimplemented in LicenseSpring::VersionEx.

## ◆ fromString()

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

## Member Data Documentation

## ◆ InvalidVersion

Version LicenseSpring::Version::InvalidVersion
| static

Definition at line 90 of file Version.h.

## ◆ m_patch

int LicenseSpring::Version::m_patch
| protected

Definition at line 93 of file Version.h.

## ◆ m_build

int LicenseSpring::Version::m_build
| protected

Definition at line 94 of file Version.h.

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

- LicenseSpring/Version.h