PLCnext API Documentation  22.9.0.33
Public Types | Public Member Functions | Static Public Member Functions | List of all members
Arp::BasicVersion Class Reference

This class represents the version of a special SDK or Arp build. More...

#include <BasicVersion.hpp>

Public Types

typedef BasicString< char > String
 

Public Member Functions

 BasicVersion (void)=default
 The default constructor constructs an empty and zero'ed version. More...
 
 BasicVersion (uint8 majorVersion, const String &state=String(), const String &name=String())
 Constructor with arguments to initialize the version instance. More...
 
 BasicVersion (uint8 majorVersion, uint8 minorVersion, const String &state=String(), const String &name=String())
 Constructor with arguments to initialize the version instance. More...
 
 BasicVersion (uint8 majorVersion, uint8 minorVersion, uint8 patchVersion, const String &state=String(), const String &name=String())
 Constructor with arguments to initialize the version instance. More...
 
 BasicVersion (uint8 majorVersion, uint8 minorVersion, uint8 patchVersion, uint32 buildVersion, const String &state=String(), const String &name=String())
 Constructor with arguments to initialize the version instance. More...
 
 BasicVersion (const BasicVersion &arg)=default
 The default copy constructor. More...
 
 BasicVersion (BasicVersion &&arg)=default
 The default move constructor More...
 
BasicVersionoperator= (const BasicVersion &arg)=default
 The default assignment operator. More...
 
virtual ~BasicVersion (void)=default
 The default destructor. More...
 
bool operator== (const BasicVersion &arg) const
 Compares this instance to the given argument on equality More...
 
bool operator> (const BasicVersion &arg) const
 Compares this instance to the given argument. More...
 
bool operator< (const BasicVersion &arg) const
 Compares this instance to the given argument. More...
 
bool operator>= (const BasicVersion &arg) const
 Compares this instance to the given argument. More...
 
bool operator<= (const BasicVersion &arg) const
 Compares this instance to the given argument. More...
 
String GetName (void) const
 Gets the name of this released version. More...
 
uint8 GetMajor (void) const
 Gets the major version. More...
 
uint8 GetMinor (void) const
 Gets the minor version. More...
 
uint8 GetPatch (void) const
 Gets the patch version. More...
 
uint32 GetBuild (void) const
 Gets the build version. More...
 
String GetState (void) const
 Gets the state of this version. More...
 
String ToString (void) const
 Converts this version to a string as explained here BasicVersion. More...
 

Static Public Member Functions

static BasicVersion Parse (const String &input)
 Parses the given input string and creates a new version from it. More...
 
static bool TryParse (const String &input, BasicVersion &result)
 Tries to parse the given input string and to create a new version from it. More...
 

Detailed Description

This class represents the version of a special SDK or Arp build.

The version number string is build as follows

Major.Minor.Patch.Build

If the state of the version is not empty, it's appended to the version number. If the name of the version is not empty, the verions format is

Name (Major.Minor.Patch.Build State).

Examples:

Member Typedef Documentation

◆ String

Constructor & Destructor Documentation

◆ BasicVersion() [1/7]

Arp::BasicVersion::BasicVersion ( void  )
default

The default constructor constructs an empty and zero'ed version.

◆ BasicVersion() [2/7]

Arp::BasicVersion::BasicVersion ( uint8  majorVersion,
const String state = String(),
const String name = String() 
)
inline

Constructor with arguments to initialize the version instance.

Constructor with arguments to initialize the version instance.

Parameters
majorVersionThe major version.
stateThe state appendix.
nameThe name of the released version.

◆ BasicVersion() [3/7]

Arp::BasicVersion::BasicVersion ( uint8  majorVersion,
uint8  minorVersion,
const String state = String(),
const String name = String() 
)
inline

Constructor with arguments to initialize the version instance.

Constructor with arguments to initialize the version instance.

Parameters
majorVersionThe major version.
minorVersionThe minor version.
stateThe state appendix.
nameThe name of the released version.

◆ BasicVersion() [4/7]

Arp::BasicVersion::BasicVersion ( uint8  majorVersion,
uint8  minorVersion,
uint8  patchVersion,
const String state = String(),
const String name = String() 
)
inline

Constructor with arguments to initialize the version instance.

