PLCnext API Documentation  22.9.0.33
IRscSerializable.hpp
1 //
3 // Copyright PHOENIX CONTACT Electronics GmbH
4 //
6 #pragma once
7 #include "Arp/System/Rsc/Services/Rsc.h"
8 
9 
10 namespace Arp { namespace System { namespace Rsc { namespace Services
11 {
12 
13 // forwards
14 class RscWriter;
15 class RscReader;
16 
19 {
20 public:
22  virtual ~IRscSerializable() = default;
23 
24 public: // policy operations: should be implemented by any class complying with this policy
27  virtual void Serialize(RscWriter& writer)const = 0;
28 
31  virtual void Deserialize(RscReader& reader) = 0;
32 
36  static size_t GetFieldCount(void);
37 };
38 
39 }}}} // end of namespace Arp::System::Rsc::Services
Marshalls structure or class data types. Serialize and Deserialize have to marshal fields in the same...
Definition: IRscSerializable.hpp:19
virtual void Serialize(RscWriter &writer) const =0
Serializes the datatype. All fields of the datatype have to be serialized in use of RscWriter.
static size_t GetFieldCount(void)
Returns the count of fields of the struct type
virtual void Deserialize(RscReader &reader)=0
Deserializes the datatype. All fields of the datatype have to be deserialized in use of RscReader.
virtual ~IRscSerializable()=default
default destructor
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