PLCnext API Documentation 25.0.2.69
|
This class provides versioning. More...
#include <Version.hpp>
Public Types | |
using | Value = uint32 |
Public Member Functions | |
Version (Value major, Value minor=0, Value patch=0, Value build=0) | |
Constructs an Version instance. More... | |
Version (void) | |
Default constructor. | |
Version (const Version &arg) | |
Default copy constructor. | |
Version (Version &&arg) noexcept | |
Default move constructor. | |
Version & | operator= (const Version &arg) |
Default copy-assignment operator. | |
Version & | operator= (Version &&arg) noexcept |
Default move-assignment operator. | |
~Version (void) | |
Default destructor. | |
Value | GetMajor (void) const |
Gets the major version. More... | |
Value | GetMinor (void) const |
Gets the minor version. More... | |
Value | GetPatch (void) const |
Gets the patch version. More... | |
Value | GetBuildNumber (void) const |
Gets the build number. More... | |
String | ToString (void) const |
Converts this version to a string as explained here Version. More... | |
Version (Value major, Value minor, Value patch, Value build, const String &state, const String &name) | |
DEPRECATED. More... | |
const String & | GetName (void) const |
DEPRECATED. More... | |
const String & | GetState (void) const |
DEPRECATED. More... | |
Impl & | GetImpl (void) |
For internal use only. | |
const Impl & | GetImpl (void) const |
Static Public Member Functions | |
static Version | Parse (const String &input) |
Parses the given input string and creates a new version from it. More... | |
static bool | TryParse (const String &input, Version &result) |
Tries to parse the given input string and to create a new version from it. More... | |
Friends | |
ARP_EXPORT bool | operator== (const Version &left, const Version &right) |
Compares the left argument to the right argument on equality More... | |
ARP_EXPORT std::strong_ordering | operator<=> (const Version &left, const Version &right) |
Threeway compares the left argument to the right argument More... | |
ARP_EXPORT std::ostream & | operator<< (std::ostream &os, const Version &arg) |
ARP_EXPORT std::istream & | operator>> (std::istream &is, Version &arg) |
This class provides versioning.
The total version consists of major, minor, patch and build versions.
|
explicit |
Constructs an Version instance.
major | The major version. |
minor | The minor version. |
patch | The patch version. |
build | The build version. |
Arp::Base::Core::Version::Version | ( | Value | major, |
Value | minor, | ||
Value | patch, | ||
Value | build, | ||
const String & | state, | ||
const String & | name | ||
) |
DEPRECATED.
Use class ArpVersion instead.
Version::Value Arp::Base::Core::Version::GetBuildNumber | ( | void | ) | const |
Gets the build number.
Version::Value Arp::Base::Core::Version::GetMajor | ( | void | ) | const |
Gets the major version.
Version::Value Arp::Base::Core::Version::GetMinor | ( | void | ) | const |
Gets the minor version.
const String & Arp::Base::Core::Version::GetName | ( | void | ) | const |
DEPRECATED.
Use class ArpVersion instead.
Version::Value Arp::Base::Core::Version::GetPatch | ( | void | ) | const |
Gets the patch version.
const String & Arp::Base::Core::Version::GetState | ( | void | ) | const |
DEPRECATED.
Use class ArpVersion instead.
Parses the given input string and creates a new version from it.
input | The input string to parse. |
Exception | If the input string is not valid. |
String Arp::Base::Core::Version::ToString | ( | void | ) | const |
Converts this version to a string as explained here Version.
Tries to parse the given input string and to create a new version from it.
input | The input string to parse. |
result | The resulting version. |
true
if the given input string could be parsed, otherwise false
.Threeway compares the left argument to the right argument
left | The left argument to compare the right argument to. |
right | The right argument to be compared to the left argument. |
std::strong_ordering
result valueOther comparison operators like <, <=, >, >= will be generated by the compiler based on this function.
Compares the left argument to the right argument on equality
left | The left argument to compare the right argument to. |
right | The right argument to be compared to the left argument. |
true
if the left argument is equal to the right argument, otherwise false
.