8#include "Arp/Base/Core/Exception.hpp"
9#include "Arp/Base/Core/Detail/Enumerator.hxx"
12namespace Arp {
namespace Base {
namespace Core
69 throw Exception(
"Enumerator<T>::Empty::GetCurrent() is not supported by empty enumerators");
79 return std::make_shared<Empty>();
Implements an empty enumerator, that is, every call to Enumerator<T>::Empty::MoveNext() will return f...
Definition: Enumerator.Empty.hxx:22
Empty & operator=(Empty &&arg) noexcept
Move assignment operator.
bool MoveNext(void) override
Moves this enumerator to the next position.
Definition: Enumerator.Empty.hxx:60
~Empty(void) override
Destructs this instance and frees all resources.
T GetCurrent(void) override
Gets the element at the current position.
Definition: Enumerator.Empty.hxx:67
Empty(Empty &&arg) noexcept
Move constructor.
Empty(void)
Constructs an Enumerator<T>::Empty instance.
This class defines a base class for all enumerator implementations and some predefined enumerators as...
Definition: Enumerator.hxx:24
static IEnumerator< T >::Ptr CreateEmpty(void)
Creates an empty enumerator.
Definition: Enumerator.Empty.hxx:77
T GetCurrent(void) override
Gets the element at the current position.
Definition: Enumerator.hxx:113
This is the base class of all Arp exception classes.
Definition: Exception.hpp:21
Declares the interface of the enumerator pattern, which is leaned on .NET enumerator idiom.
Definition: IEnumerator.hxx:49
virtual bool MoveNext(void)=0
Moves this enumerator to the next position.
std::shared_ptr< IEnumerator > Ptr
The smart pointer type of this interface.
Definition: IEnumerator.hxx:52
Root namespace for the PLCnext API