PLCnext API Documentation  22.9.0.33
RscGuid.hpp
1 //
3 // Copyright PHOENIX CONTACT Electronics GmbH
4 //
6 #pragma once
7 #include "Arp/System/Core/Arp.h"
8 #include "Arp/System/Commons/Configuration/Uuid.hpp"
9 
10 namespace Arp { namespace System { namespace Rsc { namespace Services
11 {
12 
13 // forwards
14 class RscReader;
15 class RscWriter;
16 
17 class RscGuid
18 {
19 public: // typedefs//usings
21 
22 public: // construction/destruction
24  RscGuid(void) = default;
27  RscGuid(const Uuid& uuid);
29  RscGuid(const RscGuid& arg) = default;
31  RscGuid(RscGuid&& arg) = default;
33  RscGuid& operator=(const RscGuid& arg) = default;
35  ~RscGuid(void) = default;
36 
37 public: // RscValueAdapter operations
40  void Read(RscReader& reader);
43  void Write(RscWriter& writer)const;
44 
45 public: // operations
48  Uuid ToUuid(void)const;
49 
52  String ToString(void)const;
53 
54 private: // static fields
55  static const size_t bufferSize = 16;
56 
57 private: // fields
58  byte buffer[bufferSize];
59 };
60 
62 // inline methods of class RscGuid
63 
64 }}}} // end of namespace Arp::System::Rsc::Services
This is a small immutable wrapper around the boost::uuids::uuid class and represents a universal uniq...
Definition: Uuid.hpp:19
Definition: RscGuid.hpp:18
String ToString(void) const
Converts this instance into a String.
void Write(RscWriter &writer) const
Writes this instance to the given RscWriter.
void Read(RscReader &reader)
Reads this instance from the given RscReader.
RscGuid & operator=(const RscGuid &arg)=default
Assignment operator.
~RscGuid(void)=default
Destructs this instance and frees all resources.
RscGuid(void)=default
Constructs an RscGuid instance.
RscGuid(const RscGuid &arg)=default
Copy constructor.
Uuid ToUuid(void) const
Converts this instance into a Uuid.
RscGuid(const Uuid &uuid)
Constructs a RscGuid from the given Uuid argument.
RscGuid(RscGuid &&arg)=default
Move constructor.
Reads data from Rsc
Definition: RscReader.hpp:26
Writes data to Rsc.
Definition: RscWriter.hpp:31
@ System
System components used by the System, Device, Plc or Io domains.
Root namespace for the PLCnext API