DiaDes  0.1
DIAgnosis of Discrete-Event System
Public Types | Public Member Functions | Private Attributes | List of all members
Diades::Automata::Experimental::SynchronisationEvent< StateMachine >::ComponentIterator Class Reference

#include <SynchronisationEvent.hh>

Public Types

using iterator_category = std::input_iterator_tag
 
using difference_type = Component
 
using value_type = Component
 
using pointer = typename Ptr< Component >::P
 
using reference = Component
 

Public Member Functions

 ComponentIterator (const ComponentVector *pVect, const EventVector *pEvent, Size index)
 
 ComponentIterator (const ComponentIterator &it)
 
const Componentoperator* () const
 
const Componentoperator-> () const
 
ComponentIteratoroperator++ ()
 
ComponentIterator operator++ (int)
 
bool operator== (const ComponentIterator &compIt) const
 
bool operator!= (const ComponentIterator &compIt) const
 
Event getAssociatedEvent () const
 
Size index () const
 

Private Attributes

const ComponentVector_pVect
 
const EventVector_pEvent
 
Size _index
 

Detailed Description

template<typename StateMachine>
class Diades::Automata::Experimental::SynchronisationEvent< StateMachine >::ComponentIterator

Iterator on a mapping between a Component and its associated event in a SynchronisationEvent. It is implemented as an index on two vectors, one contains the components and the other one the associated events. The associated event of component of index i is also at index i.

Definition at line 95 of file SynchronisationEvent.hh.

Member Typedef Documentation

◆ difference_type

Definition at line 99 of file SynchronisationEvent.hh.

◆ iterator_category

template<typename StateMachine >
using Diades::Automata::Experimental::SynchronisationEvent< StateMachine >::ComponentIterator::iterator_category = std::input_iterator_tag

Definition at line 98 of file SynchronisationEvent.hh.

◆ pointer

Definition at line 101 of file SynchronisationEvent.hh.

◆ reference

Definition at line 102 of file SynchronisationEvent.hh.

◆ value_type

Definition at line 100 of file SynchronisationEvent.hh.

Constructor & Destructor Documentation

◆ ComponentIterator() [1/2]

template<typename StateMachine >
Diades::Automata::Experimental::SynchronisationEvent< StateMachine >::ComponentIterator::ComponentIterator ( const ComponentVector pVect,
const EventVector pEvent,
Size  index 
)
inline

Parametrized Constructor

Parameters
pVectthe vector of component
pEventthe vector of events
indexthe current index for this iterator

Definition at line 117 of file SynchronisationEvent.hh.

◆ ComponentIterator() [2/2]

template<typename StateMachine >
Diades::Automata::Experimental::SynchronisationEvent< StateMachine >::ComponentIterator::ComponentIterator ( const ComponentIterator it)
inline

Copy constructor

Definition at line 125 of file SynchronisationEvent.hh.

Member Function Documentation

◆ getAssociatedEvent()

template<typename StateMachine >
Event Diades::Automata::Experimental::SynchronisationEvent< StateMachine >::ComponentIterator::getAssociatedEvent ( ) const
inline
Returns
the event associated to the component referenced by the iterator

Definition at line 185 of file SynchronisationEvent.hh.

Referenced by Diades::Automata::Experimental::SynchronisationEvent< StateMachine >::getAssociatedEvent().

◆ index()

template<typename StateMachine >
Size Diades::Automata::Experimental::SynchronisationEvent< StateMachine >::ComponentIterator::index ( ) const
inline
Returns
the current index implementing the iterator

Definition at line 194 of file SynchronisationEvent.hh.

Referenced by Diades::Automata::Experimental::SynchronisationEvent< StateMachine >::addEvent().

◆ operator!=()

template<typename StateMachine >
bool Diades::Automata::Experimental::SynchronisationEvent< StateMachine >::ComponentIterator::operator!= ( const ComponentIterator compIt) const
inline

difference operator

Definition at line 176 of file SynchronisationEvent.hh.

◆ operator*()

template<typename StateMachine >
const Component& Diades::Automata::Experimental::SynchronisationEvent< StateMachine >::ComponentIterator::operator* ( ) const
inline

reference operator

Definition at line 132 of file SynchronisationEvent.hh.

◆ operator++() [1/2]

template<typename StateMachine >
ComponentIterator& Diades::Automata::Experimental::SynchronisationEvent< StateMachine >::ComponentIterator::operator++ ( )
inline

prefix increment

Definition at line 148 of file SynchronisationEvent.hh.

◆ operator++() [2/2]

template<typename StateMachine >
ComponentIterator Diades::Automata::Experimental::SynchronisationEvent< StateMachine >::ComponentIterator::operator++ ( int  )
inline

postfix increment

Definition at line 157 of file SynchronisationEvent.hh.

◆ operator->()

template<typename StateMachine >
const Component* Diades::Automata::Experimental::SynchronisationEvent< StateMachine >::ComponentIterator::operator-> ( void  ) const
inline

pointer operator

Definition at line 140 of file SynchronisationEvent.hh.

◆ operator==()

template<typename StateMachine >
bool Diades::Automata::Experimental::SynchronisationEvent< StateMachine >::ComponentIterator::operator== ( const ComponentIterator compIt) const
inline

Member Data Documentation

◆ _index

template<typename StateMachine >
Size Diades::Automata::Experimental::SynchronisationEvent< StateMachine >::ComponentIterator::_index
private

◆ _pEvent

template<typename StateMachine >
const EventVector* Diades::Automata::Experimental::SynchronisationEvent< StateMachine >::ComponentIterator::_pEvent
private

◆ _pVect

template<typename StateMachine >
const ComponentVector* Diades::Automata::Experimental::SynchronisationEvent< StateMachine >::ComponentIterator::_pVect
private

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