|
PLCnext API Documentation 23.6.0.37
|
Use this class to build a single enumerator by two given enumerator, e.g. to enumerate multiple container/collections or trees. More...
#include <Enumerator.hxx>

Public Member Functions | |
| Composite (typename IEnumerator< T >::Ptr first, typename IEnumerator< T >::Ptr second) | |
| Constructs an Composite instance. More... | |
| Composite (const Composite &arg)=default | |
| Copy constructor. More... | |
| Composite & | operator= (const Composite &arg)=default |
| Assignment operator. More... | |
| virtual | ~Composite (void)=default |
| 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... | |
| 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::IEnumerator< T > | |
| typedef std::shared_ptr< IEnumerator > | Ptr |
| The smart pointer tpye of this interface. | |
Protected Member Functions inherited from Arp::IEnumerator< T > | |
| IEnumerator (void)=default | |
| Constructs an IEnumerator instance. | |
| virtual | ~IEnumerator (void)=default |
| Destructs this instance and frees all resources. | |
| IEnumerator (const IEnumerator &arg)=default | |
| Copies an IEnumerator instance. More... | |
| IEnumerator & | operator= (const IEnumerator &arg)=default |
| Assigns an IEnumerator instance. More... | |
Use this class to build a single enumerator by two given enumerator, e.g. to enumerate multiple container/collections or trees.
This class implements the composite design pattern for enumerators and makes it easy to traverse tree structures. Use Enumerator<T>::CreateComposite() to create an instance of this class.
|
inline |
Constructs an Composite instance.
| first | The first enumerator to create the composite from. |
| second | The second enumerator to create the composite from. |
|
default |
Copy constructor.
| arg | The argument to copy. |
|
inlineoverridevirtual |
Gets the element at the current position.
Depending an the template parameter type of this interface, a reference or even const reference might be returned.
Implements Arp::IEnumerator< T >.
|
inlineoverridevirtual |
Moves this enumerator to the next position.
false if the end of the container/collections was reached and the enumerator was not moved, otherwise false.See comments of interface declaration for more information about this operation.
Implements Arp::IEnumerator< T >.
|
default |
Assignment operator.
| arg | The argument to copy. |