PLCnext API Documentation 23.6.0.37
Public Types | Public Member Functions | Public Attributes | List of all members
Arp::System::Rsc::Services::RscImplReadEnumerator< T > Class Template Reference

Implements IRscReadEnumeratorfor the service implementations. This should only be used in the implementation. The read callbacks have to be implemented and set by the service. More...

#include <RscImplReadEnumerator.hxx>

Inheritance diagram for Arp::System::Rsc::Services::RscImplReadEnumerator< T >:
Inheritance graph

Public Types

typedef std::function< size_t()> BeginFunction
 
typedef std::function< bool(T &)> NextFunction
 
typedef std::function< bool(RscArrayReader &)> NextArrayFunction
 
typedef std::function< void()> EndFunction
 
- Public Types inherited from Arp::System::Rsc::Services::IRscReadEnumerator< T >
typedef std::shared_ptr< IRscReadEnumeratorPtr
 

Public Member Functions

 RscImplReadEnumerator (void)=default
 Constructs an RscImplReadEnumerator instance.
 
 RscImplReadEnumerator (const RscImplReadEnumerator &arg)=default
 Copy constructor.
 
RscImplReadEnumeratoroperator= (const RscImplReadEnumerator &arg)=default
 Assignment operator.
 
 ~RscImplReadEnumerator (void)=default
 Destructs this instance and frees all resources.
 
size_t BeginRead (void) override
 Begins the operation to read the enumerator. More...
 
bool ReadNext (T &) override
 Reads the next enumerator element. More...
 
bool ReadNext (RscArrayReader &current) override
 Reads the next array enumerator element. Use this method only, if element contains object with an array. More...
 
void EndRead (void) override
 Ends the operation to read the enumerator. All enumerator elements had to be already been read. More...
 
virtual size_t BeginRead (void)=0
 Begins the operation to read the enumerator. More...
 
virtual bool ReadNext (T &current)=0
 Reads the next enumerator element. More...
 
virtual bool ReadNext (RscArrayReader &current)=0
 Reads the next array enumerator element. Use this method only, if element contains object with an array. More...
 
virtual void EndRead (void)=0
 Ends the operation to read the enumerator. All enumerator elements had to be already been read. More...
 

Public Attributes

BeginFunction Begin
 Read callback to BeginRead implementation of service method.
 
NextFunction Next
 Write callback to ReadNext implementation of service method.
 
NextArrayFunction NextArray
 Write callback to ReadNext implementation for array elements of service method.
 
EndFunction End
 Write callback to EndRead implementation of service method.
 

Additional Inherited Members

- Static Public Attributes inherited from Arp::System::Rsc::Services::IRscReadEnumerator< T >
static constexpr size_t UndefinedArrayLength = std::numeric_limits<size_t>::max()
 
- Protected Member Functions inherited from Arp::System::Rsc::Services::IRscReadEnumerator< T >
 IRscReadEnumerator (void)=default
 Constructs an IRscArrayWriteEnumerator instance.
 
virtual ~IRscReadEnumerator (void)=default
 Destructs this instance and frees all resources.
 
 IRscReadEnumerator (const IRscReadEnumerator &arg)=default
 
IRscReadEnumeratoroperator= (const IRscReadEnumerator &arg)=default
 

Detailed Description

template<class T>
class Arp::System::Rsc::Services::RscImplReadEnumerator< T >

Implements IRscReadEnumeratorfor the service implementations. This should only be used in the implementation. The read callbacks have to be implemented and set by the service.

Member Function Documentation

◆ BeginRead()

template<class T >
size_t Arp::System::Rsc::Services::RscImplReadEnumerator< T >::BeginRead ( void  )
inlineoverridevirtual

Begins the operation to read the enumerator.

Returns
Number of elements for array enumerators. UndefinedArrayLength for regular enumerators

Implements Arp::System::Rsc::Services::IRscReadEnumerator< T >.

◆ EndRead()

template<class T >
void Arp::System::Rsc::Services::RscImplReadEnumerator< T >::EndRead ( void  )
inlineoverridevirtual

Ends the operation to read the enumerator. All enumerator elements had to be already been read.

Implements Arp::System::Rsc::Services::IRscReadEnumerator< T >.

◆ ReadNext() [1/2]

template<class T >
bool Arp::System::Rsc::Services::RscImplReadEnumerator< T >::ReadNext ( RscArrayReader current)
inlineoverridevirtual

Reads the next array enumerator element. Use this method only, if element contains object with an array.

Parameters
currentReference to RscArrayReader. The given RscArrayReader will be configured by this method.
Returns
true if valid element was read

Implements Arp::System::Rsc::Services::IRscReadEnumerator< T >.

◆ ReadNext() [2/2]

template<class T >
bool Arp::System::Rsc::Services::RscImplReadEnumerator< T >::ReadNext ( T &  current)
inlineoverridevirtual

Reads the next enumerator element.

Parameters
currentPlace to store next element
Returns
true if valid element was read

Implements Arp::System::Rsc::Services::IRscReadEnumerator< T >.


The documentation for this class was generated from the following file: