PLCnext API Documentation 25.0.2.69
RscVersion.hpp
1
2//
3// Copyright Phoenix Contact GmbH & Co. KG
4//
6#pragma once
8#include "Arp/Base/Rsc/Commons/Rsc.hpp"
9
10namespace Arp::Base::Rsc::Commons
11{
12
13// type imports
16
22class ARP_EXPORT RscVersion
23{
24public: // usings
25 using Value = Version::Value;
26
27public: // construction
29 RscVersion(Value major, Value minor, Value revision, Value build);
30 RscVersion(const Version& version);
31
32public: // property operations
33 Value GetMajor(void)const;
34 Value GetMinor(void)const;
35 Value GetRevision(void)const;
36 Value GetBuild(void)const;
37
38public: // operations
39 String ToString(void)const;
40 Version ToVersion(void)const;
41
42public: // Rsc operations
43 void Read(RscReader& reader);
44 void Write(RscWriter& writer)const;
45
46public: // compare operators
47 friend ARP_EXPORT bool operator==(const RscVersion& left, const RscVersion& right);
48 friend ARP_EXPORT std::strong_ordering operator<=>(const RscVersion& left, const RscVersion& right);
49
50private: // fields
51 Value major = 0;
52 Value minor = 0;
53 Value revision = 0;
54 Value build = 0;
55};
56
57} // end of namespace Arp::Base::Rsc::Commons
This class represents the Arp String. The implementation is based on std::string.
Definition: String.hpp:39
This class provides versioning.
Definition: Version.hpp:19
Specifies a complex version with 4 version numbers and is marshalled to .NET type System....
Definition: RscVersion.hpp:23
Version::Value Value
The value type of version numbers.
Definition: RscVersion.hpp:25
RscVersion(void)
Constructs a zeroed RscVersion instance.
Reads marshaled data of RSC services.
Definition: RscReader.hpp:34
Writes marshalled data of RSC services.
Definition: RscWriter.hpp:34
@ Write
Specifies write access to the file. Data can be written to the file and the file pointer can be moved...
@ Read
Specifies read access to the file. Data can be read from the file and the file pointer can be moved....