PLCnext API Documentation 25.0.2.69
|
Implements IRscWriteEnumerator to be used from within service implementations. More...
#include <RscImplWriteEnumerator.hxx>
Public Types | |
using | BeginFunction = std::function< void(size_t)> |
The prototype of the Begin function. | |
using | NextFunction = std::function< void(const T &)> |
The prototype of the Next function. | |
using | NextArrayFunction = std::function< RscArrayWriter(size_t, RscType)> |
The prototype of the NextArray function. | |
using | EndFunction = std::function< void()> |
The prototype of the End function. | |
![]() | |
using | Ptr = std::shared_ptr< IRscWriteEnumerator > |
The pointer type of this class. | |
Public Member Functions | |
RscImplWriteEnumerator (void) | |
Constructs an RscImplWriteEnumerator instance. More... | |
void | BeginWrite (size_t) override |
This operation is called at the begin of writing the enumeration. More... | |
void | WriteNext (const T &) override |
Writes the next element of the enumeration. More... | |
RscArrayWriter | WriteNext (size_t arraySize, RscType elementType) override |
Writes the next array element of the enumeration. More... | |
void | EndWrite (void) override |
This operation is called at the end of writing the enumeration to perform any flushing code or similar. More... | |
![]() | |
IRscWriteEnumerator (void)=default | |
The default constructor. | |
IRscWriteEnumerator (const IRscWriteEnumerator &arg)=delete | |
The deleted copy constructor. More... | |
IRscWriteEnumerator (IRscWriteEnumerator &&arg) noexcept=default | |
The default move constructor. More... | |
IRscWriteEnumerator & | operator= (const IRscWriteEnumerator &arg)=delete |
The deleted assignment operator. More... | |
IRscWriteEnumerator & | operator= (IRscWriteEnumerator &&arg) noexcept=default |
The default move-assignment operator. More... | |
virtual | ~IRscWriteEnumerator (void)=default |
Destructs this instance and frees all resources. | |
virtual void | BeginWrite (size_t size=UndefinedArrayLength)=0 |
Begins the writing of the enumeration. More... | |
virtual void | WriteNext (const T ¤t)=0 |
Writes the next enumeration value. More... | |
virtual RscArrayWriter | WriteNext (size_t arraySize, RscType elementType)=0 |
Writes the next enumeration value if the value contains an array object. More... | |
virtual void | EndWrite (void)=0 |
Ends this enumerator while all values shall be written if this is an array enumeration. More... | |
Public Attributes | |
BeginFunction | Begin |
Write delegate to BeginWrite implementation of service method. | |
NextFunction | Next |
Write delegate to WriteNext implementation of service method. | |
NextArrayFunction | NextArray |
Write delegate to WriteNext implementation for array elements of service method. | |
EndFunction | End |
Write delegate to EndWrite implementation of service method. | |
Additional Inherited Members | |
![]() | |
static constexpr size_t | UndefinedArrayLength = std::numeric_limits<size_t>::max() |
Determines an undefined array length. | |
Implements IRscWriteEnumerator to be used from within service implementations.
This should only be used in the service implementation. The write callbacks (lambdas) have to be implemented and set by the service.
|
inlinedefault |
Constructs an RscImplWriteEnumerator instance.
T | The enumerated type. |
|
inlineoverridevirtual |
This operation is called at the begin of writing the enumeration.
count | The number of elements of the enumeration to write. |
T | The enumerated type. |
Implements Arp::Base::Rsc::Commons::IRscWriteEnumerator< T >.
|
inlineoverridevirtual |
This operation is called at the end of writing the enumeration to perform any flushing code or similar.
T | The enumerated type. |
Implements Arp::Base::Rsc::Commons::IRscWriteEnumerator< T >.
|
inlineoverridevirtual |
Writes the next element of the enumeration.
current | The element to write. |
T | The enumerated type. |
Implements Arp::Base::Rsc::Commons::IRscWriteEnumerator< T >.
|
inlineoverridevirtual |
Writes the next array element of the enumeration.
arraySize | The size of the current array to write. |
elementType | The element type of the current array to write. |
T | The enumerated type. |
Implements Arp::Base::Rsc::Commons::IRscWriteEnumerator< T >.