PLCnext API Documentation 23.6.0.37
IRscReadEnumerator.hxx
1
2//
3// Copyright PHOENIX CONTACT Electronics GmbH
4//
6#pragma once
8
9namespace Arp { namespace System { namespace Rsc { namespace Services
10{
11
12// forwards
13class RscArrayReader;
14
19template<class T>
21{
22public: // typedefs
23 typedef std::shared_ptr<IRscReadEnumerator> Ptr;
24
25protected: // construction/destruction
27 IRscReadEnumerator(void) = default;
28
30 virtual ~IRscReadEnumerator(void) = default;
31
32public: // abstract operations
35 virtual size_t BeginRead(void) = 0;
36
40 virtual bool ReadNext(T& current) = 0;
41
45 virtual bool ReadNext(RscArrayReader& current) = 0;
46
48 virtual void EndRead(void) = 0;
49
50protected: // deleted methods
51 IRscReadEnumerator(const IRscReadEnumerator& arg) = default;
52 IRscReadEnumerator& operator=(const IRscReadEnumerator& arg) = default;
53
54public:
55 static constexpr size_t UndefinedArrayLength = std::numeric_limits<size_t>::max();
56};
57
58}}}} // end of namespace Arp::System::Rsc::Services
Interface for reading an array or an enumerator. For regular enumerators UndefinedArrayLength is used...
Definition: IRscReadEnumerator.hxx:21
virtual void EndRead(void)=0
Ends the operation to read the enumerator. All enumerator elements had to be already been read.
virtual ~IRscReadEnumerator(void)=default
Destructs this instance and frees all resources.
virtual bool ReadNext(RscArrayReader &current)=0
Reads the next array enumerator element. Use this method only, if element contains object with an arr...
virtual bool ReadNext(T &current)=0
Reads the next enumerator element.
virtual size_t BeginRead(void)=0
Begins the operation to read the enumerator.
IRscReadEnumerator(void)=default
Constructs an IRscArrayWriteEnumerator instance.
Helper class to read an array of primtive types from an RscVariant. This class uses the array informa...
Definition: RscArrayReader.hpp:23
@ System
System components used by the System, Device, Plc or Io domains.
Root namespace for the PLCnext API