Open Model Railroad Network (OpenMRN)
Loading...
Searching...
No Matches
openlcb::EventIterator Class Referenceabstract

Abstract class for representing iteration through a container for event handlers. More...

#include <EventHandlerContainer.hxx>

Inheritance diagram for openlcb::EventIterator:
openlcb::FullContainerIterator< C > openlcb::TreeEventHandlers::Iterator

Public Member Functions

virtual EventRegistryEntrynext_entry ()=0
 Steps the iteration.
 
virtual void init_iteration (EventReport *event)=0
 Starts the iteration.
 
virtual void clear_iteration ()=0
 Stops iteration and resets iteration variables.
 

Protected Member Functions

 EventIterator ()
 Creates an EventIterator.
 

Detailed Description

Abstract class for representing iteration through a container for event handlers.

Definition at line 61 of file EventHandlerContainer.hxx.

Constructor & Destructor Documentation

◆ EventIterator()

openlcb::EventIterator::EventIterator ( )
inlineprotected

Creates an EventIterator.

Definition at line 64 of file EventHandlerContainer.hxx.

◆ ~EventIterator()

virtual openlcb::EventIterator::~EventIterator ( )
inlinevirtual

Definition at line 67 of file EventHandlerContainer.hxx.

Member Function Documentation

◆ clear_iteration()

virtual void openlcb::EventIterator::clear_iteration ( )
pure virtual

Stops iteration and resets iteration variables.

Implemented in openlcb::TreeEventHandlers::Iterator, and openlcb::FullContainerIterator< C >.

◆ init_iteration()

virtual void openlcb::EventIterator::init_iteration ( EventReport event)
pure virtual

Starts the iteration.

If the iteration is not done yet, call clear_iteration first.

Parameters
eventis the event report to reset the iteration for.

Implemented in openlcb::FullContainerIterator< C >, and openlcb::TreeEventHandlers::Iterator.

◆ next_entry()

virtual EventRegistryEntry * openlcb::EventIterator::next_entry ( )
pure virtual

Steps the iteration.

Returns
the next entry or NULL if the iteration is done. May be called many times after the iteratin is ended and should consistently return NULL.

Implemented in openlcb::TreeEventHandlers::Iterator, and openlcb::FullContainerIterator< C >.


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