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
GraphCreatorListener Class Reference

Duplicates HMsc like it would be BMsc graph. More...

#include <msc_duplicators.h>

Inheritance diagram for GraphCreatorListener:
Inheritance graph
Collaboration diagram for GraphCreatorListener:
Collaboration graph

Public Member Functions

 GraphCreatorListener (BMscGraphDuplicator *duplicator, DFSBMscGraphTraverser *traverser, HMsc *hmsc)
 
 ~GraphCreatorListener ()
 
void on_white_node_found (HMscNode *n)
 
void on_white_node_found (ReferenceNode *n)
 
void on_white_node_found (StartNode *n)
 
void on_white_node_found (EndNode *n)
 
void on_white_node_found (ConditionNode *n)
 
void on_white_node_found (ConnectionNode *n)
 
void on_gray_node_found (HMscNode *n)
 
void on_black_node_found (HMscNode *n)
 
void on_node_finished (HMscNode *n)
 
void on_node_finished (ReferenceNode *n)
 
void on_node_finished (StartNode *n)
 
void on_node_finished (EndNode *n)
 
void on_node_finished (ConditionNode *n)
 
void on_node_finished (ConnectionNode *n)
 
- Public Member Functions inherited from WhiteNodeFoundListener
virtual ~WhiteNodeFoundListener ()
 
- Public Member Functions inherited from GrayNodeFoundListener
virtual ~GrayNodeFoundListener ()
 
- Public Member Functions inherited from BlackNodeFoundListener
virtual ~BlackNodeFoundListener ()
 
- Public Member Functions inherited from NodeFinishedListener
virtual ~NodeFinishedListener ()
 

Protected Member Functions

bool is_root_element (HMscNode *n)
 
void process_new_node (HMscNode *old_node, HMscNodePtr &new_node)
 
void process_nonwhite_node (HMscNode *n)
 
PredecessorNodeget_predecessor ()
 
ReferenceNode *& get_referencing_node (HMsc *hmsc)
 
ConnectionNodePListget_end_list (ReferenceNode *reference)
 
void add_to_end_list (ConnectionNode *new_end)
 
void add_new_successor (HMscNode *new_successor)
 
HMscNodeget_node_copy (HMscNode *n)
 
NodeRelationget_previous_relation ()
 

Protected Attributes

BMscGraphDuplicatorm_duplicator
 
DFSBMscGraphTraverserm_traverser
 
HMscPList m_modified_hmscs
 
MscElementPList m_new_nodes
 
HMscm_hmsc
 

Detailed Description

Duplicates HMsc like it would be BMsc graph.

Result of this duplicator is flattened version of HMsc (BMsc graph) without unreachable HMscNodes and nodes which man isn't able to get to EndNode from.

All ReferenceNodes reference only BMsc, moreover each BMsc is referenced only one time – each BMsc is duplicated too. Kept elements references to its original element via attribute m_original.

Original ReferenceNodes which references HMsc are transformed into ConnectionNodes referencing the ReferenceNode by m_original. StartNodes which don't occure in HMsc to be duplicated are removed. EndNodes of the same kind are transformed into ConnectionNodes referencing original EndNodes.

Definition at line 253 of file msc_duplicators.h.

Constructor & Destructor Documentation

GraphCreatorListener::GraphCreatorListener ( BMscGraphDuplicator duplicator,
DFSBMscGraphTraverser traverser,
HMsc hmsc 
)

Definition at line 505 of file msc_duplicators.cpp.

GraphCreatorListener::~GraphCreatorListener ( )

Member Function Documentation

void GraphCreatorListener::add_new_successor ( HMscNode new_successor)
protected
void GraphCreatorListener::add_to_end_list ( ConnectionNode new_end)
protected
ConnectionNodePList & GraphCreatorListener::get_end_list ( ReferenceNode reference)
protected
HMscNode * GraphCreatorListener::get_node_copy ( HMscNode n)
protected

Definition at line 629 of file msc_duplicators.cpp.

