PLCnext API Documentation 25.0.2.69
Public Member Functions | List of all members
Arp::Base::Core::Enumerator< T >::Empty< T > Class Template Reference

Implements an empty enumerator, that is, every call to Enumerator<T>::Empty::MoveNext() will return false. More...

#include <Enumerator.Empty.hxx>

Inheritance diagram for Arp::Base::Core::Enumerator< T >::Empty< T >:
Inheritance graph

Public Member Functions

 Empty (void)
 Constructs an Enumerator<T>::Empty instance.
 
 Empty (const Empty &arg)=delete
 
 Empty (Empty &&arg) noexcept
 Move constructor. More...
 
Emptyoperator= (const Empty &arg)=delete
 
Emptyoperator= (Empty &&arg) noexcept
 Move assignment operator. More...
 
 ~Empty (void) override
 Destructs this instance and frees all resources.
 
bool MoveNext (void) override
 Moves this enumerator to the next position. More...
 
GetCurrent (void) override
 Gets the element at the current position. More...
 
- Public Member Functions inherited from Arp::Base::Core::IEnumerator< T >
 IEnumerator (void)=default
 Constructs an IEnumerator instance.
 
 IEnumerator (const IEnumerator &arg)=default
 Deleted copy constructor.
 
 IEnumerator (IEnumerator &&arg) noexcept=default
 Move constructor.
 
IEnumeratoroperator= (const IEnumerator &arg)=default
 Deleted copy-assignment IEnumerator.
 
IEnumeratoroperator= (IEnumerator &&arg) noexcept=default
 Move-assignment operator.
 
virtual ~IEnumerator (void)=default
 Destructs this instance and frees all resources.
 
virtual bool MoveNext (void)=0
 Moves this enumerator to the next position. More...
 
virtual T GetCurrent (void)=0
 Gets the element at the current position. More...
 

Additional Inherited Members

- Public Types inherited from Arp::Base::Core::IEnumerator< T >
using Ptr = std::shared_ptr< IEnumerator >
 The smart pointer type of this interface.
 
using ValueType = T
 Type of the enumerated values
 

Detailed Description

template<class T>
template<class T>
class Arp::Base::Core::Enumerator< T >::Empty< T >

Implements an empty enumerator, that is, every call to Enumerator<T>::Empty::MoveNext() will return false.

Use Enumerator<T>::CreateEmpty() to create an instance of this class.

Constructor & Destructor Documentation

◆ Empty()

template<class T >
template<class T >
Arp::Base::Core::Enumerator< T >::Empty< T >::Empty ( Empty< T > &&  arg)
inlinedefaultnoexcept

Move constructor.

Parameters
argThe argument to move.

Member Function Documentation

◆ GetCurrent()

template<class T >
template<class T >
T Arp::Base::Core::Enumerator< T >::Empty< T >::GetCurrent ( void  )
inlineoverridevirtual

Gets the element at the current position.

Returns
The element at the current position.

Depending on the template parameter type of this interface, a reference or even const reference might be returned.

Exceptions
InvalidOperationExceptionWhen GetCurrent() is called before MoveNext() or after MoveNext() has returned false once.

Implements Arp::Base::Core::IEnumerator< T >.

◆ MoveNext()

template<class T >
template<class T >
bool Arp::Base::Core::Enumerator< T >::Empty< T >::MoveNext ( void  )
inlineoverridevirtual

Moves this enumerator to the next position.

Returns
false if the end of the container/collections/enumeration has reached, otherwise true.
See also
IEnumerator

Implements Arp::Base::Core::IEnumerator< T >.

◆ operator=()

template<class T >
template<class T >
Enumerator< T >::Empty & Arp::Base::Core::Enumerator< T >::Empty< T >::operator= ( Empty< T > &&  arg)
inlinedefaultnoexcept

Move assignment operator.

Parameters
argThe argument to move.
Returns
A reference of this instance.

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