PLCnext API Documentation 23.6.0.37
IRscSerializable.hpp
1
2//
3// Copyright PHOENIX CONTACT Electronics GmbH
4//
6#pragma once
8#include "Arp/System/Rsc/Services/Rsc.h"
9
10
11namespace Arp { namespace System { namespace Rsc { namespace Services
12{
13
14// forwards
15class RscWriter;
16class RscReader;
17
19class ARP_CXX_SYMBOL_EXPORT IRscSerializable
20{
21public:
23 virtual ~IRscSerializable() = default;
24
25public: // policy operations: should be implemented by any class complying with this policy
28 virtual void Serialize(RscWriter& writer)const = 0;
29
32 virtual void Deserialize(RscReader& reader) = 0;
33
37 static size_t GetFieldCount(void);
38};
39
40}}}} // 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:20
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:27
Writes data to Rsc.
Definition: RscWriter.hpp:32
@ System
System components used by the System, Device, Plc or Io domains.
Root namespace for the PLCnext API