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

EventArea whose events are ordered like directed acyclic graph. More...

#include <CoregionArea.h>

Inheritance diagram for CoregionArea:
Inheritance graph
Collaboration diagram for CoregionArea:
Collaboration graph

Public Member Functions

 CoregionArea ()
 
 CoregionArea (CoregionArea *original)
 
virtual ~CoregionArea ()
 
EventPList get_minimal_events () const
 Returns the list of minimal events in this area, i.e., those not having any predecessors within the area, in the order of their insertion to the area. More...
 
EventPList get_maximal_events () const
 Returns the list of maximal events in this area, i.e., those not having any successors within the area. More...
 
bool is_empty () const
 
EventPtrSet get_events () const
 Returns the set of all events contained in this area. NOTE: a copy is returned, thus, when iterating, both begin() and end() iterators should be taken from the same object. More...
 
CoregEventRelPtr add_successor_rel (Event *predecessor, Event *successor)
 Adds a new predecessor-successor relation to the coregion graph. After the operation, predecessor will have successor as its successor in the coregion. NOTE: both events must already exist in the coregion area. More...
 
CoregEventRelPtr add_successor_rel (Event *predecessor, Event *successor, MscColor color)
 
void remove_event (Event *e)
 Removes a given event from the area. More...
 
InstanceAxisForm get_form () const
 
EventPSet get_predecessor_events (const Event *e) const
 Returns predecessor events of a given event within this area, or an empty set if this is a minimal event. More...
 
EventPSet get_successor_events (const Event *e) const
 Returns successor events of a given event within this area, or an empty set if this is a maximal event. More...
 
CoregEventRelPtrVector get_successor_rels (const Event *e) const
 
CoregEventRelPtrVector get_predecessor_rels (const Event *e) const
 
- Public Member Functions inherited from EventArea
 EventArea ()
 
 EventArea (EventArea *original)
 
virtual ~EventArea ()
 
const EventAreaPtr get_next_area () const
 
EventAreaget_previous_area () const
 
Instanceget_instance () const
 
void set_instance (Instance *instance)
 
const Coordinateget_begin_height () const
 
void set_begin_height (const Coordinate &begin_height)
 
const Coordinateget_end_height () const
 
void set_end_height (const Coordinate &end_height)
 
Size get_height () const
 
Size get_width () const
 
void set_width (const Size &width)
 
template<typename EventType >
boost::intrusive_ptr< EventType > add_event (const boost::intrusive_ptr< EventType > &e)
 Puts an event in this area as a maximal event. The event itself is returned. More...
 
template<typename EventType >
boost::intrusive_ptr< EventType > add_event (EventType *e)
 Puts an event in this area as a maximal event. The event itself is returned. More...
 
- Public Member Functions inherited from MscElementTmpl< EventArea >
int get_visual_style () const
 
void set_visual_style (int visual_style)
 
MscElementget_general_original () const
 See MscElementTmpl for details about attribute original. More...
 
void set_general_original (MscElement *original)
 See MscElementTmpl for details about attribute original. More...
 
EventAreaget_original () const
 
void set_original (EventArea *e)
 
void set_original (boost::intrusive_ptr< EventArea > &e)
 
virtual ~MscElementTmpl ()
 
- Public Member Functions inherited from MscElement
bool is_attribute_set (const std::string &name) const
 Finds out whether attribute with specified name is set or not. More...
 
template<class T >
T & get_attribute (const std::string &name, const T &def)
 Returns dynamic attribute of MscElement. More...
 
template<class T >
T & get_attribute (const std::string &name, const T &def, bool &status)
 Returns dynamic attribute of MscElement. More...
 
template<class T >
void set_attribute (const std::string &name, const T &val)
 Sets dynamic attribute of MscElement. More...
 
template<class T >
void remove_attribute (const std::string &name)
 Removes attribute of MscElement. More...
 
std::set< std::stringget_attribute_names () const
 List all attributes of MscElement. More...
 
enum MarkType get_marked () const
 
void set_marked (enum MarkType marked=MARKED)
 
MscColor get_color () const
 
void set_color (MscColor color)
 
void clear_color ()
 
virtual ~MscElement ()
 

Protected Member Functions

EventPtr add_event_impl (const EventPtr &e)
 
- Protected Member Functions inherited from MscElementTmpl< EventArea >
 MscElementTmpl ()
 
 MscElementTmpl (EventArea *original)
 Creates MscElement referencing the original one. More...
 
- Protected Member Functions inherited from MscElement
 MscElement ()
 

Private Types

typedef boost::adjacency_list
< boost::vecS, boost::vecS,
boost::bidirectionalS,
EventPtr, CoregEventRelPtr
CoregionGraph
 
typedef boost::graph_traits
< CoregionGraph >
::vertex_descriptor 
vertex_t
 
typedef boost::graph_traits
< CoregionGraph >
::edge_descriptor 
edge_t
 
typedef boost::graph_traits
< CoregionGraph >
::vertex_iterator 
vertex_iter
 
typedef boost::graph_traits
< CoregionGraph >
::in_edge_iterator 
in_edge_iter
 
typedef boost::graph_traits
< CoregionGraph >
::out_edge_iterator 
out_edge_iter
 

Private Member Functions

vertex_t get_vertex (const Event *e) const
 

Private Attributes

InstanceAxisForm m_form
 Form of the drawn coregion - which visual style of the coregion is used. More...
 
CoregionGraph m_events
 

Additional Inherited Members

- Protected Attributes inherited from EventArea
Coordinate m_begin_height
 
Coordinate m_end_height
 
Size m_width
 
Instancem_instance
 
- Protected Attributes inherited from MscElementTmpl< EventArea >
int m_visual_style
 Visual style of the shape. More...
 