References Duplicator::get_copy(), and m_duplicator.

Referenced by process_nonwhite_node().

PredecessorNode * GraphCreatorListener::get_predecessor ( )
protected

Definition at line 624 of file msc_duplicators.cpp.

References m_new_nodes.

Referenced by add_new_successor().

NodeRelation * GraphCreatorListener::get_previous_relation ( )
protected

Definition at line 739 of file msc_duplicators.cpp.

References DFSBMscGraphTraverser::get_reached_elements(), and m_traverser.

Referenced by add_new_successor().

ReferenceNode *& GraphCreatorListener::get_referencing_node ( HMsc hmsc)
protected
bool GraphCreatorListener::is_root_element ( HMscNode n)
protected
void GraphCreatorListener::on_black_node_found ( HMscNode n)
virtual

Implements BlackNodeFoundListener.

Definition at line 645 of file msc_duplicators.cpp.

References process_nonwhite_node().

void GraphCreatorListener::on_gray_node_found ( HMscNode n)
virtual

Implements GrayNodeFoundListener.

Definition at line 640 of file msc_duplicators.cpp.

References process_nonwhite_node().

void GraphCreatorListener::on_node_finished ( HMscNode n)
virtual

Implements NodeFinishedListener.

Definition at line 650 of file msc_duplicators.cpp.

void GraphCreatorListener::on_node_finished ( ReferenceNode n)
void GraphCreatorListener::on_node_finished ( StartNode n)

Definition at line 679 of file msc_duplicators.cpp.

References is_root_element(), and m_new_nodes.

void GraphCreatorListener::on_node_finished ( EndNode n)

Definition at line 687 of file msc_duplicators.cpp.

References m_new_nodes.

void GraphCreatorListener::on_node_finished ( ConditionNode n)

Definition at line 692 of file msc_duplicators.cpp.

References m_new_nodes.

void GraphCreatorListener::on_node_finished ( ConnectionNode n)

Definition at line 697 of file msc_duplicators.cpp.

References m_new_nodes.

void GraphCreatorListener::on_white_node_found ( HMscNode n)
virtual

Implements WhiteNodeFoundListener.

Definition at line 510 of file msc_duplicators.cpp.

void GraphCreatorListener::on_white_node_found ( ReferenceNode n)
void GraphCreatorListener::on_white_node_found ( StartNode n)
void GraphCreatorListener::on_white_node_found ( EndNode n)
void GraphCreatorListener::on_white_node_found ( ConditionNode n)

Definition at line 597 of file msc_duplicators.cpp.

References process_new_node().

void GraphCreatorListener::on_white_node_found ( ConnectionNode n)

Definition at line 604 of file msc_duplicators.cpp.

References process_new_node().

void GraphCreatorListener::process_new_node ( HMscNode old_node,
HMscNodePtr new_node 
)
protected
void GraphCreatorListener::process_nonwhite_node ( HMscNode n)
protected

Definition at line 634 of file msc_duplicators.cpp.

References add_new_successor(), and get_node_copy().

Referenced by on_black_node_found(), and on_gray_node_found().

Member Data Documentation

BMscGraphDuplicator* GraphCreatorListener::m_duplicator
protected

Definition at line 258 of file msc_duplicators.h.

Referenced by get_node_copy(), on_white_node_found(), and process_new_node().

HMsc* GraphCreatorListener::m_hmsc
protected

Definition at line 266 of file msc_duplicators.h.

Referenced by is_root_element(), on_white_node_found(), and process_new_node().

HMscPList GraphCreatorListener::m_modified_hmscs
protected

Definition at line 262 of file msc_duplicators.h.

Referenced by get_referencing_node(), and ~GraphCreatorListener().

MscElementPList GraphCreatorListener::m_new_nodes
protected
DFSBMscGraphTraverser* GraphCreatorListener::m_traverser
protected

Definition at line 260 of file msc_duplicators.h.

Referenced by get_previous_relation().


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