opendnp3  3.1.0
Reference implementation of DNP3 (IEEE-1815)
opendnp3::ICollection< T > Class Template Referenceabstract

An interface representing an abstract immutable collection of things of type T. More...

#include <opendnp3/app/parsing/ICollection.h>

Public Member Functions

virtual size_t Count () const =0
 The number of elements in the collection. More...
 
virtual void Foreach (IVisitor< T > &visitor) const =0
 Visit all the elements of a collection. More...
 
template<class Fun >
void ForeachItem (const Fun &fun) const
 visit all of the elements of a collection More...
 
bool ReadOnlyValue (T &value) const
 Retrieve the only value from the collection. More...
 

Detailed Description

template<class T>
class opendnp3::ICollection< T >

An interface representing an abstract immutable collection of things of type T.

The user can only read these values via callback to receive each element.

Definition at line 62 of file ICollection.h.

Member Function Documentation

◆ Count()

template<class T>
virtual size_t opendnp3::ICollection< T >::Count ( ) const
pure virtual

The number of elements in the collection.

Referenced by opendnp3::ICollection< CommandPointResult >::ReadOnlyValue().

◆ Foreach()

template<class T>
virtual void opendnp3::ICollection< T >::Foreach ( IVisitor< T > &  visitor) const
pure virtual

Visit all the elements of a collection.

Referenced by opendnp3::ICollection< CommandPointResult >::ForeachItem().

◆ ForeachItem()

template<class T>
template<class Fun >
void opendnp3::ICollection< T >::ForeachItem ( const Fun &  fun) const
inline

visit all of the elements of a collection

Definition at line 78 of file ICollection.h.

Referenced by opendnp3::ICollection< CommandPointResult >::ReadOnlyValue().

◆ ReadOnlyValue()

template<class T>
bool opendnp3::ICollection< T >::ReadOnlyValue ( T &  value) const
inline

Retrieve the only value from the collection.

Definition at line 87 of file ICollection.h.


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