PLCnext API Documentation 25.0.2.69
|
Use this class to build a single enumerator by multiple other enumerators using a stack More...
#include <Enumerator.StackComposite.hxx>
Public Member Functions | |
StackComposite (void) | |
Constructs an StackComposite instance. | |
StackComposite (const StackComposite &arg)=delete | |
StackComposite (StackComposite &&arg) noexcept | |
Move constructor. More... | |
StackComposite & | operator= (const StackComposite &arg)=delete |
StackComposite & | operator= (StackComposite &&arg) noexcept |
Move assignment operator. More... | |
~StackComposite (void) override | |
Destructs this instance and frees all resources. | |
bool | MoveNext (void) override |
Moves this enumerator to the next position. More... | |
T | GetCurrent (void) override |
Gets the element at the current position. More... | |
void | Push (typename IEnumerator< T >::Ptr enumerator) |
Adds the as argument passed enumerator to this stack. More... | |
size_t | GetSize (void) const |
Get the size of this stack. More... | |
![]() | |
IEnumerator (void)=default | |
Constructs an IEnumerator instance. | |
IEnumerator (const IEnumerator &arg)=default | |
Deleted copy constructor. | |
IEnumerator (IEnumerator &&arg) noexcept=default | |
Move constructor. | |
IEnumerator & | operator= (const IEnumerator &arg)=default |
Deleted copy-assignment IEnumerator. | |
IEnumerator & | operator= (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 | |
![]() | |
using | Ptr = std::shared_ptr< IEnumerator > |
The smart pointer type of this interface. | |
using | ValueType = T |
Type of the enumerated values | |
Use this class to build a single enumerator by multiple other enumerators using a stack
The enumerator on the top of the stack is enumerated first. After it's MoveNext() returned false it is removed from the stack. On pushing a new enumerator the GetCurrent() refers to the newly pushed enumerator.
|
inlinedefaultnoexcept |
Move constructor.
arg | The argument to move. |
|
inlineoverridevirtual |
Gets the element at the current position.
Depending on the template parameter type of this interface, a reference or even const reference might be returned.
InvalidOperationException | When GetCurrent() is called before MoveNext() or after MoveNext() has returned false once. |
Implements Arp::Base::Core::IEnumerator< T >.
|
inline |
Get the size of this stack.
|
inlineoverridevirtual |
Moves this enumerator to the next position.
false
if the end of the container/collections/enumeration has reached, otherwise true
.Implements Arp::Base::Core::IEnumerator< T >.
|
inlinedefaultnoexcept |
Move assignment operator.
arg | The argument to move. |
|
inline |
Adds the as argument passed enumerator to this stack.
enumerator | The enumerator to add to this stack. |