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

#include <communication_graph.h>

Collaboration diagram for CommunicationGraph:
Collaboration graph

Public Member Functions

bool is_strongly_connected (void)
 
 CommunicationGraph (void)
 
 CommunicationGraph (BMscPtr bmsc)
 
void create_from_bmsc (BMscPtr bmsc)
 Fills the internal Graph structure according to the communication specified by the given bmsc. More...
 
void create_from_bmsc_with_map (BMscPtr bmsc, const std::map< std::wstring, unsigned > &instance_map)
 Fills the internal Graph structure according to the communication specified by the given bmsc. More...
 
void create_from_bmsc_with_param (BMscPtr bmsc, const std::string &param_name, unsigned graph_size=0)
 Fills the internal Graph structure according to the communication specified by the given bmsc. More...
 
void clear (void)
 
void merge (const CommunicationGraph &graph)
 
const Graphget_graph () const
 

Static Public Attributes

static const std::string lexical_order_attribute = "lexical_order"
 

Private Member Functions

void tarjan (unsigned v)
 

Private Attributes

unsigned m_size
 
unsigned m_index
 
unsigned m_current_scc
 
std::vector< unsigned > m_vertex_stack
 
Graph m_graph
 
std::vector< int > m_indexes
 
std::vector< int > m_lowlink
 
std::vector< bool > m_in_stack
 
std::vector< unsigned > m_scc
 

Detailed Description

Definition at line 30 of file communication_graph.h.

Constructor & Destructor Documentation

CommunicationGraph::CommunicationGraph ( void  )
inline

Definition at line 34 of file communication_graph.h.

CommunicationGraph::CommunicationGraph ( BMscPtr  bmsc)
inline

Definition at line 36 of file communication_graph.h.

Member Function Documentation

void CommunicationGraph::clear ( void  )
inline

Definition at line 59 of file communication_graph.h.

void CommunicationGraph::create_from_bmsc ( BMscPtr  bmsc)

Fills the internal Graph structure according to the communication specified by the given bmsc.

Indexes of instances are given by the lexical order of instances' labels.

Definition at line 73 of file communication_graph.cpp.

References create_from_bmsc_with_param(), and lexical_order_attribute.

void CommunicationGraph::create_from_bmsc_with_map ( BMscPtr  bmsc,
const std::map< std::wstring, unsigned > &  instance_map 
)

Fills the internal Graph structure according to the communication specified by the given bmsc.

Indexes of instances are taken from the map which maps instances' labels to indexes.

Definition at line 57 of file communication_graph.cpp.

References create_from_bmsc_with_param(), and lexical_order_attribute.

Referenced by BoundednessAssignListener::on_white_node_found().

void CommunicationGraph::create_from_bmsc_with_param ( BMscPtr  bmsc,
const std::string param_name,
unsigned  graph_size = 0 
)

Fills the internal Graph structure according to the communication specified by the given bmsc.

Indexes of instances are taken from the dynamic attribute whose name is input. If no size of the graph is specified, the number of instances in the bmsc is used.

Definition at line 38 of file communication_graph.cpp.

References DFSEventsTraverser::add_white_event_found_listener(), m_graph, and DFSEventsTraverser::traverse().

Referenced by create_from_bmsc(), create_from_bmsc_with_map(), and InstanceSequencer::sequence().

const Graph& CommunicationGraph::get_graph ( ) const
inline
bool CommunicationGraph::is_strongly_connected ( void  )
void CommunicationGraph::merge ( const CommunicationGraph graph)

Definition at line 105 of file communication_graph.cpp.

References get_graph(), and m_graph.

Referenced by BoundednessListener::on_elementary_cycle_found().

void CommunicationGraph::tarjan ( unsigned  v)
private

Member Data Documentation

const std::string CommunicationGraph::lexical_order_attribute = "lexical_order"
static

Definition at line 65 of file communication_graph.h.

Referenced by create_from_bmsc(), and create_from_bmsc_with_map().

unsigned CommunicationGraph::m_current_scc
private

Definition at line 75 of file communication_graph.h.

Referenced by is_strongly_connected(), and tarjan().

Graph CommunicationGraph::m_graph
private
std::vector<bool> CommunicationGraph::m_in_stack
private

Definition at line 80 of file communication_graph.h.

Referenced by is_strongly_connected(), and tarjan().

unsigned CommunicationGraph::m_index
private

Definition at line 74 of file communication_graph.h.

Referenced by is_strongly_connected(), and tarjan().

std::vector<int> CommunicationGraph::m_indexes
private

Definition at line 78 of file communication_graph.h.

Referenced by is_strongly_connected(), and tarjan().

std::vector<int> CommunicationGraph::m_lowlink
private

Definition at line 79 of file communication_graph.h.

Referenced by is_strongly_connected(), and tarjan().

std::vector<unsigned> CommunicationGraph::m_scc
private

Definition at line 81 of file communication_graph.h.

Referenced by is_strongly_connected(), and tarjan().

unsigned CommunicationGraph::m_size
private

Definition at line 73 of file communication_graph.h.

std::vector<unsigned> CommunicationGraph::m_vertex_stack
private

Definition at line 76 of file communication_graph.h.

Referenced by is_strongly_connected(), and tarjan().


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

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