PLCnext API Documentation 25.0.2.69
Public Types | Public Member Functions | Friends | List of all members
Arp::Base::Rsc::Commons::RscVersion Class Reference

Specifies a complex version with 4 version numbers and is marshalled to .NET type System.Version. More...

#include <RscVersion.hpp>

Public Types

using Value = Version::Value
 The value type of version numbers.
 

Public Member Functions

 RscVersion (void)
 Constructs a zeroed RscVersion instance.
 
 RscVersion (Value major, Value minor, Value revision, Value build)
 Constructs a RscVersion instance by the given arguments. More...
 
 RscVersion (const Version &version)
 Constructs a RscVersion instance by the given argument. More...
 
Value GetMajor (void) const
 Gets the major version. More...
 
Value GetMinor (void) const
 Gets the minor version. More...
 
Value GetRevision (void) const
 Gets the revision version. More...
 
Value GetBuild (void) const
 Gets the build version. More...
 
String ToString (void) const
 Converts this instance into a String. More...
 
Version ToVersion (void) const
 Converts this instance into a Arp::Version. More...
 
void Read (RscReader &reader)
 Reads this instance from the RscReader. More...
 
void Write (RscWriter &writer) const
 Writes this instance to the given RscWriter. More...
 

Friends

ARP_EXPORT bool operator== (const RscVersion &left, const RscVersion &right)
 Compares the left argument to the right argument on equality More...
 
ARP_EXPORT std::strong_ordering operator<=> (const RscVersion &left, const RscVersion &right)
 Three-way compares the left argument to the right argument More...
 

Detailed Description

Specifies a complex version with 4 version numbers and is marshalled to .NET type System.Version.

Specifies a version with 4 version numbers like 1.2.3.4, where 1 is the major version, 2 is the minor version, 3 is the revision version and 4 is the build version,

Constructor & Destructor Documentation

◆ RscVersion() [1/2]

Arp::Base::Rsc::Commons::RscVersion::RscVersion ( Value  major,
Value  minor,
Value  revision,
Value  build 
)

Constructs a RscVersion instance by the given arguments.

Parameters
majorThe major version.
minorThe minor version.
revisionThe revision version.
buildThe build version.

◆ RscVersion() [2/2]

Arp::Base::Rsc::Commons::RscVersion::RscVersion ( const Version version)

Constructs a RscVersion instance by the given argument.

Parameters
versionThe Arp version to copy the version numbers from.

Member Function Documentation

◆ GetBuild()

RscVersion::Value Arp::Base::Rsc::Commons::RscVersion::GetBuild ( void  ) const

Gets the build version.

Returns
The build version.

◆ GetMajor()

RscVersion::Value Arp::Base::Rsc::Commons::RscVersion::GetMajor ( void  ) const

Gets the major version.

Returns
The major version.

◆ GetMinor()

RscVersion::Value Arp::Base::Rsc::Commons::RscVersion::GetMinor ( void  ) const

Gets the minor version.

Returns
The minor version.

◆ GetRevision()

RscVersion::Value Arp::Base::Rsc::Commons::RscVersion::GetRevision ( void  ) const

Gets the revision version.

Returns
The revision version.

◆ Read()

void Arp::Base::Rsc::Commons::RscVersion::Read ( RscReader reader)

Reads this instance from the RscReader.

Parameters
readerThe RscReader to read this instance from.

◆ ToString()

String Arp::Base::Rsc::Commons::RscVersion::ToString ( void  ) const

Converts this instance into a String.

Returns
The String representing this instance.

◆ ToVersion()

Version Arp::Base::Rsc::Commons::RscVersion::ToVersion ( void  ) const

Converts this instance into a Arp::Version.

Returns
The Arp::Version representing this instance.

◆ Write()

void Arp::Base::Rsc::Commons::RscVersion::Write ( RscWriter writer) const

Writes this instance to the given RscWriter.

Parameters
writerThe RscWriter to write this instance to.

Friends And Related Function Documentation

◆ operator<=>

ARP_EXPORT std::strong_ordering operator<=> ( const RscVersion left,
const RscVersion right 
)
friend

Three-way compares the left argument to the right argument

Parameters
leftThe left argument to compare the right argument to.
rightThe right argument to be compared to the left argument.
Returns
std::strong_ordering result value

Other comparison operators like <, <=, >, >= will be generated by the compiler based on this function.

◆ operator==

ARP_EXPORT bool operator== ( const RscVersion left,
const RscVersion right 
)
friend

Compares the left argument to the right argument on equality

Parameters
leftThe left argument to compare the right argument to.
rightThe right argument to be compared to the left argument.
Returns
true if the left argument is equal to the right argument, otherwise false.

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