PLCnext API Documentation 25.0.2.69
IEnumerator.hxx
1
2//
3// Copyright Phoenix Contact GmbH & Co. KG
4//
6#pragma once
7
8#ifndef ARP_USE_ARP_SYSTEM_CORE
9
10#include "Arp/Base/Core/IEnumerator.hxx"
11
12#else
13
14#include "Arp/System/Core/Arp.h"
15
16namespace Arp
17{
18
53template <class T>
54class IEnumerator
55{
56public: // typedefs
58 typedef std::shared_ptr<IEnumerator> Ptr;
59
60protected: // construction/destruction
62 IEnumerator(void) = default;
64 virtual ~IEnumerator(void) = default;
65
66public: // abstract operations
71 virtual bool MoveNext(void) = 0;
72
76 virtual T GetCurrent(void) = 0;
77
78protected: // copying methods (for copyable classes)
81 IEnumerator(const IEnumerator& arg) = default;
85 IEnumerator& operator=(const IEnumerator& arg) = default;
86};
87
88} // end of namespace Arp
89
90#endif // ndef ARP_USE_ARP_SYSTEM_CORE
IEnumerator(void)=default
Constructs an IEnumerator instance.
virtual ~IEnumerator(void)=default
Destructs this instance and frees all resources.
IEnumerator & operator=(const IEnumerator &arg)=default
Deleted copy-assignment IEnumerator.
virtual T GetCurrent(void)=0
Gets the element at the current position.
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