DiaDes  0.1
DIAgnosis of Discrete-Event System
Public Member Functions | Private Attributes | List of all members
Diades::Petri::Net::ConstIterator Class Reference

#include <Net.hh>

Public Member Functions

 ConstIterator (list< Arc >::const_iterator it, bool pre)
 
const Placeoperator* () const
 
ConstIteratoroperator++ ()
 
ConstIterator operator++ (int)
 
const Placeoperator-> (void) const
 
bool operator== (const ConstIterator &it) const
 
bool operator!= (const ConstIterator &it) const
 

Private Attributes

list< Arc >::const_iterator _it
 
bool _pre
 

Detailed Description

Definition at line 107 of file Net.hh.

Constructor & Destructor Documentation

◆ ConstIterator()

Diades::Petri::Net::ConstIterator::ConstIterator ( list< Arc >::const_iterator  it,
bool  pre 
)
inline

Parameterized constructor

Parameters
ititerator on a list of arcs
preboolean value that states whether the constructed iterator will iterate on the places in the preconditions of a Transition (pre is true) or on the places in the postconditions (pre is false).
Returns
the constructed iterator
Precondition
'it' refers an Arc, if 'pre' is true then 'it->source()' must be a Place if 'pre' is false, 'it->target()' must be a Place
Postcondition
operator-> and operator* returns the Place associated with the Arc refered by 'it'.

Definition at line 124 of file Net.hh.

Member Function Documentation

◆ operator!=()

bool Diades::Petri::Net::ConstIterator::operator!= ( const ConstIterator it) const
inline
Parameters
itan ConstIterator
Returns
true if 'it' is different from the current iterator

Definition at line 194 of file Net.hh.

◆ operator*()

const Place& Diades::Petri::Net::ConstIterator::operator* ( ) const
inline
Returns
the Place pointed by the iterator. It represents either a Place in a postcondition of a Transition or a Place in a precondition of the Transition

Definition at line 133 of file Net.hh.

◆ operator++() [1/2]

ConstIterator& Diades::Petri::Net::ConstIterator::operator++ ( )
inline
Returns
an iterator on the next Arc

Definition at line 146 of file Net.hh.

◆ operator++() [2/2]

ConstIterator Diades::Petri::Net::ConstIterator::operator++ ( int  )
inline
Returns
an iterator on the next Arc

Definition at line 156 of file Net.hh.

◆ operator->()

const Place* Diades::Petri::Net::ConstIterator::operator-> ( void  ) const
inline
Returns
the Place pointed by the iterator. It represents either a Place in a postcondition of a Transition or a Place in a precondition of the Transition

Definition at line 169 of file Net.hh.

◆ operator==()

bool Diades::Petri::Net::ConstIterator::operator== ( const ConstIterator it) const
inline
Parameters
itan ConstIterator
Returns
true if 'it' is equal to the current iterator

Definition at line 183 of file Net.hh.

References _it, and _pre.

Member Data Documentation

◆ _it

list<Arc>::const_iterator Diades::Petri::Net::ConstIterator::_it
private

Definition at line 110 of file Net.hh.

Referenced by operator==().

◆ _pre

bool Diades::Petri::Net::ConstIterator::_pre
private

Definition at line 111 of file Net.hh.

Referenced by operator==().


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