Parameters
majorVersionThe major version.
minorVersionThe minor version.
patchVersionThe patch version.
stateThe state appendix.
nameThe name of the released version.

◆ BasicVersion() [5/7]

Arp::BasicVersion::BasicVersion ( uint8  majorVersion,
uint8  minorVersion,
uint8  patchVersion,
uint32  buildVersion,
const String state = String(),
const String name = String() 
)
inline

Constructor with arguments to initialize the version instance.

Parameters
majorVersionThe major version.
minorVersionThe minor version.
patchVersionThe patch version.
buildVersionThe build version.
stateThe state appendix.
nameThe name of the released version.

◆ BasicVersion() [6/7]

Arp::BasicVersion::BasicVersion ( const BasicVersion arg)
default

The default copy constructor.

Parameters
argThe argument to copy.

◆ BasicVersion() [7/7]

Arp::BasicVersion::BasicVersion ( BasicVersion &&  arg)
default

The default move constructor

Parameters
argThe argument to move.

◆ ~BasicVersion()

virtual Arp::BasicVersion::~BasicVersion ( void  )
virtualdefault

The default destructor.

Member Function Documentation

◆ GetBuild()

uint32 Arp::BasicVersion::GetBuild ( void  ) const
inline

Gets the build version.

Returns
The build version.

◆ GetMajor()

uint8 Arp::BasicVersion::GetMajor ( void  ) const
inline

Gets the major version.

Returns
The major version.

◆ GetMinor()

uint8 Arp::BasicVersion::GetMinor ( void  ) const
inline

Gets the minor version.

Returns
The minor version.

◆ GetName()

BasicVersion::String Arp::BasicVersion::GetName ( void  ) const
inline

Gets the name of this released version.

Returns
The name of this released version.

◆ GetPatch()

uint8 Arp::BasicVersion::GetPatch ( void  ) const
inline

Gets the patch version.

Returns
The patch version.

◆ GetState()

BasicVersion::String Arp::BasicVersion::GetState ( void  ) const
inline

Gets the state of this version.

Returns
The state of this version.

◆ operator<()

bool Arp::BasicVersion::operator< ( const BasicVersion arg) const
inline

Compares this instance to the given argument.

Parameters
argThe argument to compare this instance to.
Returns
true if this instance is less than arg , otherwise false.

◆ operator<=()

bool Arp::BasicVersion::operator<= ( const BasicVersion arg) const
inline

Compares this instance to the given argument.

Parameters
argThe argument to compare this instance to.
Returns
true if this instance is less or equal than arg , otherwise false.

◆ operator=()

BasicVersion& Arp::BasicVersion::operator= ( const BasicVersion arg)
default

The default assignment operator.

Parameters
argThe argument to assign to this instance.
Returns
This instance as reference.

◆ operator==()

bool Arp::BasicVersion::operator== ( const BasicVersion arg) const
inline

Compares this instance to the given argument on equality

Parameters
argThe argument to compare this instance to.
Returns
true if this instance is equal to arg , otherwise false.

◆ operator>()

bool Arp::BasicVersion::operator> ( const BasicVersion arg) const
inline

Compares this instance to the given argument.

Parameters
argThe argument to compare this instance to.
Returns
true if this instance is greater than arg , otherwise false.

◆ operator>=()

bool Arp::BasicVersion::operator>= ( const BasicVersion arg) const
inline

Compares this instance to the given argument.

Parameters
argThe argument to compare this instance to.
Returns
true if this instance is greater or equal than to arg , otherwise false.

◆ Parse()

static BasicVersion Arp::BasicVersion::Parse ( const String input)
static

Parses the given input string and creates a new version from it.

Parameters
inputThe input string to parse.
Returns
The resulting version of the input string was valid
Exceptions
ExceptionIf the input string is not valid.

◆ ToString()

String Arp::BasicVersion::ToString ( void  ) const

Converts this version to a string as explained here BasicVersion.

Returns
The formatted version string.

◆ TryParse()

static bool Arp::BasicVersion::TryParse ( const String input,
BasicVersion result 
)
static

Tries to parse the given input string and to create a new version from it.

Parameters
inputThe input string to parse.
resultThe resulting version.
Returns
true if the given input string could be parsed, otherwise false.

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