PLCnext API Documentation 25.0.2.69
Public Member Functions | List of all members
Arp::Base::Rsc::Commons::Services::RscWriteEnumerator< T > Class Template Reference

Implementation of IRscWriteEnumerator used on client side. More...

#include <RscWriteEnumerator.hxx>

Inheritance diagram for Arp::Base::Rsc::Commons::Services::RscWriteEnumerator< T >:
Inheritance graph

Public Member Functions

 RscWriteEnumerator (RscWriter &rscWriter, bool isArrayEnumerator)
 Constructs an RscEnumeratorBase instance. More...
 
 RscWriteEnumerator (const RscWriteEnumerator &arg)=delete
 
 RscWriteEnumerator (RscWriteEnumerator &&arg) noexcept
 The default move constructor. More...
 
RscWriteEnumeratoroperator= (const RscWriteEnumerator &arg)=delete
 
RscWriteEnumeratoroperator= (RscWriteEnumerator &&arg) noexcept
 The default move-assignment operator. More...
 
 ~RscWriteEnumerator (void) noexcept
 Destructs this instance and checks if the enumerations has ended. More...
 
void BeginWrite (size_t currentArrayLength=(size_t) -1) override
 This operation is called at the begin of writing the enumeration. More...
 
void WriteNext (const T &current) override
 Writes the next value of the enumeration. More...
 
RscArrayWriter WriteNext (size_t arraySize, RscType arrayElementType) override
 Writes the next array value of the enumeration. More...
 
void EndWrite (void) override
 This operation has to be called when the enumerating has finished. More...
 
- Public Member Functions inherited from Arp::Base::Rsc::Commons::IRscWriteEnumerator< T >
 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...
 
IRscWriteEnumeratoroperator= (const IRscWriteEnumerator &arg)=delete
 The deleted assignment operator. More...
 
IRscWriteEnumeratoroperator= (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 &current)=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...
 

Additional Inherited Members

- Public Types inherited from Arp::Base::Rsc::Commons::IRscWriteEnumerator< T >
using Ptr = std::shared_ptr< IRscWriteEnumerator >
 The pointer type of this class.
 
- Static Public Attributes inherited from Arp::Base::Rsc::Commons::IRscWriteEnumerator< T >
static constexpr size_t UndefinedArrayLength = std::numeric_limits<size_t>::max()
 Determines an undefined array length.
 

Detailed Description

template<class T>
class Arp::Base::Rsc::Commons::Services::RscWriteEnumerator< T >

Implementation of IRscWriteEnumerator used on client side.

Constructor & Destructor Documentation

◆ RscWriteEnumerator() [1/2]

template<class T >
Arp::Base::Rsc::Commons::Services::RscWriteEnumerator< T >::RscWriteEnumerator ( RscWriter rscWriter,
bool  isArrayEnumerator 
)
inline

Constructs an RscEnumeratorBase instance.

Template Parameters
TThe enumerated type.
Parameters
rscWriterThe Rsc writer to write the data.
isArrayEnumeratorDetermines if it's an standard or array enumeration.

◆ RscWriteEnumerator() [2/2]

template<class T >
Arp::Base::Rsc::Commons::Services::RscWriteEnumerator< T >::RscWriteEnumerator ( RscWriteEnumerator< T > &&  arg)
inlinedefaultnoexcept

The default move constructor.

Template Parameters
TThe enumerated type.
Parameters
argThe argument to move.

◆ ~RscWriteEnumerator()

template<class T >
Arp::Base::Rsc::Commons::Services::RscWriteEnumerator< T >::~RscWriteEnumerator ( void  )
inlinedefaultnoexcept

Destructs this instance and checks if the enumerations has ended.

Template Parameters
TThe enumerated type.

Member Function Documentation

◆ BeginWrite()

template<class T >
void Arp::Base::Rsc::Commons::Services::RscWriteEnumerator< T >::BeginWrite ( size_t  currentArrayLength = (size_t) -1)
inlineoverridevirtual

This operation is called at the begin of writing the enumeration.

Parameters
currentArrayLengthThe length of the current array to write, for standard enumerator this should default to -1.
Template Parameters
TThe enumerated type.

Implements Arp::Base::Rsc::Commons::IRscWriteEnumerator< T >.

◆ EndWrite()

template<class T >
void Arp::Base::Rsc::Commons::Services::RscWriteEnumerator< T >::EndWrite ( void  )
inlineoverridevirtual

This operation has to be called when the enumerating has finished.

This operation checks if all values has been written and writes the end tag to signal the end of enumeration (in case of standard enumerations).

Implements Arp::Base::Rsc::Commons::IRscWriteEnumerator< T >.

◆ operator=()

template<class T >
RscWriteEnumerator< T > & Arp::Base::Rsc::Commons::Services::RscWriteEnumerator< T >::operator= ( RscWriteEnumerator< T > &&  arg)
defaultnoexcept

The default move-assignment operator.

Template Parameters
TThe enumerated type.
Parameters
argThe argument to assign.
Returns
This instance.

◆ WriteNext() [1/2]

template<class T >
void Arp::Base::Rsc::Commons::Services::RscWriteEnumerator< T >::WriteNext ( const T &  current)
inlineoverridevirtual

Writes the next value of the enumeration.

Template Parameters
TThe enumerated type.
Parameters
currentThe current value to write.

Implements Arp::Base::Rsc::Commons::IRscWriteEnumerator< T >.

◆ WriteNext() [2/2]

template<class T >
RscArrayWriter Arp::Base::Rsc::Commons::Services::RscWriteEnumerator< T >::WriteNext ( size_t  arraySize,
RscType  arrayElementType 
)
inlineoverridevirtual

Writes the next array value of the enumeration.

Template Parameters
TThe enumerated type.
Parameters
arraySizeThe size of the array to write.
arrayElementTypeThe element type of the array to write.
Returns
An instance of RscArrayWriter to write the array values.

Implements Arp::Base::Rsc::Commons::IRscWriteEnumerator< T >.


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