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

#include <Marking.hh>

Public Member Functions

 Marking ()
 
 Marking (const Marking &marking)
 
 Marking (Marking &&marking)
 
Markingoperator= (const Marking &marking)
 
void increaseMark (Place p)
 
bool decreaseMark (Place p)
 
void mark (Place p, unsigned tokens)
 
void unmark (Place p)
 
unsigned getMark (Place p) const
 
bool empty () const
 
void clear ()
 
std::unordered_map< Place, unsigned >::const_iterator begin () const
 
std::unordered_map< Place, unsigned >::const_iterator end () const
 
bool operator== (const Marking &marking) const
 
void computeHashSequence () const
 
const string & getHashSequence () const
 
bool hitsNoneOf (const vector< Marking > &markings)
 
bool hits (const Marking &marking) const
 

Private Attributes

std::unordered_map< Place, unsigned > _marking
 
std::string _hashSequence
 
bool _hasHash
 

Detailed Description

Definition at line 19 of file Marking.hh.

Constructor & Destructor Documentation

◆ Marking() [1/3]

Diades::Petri::Marking::Marking ( )
inline

Definition at line 27 of file Marking.hh.

◆ Marking() [2/3]

Diades::Petri::Marking::Marking ( const Marking marking)
inline

Definition at line 31 of file Marking.hh.

◆ Marking() [3/3]

Diades::Petri::Marking::Marking ( Marking &&  marking)
inline

Definition at line 35 of file Marking.hh.

Member Function Documentation

◆ begin()

std::unordered_map<Place, unsigned>::const_iterator Diades::Petri::Marking::begin ( ) const
inline

Definition at line 135 of file Marking.hh.

Referenced by hits().

◆ clear()

void Diades::Petri::Marking::clear ( )
inline

Definition at line 126 of file Marking.hh.

◆ computeHashSequence()

void Diades::Petri::Marking::computeHashSequence ( ) const
inline

Definition at line 156 of file Marking.hh.

Referenced by getHashSequence().

◆ decreaseMark()

bool Diades::Petri::Marking::decreaseMark ( Place  p)
inline

Definition at line 67 of file Marking.hh.

◆ empty()

bool Diades::Petri::Marking::empty ( ) const
inline

Definition at line 120 of file Marking.hh.

Referenced by Diades::Petri::BoundedNet::isMarked().

◆ end()

std::unordered_map<Place, unsigned>::const_iterator Diades::Petri::Marking::end ( ) const
inline

Definition at line 141 of file Marking.hh.

Referenced by hits().

◆ getHashSequence()

const string& Diades::Petri::Marking::getHashSequence ( ) const
inline

◆ getMark()

unsigned Diades::Petri::Marking::getMark ( Place  p) const
inline

Definition at line 109 of file Marking.hh.

Referenced by hits().

◆ hits()

bool Diades::Petri::Marking::hits ( const Marking marking) const
inline

Definition at line 193 of file Marking.hh.

References begin(), end(), getHashSequence(), and getMark().

Referenced by hitsNoneOf().

◆ hitsNoneOf()

bool Diades::Petri::Marking::hitsNoneOf ( const vector< Marking > &  markings)
inline

Definition at line 179 of file Marking.hh.

References getHashSequence(), and hits().

◆ increaseMark()

void Diades::Petri::Marking::increaseMark ( Place  p)
inline

Definition at line 52 of file Marking.hh.

◆ mark()

void Diades::Petri::Marking::mark ( Place  p,
unsigned  tokens 
)
inline

Definition at line 88 of file Marking.hh.

References unmark().

◆ operator=()

Marking& Diades::Petri::Marking::operator= ( const Marking marking)
inline

Definition at line 40 of file Marking.hh.

References _hasHash, _hashSequence, and _marking.

◆ operator==()

bool Diades::Petri::Marking::operator== ( const Marking marking) const
inline

Definition at line 146 of file Marking.hh.

References _marking.

◆ unmark()

void Diades::Petri::Marking::unmark ( Place  p)
inline

Definition at line 102 of file Marking.hh.

Referenced by mark().

Member Data Documentation

◆ _hasHash

bool Diades::Petri::Marking::_hasHash
mutableprivate

Definition at line 24 of file Marking.hh.

Referenced by operator=().

◆ _hashSequence

std::string Diades::Petri::Marking::_hashSequence
mutableprivate

Definition at line 23 of file Marking.hh.

Referenced by getHashSequence(), and operator=().

◆ _marking

std::unordered_map<Place, unsigned> Diades::Petri::Marking::_marking
private

Definition at line 22 of file Marking.hh.

Referenced by operator=(), and operator==().


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