boost::intrusive_ptr< EventAream_original
 Pointer to original version of MscElement. More...
 

Detailed Description

EventArea whose events are ordered like directed acyclic graph.

Definition at line 32 of file CoregionArea.h.

Member Typedef Documentation

typedef boost::adjacency_list< boost::vecS, boost::vecS, boost::bidirectionalS, EventPtr, CoregEventRelPtr> CoregionArea::CoregionGraph
private

Definition at line 38 of file CoregionArea.h.

typedef boost::graph_traits<CoregionGraph>::edge_descriptor CoregionArea::edge_t
private

Definition at line 41 of file CoregionArea.h.

typedef boost::graph_traits<CoregionGraph>::in_edge_iterator CoregionArea::in_edge_iter
private

Definition at line 43 of file CoregionArea.h.

typedef boost::graph_traits<CoregionGraph>::out_edge_iterator CoregionArea::out_edge_iter
private

Definition at line 44 of file CoregionArea.h.

typedef boost::graph_traits<CoregionGraph>::vertex_iterator CoregionArea::vertex_iter
private

Definition at line 42 of file CoregionArea.h.

typedef boost::graph_traits<CoregionGraph>::vertex_descriptor CoregionArea::vertex_t
private

Definition at line 40 of file CoregionArea.h.

Constructor & Destructor Documentation

CoregionArea::CoregionArea ( )
inline

Definition at line 66 of file CoregionArea.h.

CoregionArea::CoregionArea ( CoregionArea original)
inline

Definition at line 70 of file CoregionArea.h.

virtual CoregionArea::~CoregionArea ( )
inlinevirtual

Definition at line 74 of file CoregionArea.h.

Member Function Documentation

EventPtr CoregionArea::add_event_impl ( const EventPtr e)
inlineprotectedvirtual

Implements EventArea.

Definition at line 103 of file CoregionArea.h.

CoregEventRelPtr CoregionArea::add_successor_rel ( Event predecessor,
Event successor 
)

Adds a new predecessor-successor relation to the coregion graph. After the operation, predecessor will have successor as its successor in the coregion. NOTE: both events must already exist in the coregion area.

Definition at line 93 of file CoregionArea.cpp.

References get_vertex(), and m_events.

Referenced by add_relation_fun(), add_successor_rel(), and EventsCreatorListener::create_successor().

CoregEventRelPtr CoregionArea::add_successor_rel ( Event predecessor,
Event successor,
MscColor  color 
)

Definition at line 102 of file CoregionArea.cpp.

References add_successor_rel(), and result.

EventPtrSet CoregionArea::get_events ( ) const
inline

Returns the set of all events contained in this area. NOTE: a copy is returned, thus, when iterating, both begin() and end() iterators should be taken from the same object.

Definition at line 91 of file CoregionArea.h.

References result.

Referenced by ProcessListener::on_white_node_found().

InstanceAxisForm CoregionArea::get_form ( ) const
inline

Definition at line 125 of file CoregionArea.h.

EventPList CoregionArea::get_maximal_events ( ) const
virtual

Returns the list of maximal events in this area, i.e., those not having any successors within the area.

Every event is present at most once in the returned list - the list is rather an ordered set.

In case there are no events, an empty set is returned.

Note that a new list is returned. Thus, if used for iteration, begin() and end() has both to be invoked on the same set.

Implements EventArea.

Definition at line 81 of file CoregionArea.cpp.

References m_events.

EventPList CoregionArea::get_minimal_events ( ) const
virtual

Returns the list of minimal events in this area, i.e., those not having any predecessors within the area, in the order of their insertion to the area.

Every event is present at most once in the returned list - the list is rather an ordered set.

In case there are no events, an empty list is returned.

Note that a new list is returned. Thus, if used for iteration, begin() and end() has both to be invoked on the same list.

Implements EventArea.

Definition at line 69 of file CoregionArea.cpp.

References m_events.

Referenced by check_instance(), Z120::save_bmsc(), and MonteCarlo::BMscDealer::traverse_area().

EventPSet CoregionArea::get_predecessor_events ( const Event e) const
virtual

Returns predecessor events of a given event within this area, or an empty set if this is a minimal event.

Implements EventArea.

Definition at line 43 of file CoregionArea.cpp.

References get_vertex(), m_events, and result.

CoregEventRelPtrVector CoregionArea::get_predecessor_rels ( const Event e) const

Definition at line 122 of file CoregionArea.cpp.

References get_vertex(), m_events, and result.

Referenced by DFSBackwardTraverser::traverse_event().

EventPSet CoregionArea::get_successor_events ( const Event e) const
virtual

Returns successor events of a given event within this area, or an empty set if this is a maximal event.

Implements EventArea.

Definition at line 56 of file CoregionArea.cpp.

References get_vertex(), m_events, and result.

CoregEventRelPtrVector CoregionArea::get_successor_rels ( const Event e) const
vertex_t CoregionArea::get_vertex ( const Event e) const
inlineprivate
bool CoregionArea::is_empty ( ) const
inlinevirtual

Returns true iff the event area doesn't contain any Events.

Implements EventArea.

Definition at line 82 of file CoregionArea.h.

Referenced by MonteCarlo::BMscDealer::traverse_area().

void CoregionArea::remove_event ( Event e)
virtual

Removes a given event from the area.

Implements EventArea.

Definition at line 22 of file CoregionArea.cpp.

References get_vertex(), and m_events.

Member Data Documentation

CoregionGraph CoregionArea::m_events
private
InstanceAxisForm CoregionArea::m_form
private

Form of the drawn coregion - which visual style of the coregion is used.

Definition at line 47 of file CoregionArea.h.


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