Sequence Chart Studio  svn HEAD revision
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
ElementaryCyclesTraverser Class Reference

#include <elementary_cycles_traverser.h>

Collaboration diagram for ElementaryCyclesTraverser:
Collaboration graph

Public Member Functions

virtual ~ElementaryCyclesTraverser ()
 
void add_cycle_listener (ElementaryCycleListener *l)
 
void remove_cycle_listeners ()
 
void traverse (HMscPtr hmsc)
 
 ElementaryCyclesTraverser (void)
 
void cleanup_traversing_attributes (void)
 
void enable_restriction (std::string name)
 
void disable_restriction (void)
 
bool is_restriction_enabled (void)
 

Protected Member Functions

void cycle_found (const MscElementPList &cycle)
 
virtual bool is_applicable (HMscNode *n)
 

Protected Attributes

ElementaryCycleListenerPList m_cycle_listeners
 
DFSHMscTraverser m_traverser
 
bool m_restriction_enabled
 
std::string m_restriction_name
 

Detailed Description

Definition at line 80 of file elementary_cycles_traverser.h.

Constructor & Destructor Documentation

virtual ElementaryCyclesTraverser::~ElementaryCyclesTraverser ( )
inlinevirtual

Definition at line 95 of file elementary_cycles_traverser.h.

ElementaryCyclesTraverser::ElementaryCyclesTraverser ( void  )
inline

Definition at line 121 of file elementary_cycles_traverser.h.

Member Function Documentation

void ElementaryCyclesTraverser::add_cycle_listener ( ElementaryCycleListener l)
inline

Adds a new listener. When the traverser finds an elementary cycle, the method on_elementary_cycle_found of all listeners is called.

Definition at line 102 of file elementary_cycles_traverser.h.

Referenced by AcyclicChecker::check(), UniversalBoundednessChecker::check(), LivelockChecker::check(), and CycleFinder::on_white_node_found().

void ElementaryCyclesTraverser::cleanup_traversing_attributes ( void  )
inline

Performs a cleanup. It is only necessary if the traverser is interrupted prematurely.

Definition at line 128 of file elementary_cycles_traverser.h.

void ElementaryCyclesTraverser::cycle_found ( const MscElementPList cycle)
protected

Definition at line 21 of file elementary_cycles_traverser.cpp.

References m_cycle_listeners.

void ElementaryCyclesTraverser::disable_restriction ( void  )
inline

Disables the restriction set by enable_restriction().

Definition at line 151 of file elementary_cycles_traverser.h.

void ElementaryCyclesTraverser::enable_restriction ( std::string  name)
inline

When the restriction is enabled, the traverser finds only cycles composed solely of nodes with the dynamic attribute of the given name. It is used, e.g., in the deadlock checker.

Parameters
nameonly nodes with dynamic attribute of this name are considered for detection; cannot be an empty string

Definition at line 141 of file elementary_cycles_traverser.h.

Referenced by LivelockChecker::check(), and CycleFinder::on_white_node_found().

virtual bool ElementaryCyclesTraverser::is_applicable ( HMscNode n)
inlineprotectedvirtual

Definition at line 86 of file elementary_cycles_traverser.h.

bool ElementaryCyclesTraverser::is_restriction_enabled ( void  )
inline

Returns the status of the restriction, as enabled by enable_restriction().

Definition at line 160 of file elementary_cycles_traverser.h.

void ElementaryCyclesTraverser::remove_cycle_listeners ( )
inline

Removes all the previously stored listeners.

Definition at line 110 of file elementary_cycles_traverser.h.

void ElementaryCyclesTraverser::traverse ( HMscPtr  hmsc)

Member Data Documentation

ElementaryCycleListenerPList ElementaryCyclesTraverser::m_cycle_listeners
protected

Definition at line 84 of file elementary_cycles_traverser.h.

Referenced by cycle_found(), and traverse().

bool ElementaryCyclesTraverser::m_restriction_enabled
protected

Definition at line 91 of file elementary_cycles_traverser.h.

std::string ElementaryCyclesTraverser::m_restriction_name
protected

Definition at line 92 of file elementary_cycles_traverser.h.

Referenced by traverse().

DFSHMscTraverser ElementaryCyclesTraverser::m_traverser
protected

Definition at line 90 of file elementary_cycles_traverser.h.

Referenced by traverse().


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

SourceForge.net Logo
Generated on Fri Jan 15 2016 16:26:58 for Sequence Chart Studio by  doxygen