PLCnext API Documentation 23.0.2.9
IRscSerializable.hpp
1
2//
3// Copyright PHOENIX CONTACT Electronics GmbH
4//
6#pragma once
7#include "Arp/System/Rsc/Services/Rsc.h"
8
9
10namespace Arp { namespace System { namespace Rsc { namespace Services
11{
12
13// forwards
14class RscWriter;
15class RscReader;
16
19{
20public:
22 virtual ~IRscSerializable() = default;
23
24public: // 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