PLCnext API Documentation  22.9.0.33
Public Member Functions | List of all members
Arp::Enumerator< T >::StackComposite Class Reference

Use this class to build a single enumerator by two given enumerator, e.g. to enumerate multiple container/collections. More...

#include <Enumerator.hxx>

Inheritance diagram for Arp::Enumerator< T >::StackComposite:
Inheritance graph

Public Member Functions

 StackComposite (void)=default
 Constructs an StackComposite instance. More...
 
 StackComposite (const StackComposite &arg)=default
 Copy constructor. More...
 
StackCompositeoperator= (const StackComposite &arg)=default
 Assignment operator. More...
 
virtual ~StackComposite (void)=default
 Destructs this instance and frees all resources. More...
 
bool MoveNext (void) override
 Moves this enumerator to the next position. More...
 
GetCurrent (void) override
 Gets the element at the current position. More...
 
void Push (typename IEnumerator< T >::Ptr e)
 Adds the as argument passed enumerator to this stack. More...
 
size_t GetSize () const
 Get the size of this stack. More...
 

Additional Inherited Members

- Public Types inherited from Arp::IEnumerator< T >
typedef std::shared_ptr< IEnumeratorPtr
 The smart pointer tpye of this interface. More...
 
- Protected Member Functions inherited from Arp::IEnumerator< T >
 IEnumerator (void)=default
 Constructs an IEnumerator instance. More...
 
virtual ~IEnumerator (void)=default
 Destructs this instance and frees all resources. More...
 
 IEnumerator (const IEnumerator &arg)=default
 Copies an IEnumerator instance. More...
 
IEnumeratoroperator= (const IEnumerator &arg)=default
 Assigns an IEnumerator instance. More...
 

Detailed Description

template<class T>
class Arp::Enumerator< T >::StackComposite

Use this class to build a single enumerator by two given enumerator, e.g. to enumerate multiple container/collections.

Constructor & Destructor Documentation

◆ StackComposite() [1/2]

template<class T >
Arp::Enumerator< T >::StackComposite::StackComposite ( void  )
default

Constructs an StackComposite instance.

◆ StackComposite() [2/2]

template<class T >
Arp::Enumerator< T >::StackComposite::StackComposite ( const StackComposite arg)
default

Copy constructor.

Parameters
argThe argument to copy.

◆ ~StackComposite()

template<class T >
virtual Arp::Enumerator< T >::StackComposite::~StackComposite ( void  )
virtualdefault

Destructs this instance and frees all resources.

Member Function Documentation

◆ GetCurrent()

template<class T >
T Arp::Enumerator< T >::StackComposite::GetCurrent ( void  )
inlineoverridevirtual

Gets the element at the current position.

Returns
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 >.

◆ GetSize()

template<class T >
size_t Arp::Enumerator< T >::StackComposite::GetSize ( void  ) const
inline

Get the size of this stack.

Returns
The size of this stack.

◆ MoveNext()

template<class T >
bool Arp::Enumerator< T >::StackComposite::MoveNext ( void  )
inlineoverridevirtual

Moves this enumerator to the next position.

Returns
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.

IEnumerator

Implements Arp::IEnumerator< T >.

◆ operator=()

template<class T >
StackComposite& Arp::Enumerator< T >::StackComposite::operator= ( const StackComposite arg)
default

Assignment operator.

Parameters
argThe argument to copy.
Returns
This instance as reference.

◆ Push()

template<class T >
void Arp::Enumerator< T >::StackComposite::Push ( typename IEnumerator< T >::Ptr  e)
inline

Adds the as argument passed enumerator to this stack.

Parameters
eThe enumerator to add to this stack.

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