PLCnext API Documentation 25.0.2.69
Public Types | Public Member Functions | Static Public Member Functions | Friends | List of all members
Arp::Base::Core::ArpVersion Class Reference

This class compounds Arp build version and infos. More...

#include <ArpVersion.hpp>

Public Types

using Value = Version::Value
 

Public Member Functions

 ArpVersion (const ArpVersion &arg)
 Default copy constructor.
 
 ArpVersion (ArpVersion &&arg) noexcept
 Default move constructor.
 
ArpVersionoperator= (const ArpVersion &arg)
 Default copy-assignment operator.
 
ArpVersionoperator= (ArpVersion &&arg) noexcept
 Default move-assignment operator.
 
 ~ArpVersion (void)
 Default destructor.
 
 ArpVersion (void)
 Default constructor.
 
 ArpVersion (Value major, const String &state="", const String &name="")
 Constructs an ArpVersion instance. More...
 
 ArpVersion (Value major, Value minor, const String &state="", const String &name="")
 Constructs an ArpVersion instance. More...
 
 ArpVersion (Value major, Value minor, Value patch, const String &state="", const String &name="")
 Constructs an ArpVersion instance. More...
 
 ArpVersion (Value major, Value minor, Value patch, Value build, const String &state="", const String &name="")
 Constructs an ArpVersion instance. More...
 
const StringGetName (void) const
 Gets the name of this released ArpVersion. More...
 
const StringGetState (void) const
 Gets the state of this ArpVersion. More...
 
const VersionGetBuildVersion (void) const
 Gets the versions of this ArpVersion. More...
 
String ToString (void) const
 Converts this version into string. More...
 
 ARP_DEPRECATED ("Use ArpVersion::GetBuildVersion().GetMajor() instead.") uint8 GetMajor(void) const
 
 ARP_DEPRECATED ("Use ArpVersion::GetBuildVersion().GetMinor() instead.") uint8 GetMinor(void) const
 
 ARP_DEPRECATED ("Use ArpVersion::GetBuildVersion().GetPatch() instead.") uint8 GetPatch(void) const
 
 ARP_DEPRECATED ("Use ArpVersion::GetBuildVersion().GetBuildNumber() instead.") uint32 GetBuild(void) const
 
Impl & GetImpl (void)
 For internal use only.
 
const Impl & GetImpl (void) const
 

Static Public Member Functions

static const ArpVersionGetCurrent (void)
 Returns the build version of the actual running firmware. More...
 
static ArpVersion Parse (const String &input)
 Parses the given input string and creates a new ArpVersion. More...
 
static bool TryParse (const String &input, ArpVersion &result)
 Tries to parse the given input string and creates a new ArpVersion. More...
 

Friends

ARP_EXPORT friend bool operator== (const ArpVersion &left, const ArpVersion &right)
 Compares the left argument to the right argument on equality More...
 
ARP_EXPORT bool operator> (const ArpVersion &left, const ArpVersion &right)
 DEPRECATED. More...
 
ARP_EXPORT bool operator< (const ArpVersion &left, const ArpVersion &right)
 DEPRECATED. More...
 
ARP_EXPORT bool operator>= (const ArpVersion &left, const ArpVersion &right)
 DEPRECATED. More...
 
ARP_EXPORT bool operator<= (const ArpVersion &left, const ArpVersion &right)
 DEPRECATED. More...
 

Detailed Description

This class compounds Arp build version and infos.

The Arp version consists of the build version (major, minor, patch and consecutive build number), a release state (alpha, beta, ...) and the full version name in particular like '2022.0.8 LTS'.

Constructor & Destructor Documentation

◆ ArpVersion() [1/4]

Arp::Base::Core::ArpVersion::ArpVersion ( Value  major,
const String state = "",
const String name = "" 
)

Constructs an ArpVersion instance.

Parameters
majorThe major version integral number.
stateThe state appendix.
nameThe name of the released version.

◆ ArpVersion() [2/4]

Arp::Base::Core::ArpVersion::ArpVersion ( Value  major,
Value  minor,
const String state = "",
const String name = "" 
)

Constructs an ArpVersion instance.

Parameters
majorThe major version integral number.
minorThe minor version integral number.
stateThe state appendix.
nameThe name of the released version.

◆ ArpVersion() [3/4]

Arp::Base::Core::ArpVersion::ArpVersion ( Value  major,
Value  minor,
Value  patch,
const String state = "",
const String name = "" 
)

Constructs an ArpVersion instance.

Parameters
majorThe major version integral number.
minorThe minor version integral number.
patchThe patch version integral number.
stateThe state appendix.
nameThe name of the released version.

◆ ArpVersion() [4/4]

Arp::Base::Core::ArpVersion::ArpVersion ( Value  major,
Value  minor,
Value  patch,
Value  build,
const String state = "",
const String name = "" 
)

Constructs an ArpVersion instance.

Parameters
majorThe major version integral number.
minorThe minor version integral number.
patchThe patch version integral number.
buildThe consecutive build version integral number.
stateThe state appendix.
nameThe name of the released version.

Member Function Documentation

◆ GetBuildVersion()

const Version & Arp::Base::Core::ArpVersion::GetBuildVersion ( void  ) const

Gets the versions of this ArpVersion.

Returns
The version numbers.

◆ GetCurrent()

const Version & Arp::ArpVersion::GetCurrent ( void  )
static

Returns the build version of the actual running firmware.

Returns
The version of the actual running firmware.

◆ GetName()

const String & Arp::Base::Core::ArpVersion::GetName ( void  ) const

Gets the name of this released ArpVersion.

Returns
The name of this released version.

◆ GetState()

const String & Arp::Base::Core::ArpVersion::GetState ( void  ) const

Gets the state of this ArpVersion.

Returns
The state of this version.

◆ Parse()

ArpVersion Arp::Base::Core::ArpVersion::Parse ( const String input)
static

Parses the given input string and creates a new ArpVersion.

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

◆ ToString()

String Arp::Base::Core::ArpVersion::ToString ( void  ) const

Converts this version into string.

Returns
A string representation of this version.

◆ TryParse()

bool Arp::Base::Core::ArpVersion::TryParse ( const String input,
ArpVersion result 
)
static

Tries to parse the given input string and creates a new ArpVersion.

Parameters
inputThe input string to parse.
resultThe resulting ArpVersion of the input string was valid, otherwise an empty instance.
Returns
true on success, otherwise false.

Friends And Related Function Documentation

◆ operator<

ARP_EXPORT bool operator< ( const ArpVersion left,
const ArpVersion right 
)
friend

DEPRECATED.

Use compare operator of ArpVersion::GetBuildVersion() instead.

◆ operator<=

ARP_EXPORT bool operator<= ( const ArpVersion left,
const ArpVersion right 
)
friend

DEPRECATED.

Use compare operator of ArpVersion::GetBuildVersion() instead.

◆ operator==

ARP_EXPORT friend bool operator== ( const ArpVersion left,
const ArpVersion 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.

operator!= is generated by the compiler.

◆ operator>

ARP_EXPORT bool operator> ( const ArpVersion left,
const ArpVersion right 
)
friend

DEPRECATED.

Use compare operator of ArpVersion::GetBuildVersion() instead.

◆ operator>=

ARP_EXPORT bool operator>= ( const ArpVersion left,
const ArpVersion right 
)
friend

DEPRECATED.

Use compare operator of ArpVersion::GetBuildVersion() instead.


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