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
EventArea Class Referenceabstract

General base area which contains events. More...

#include <EventArea.h>

Inheritance diagram for EventArea:
Inheritance graph
Collaboration diagram for EventArea:
Collaboration graph

Public Member Functions

 EventArea ()
 
 EventArea (EventArea *original)
 
virtual ~EventArea ()
 
const EventAreaPtr get_next_area () const
 
EventAreaget_previous_area () const
 
Instanceget_instance () const
 
void set_instance (Instance *instance)
 
virtual bool is_empty () const =0
 
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...
 
virtual void remove_event (Event *e)=0
 Removes a given event from the area. More...
 
virtual EventPSet get_predecessor_events (const Event *e) const =0
 Returns predecessor events of a given event within this area, or an empty set if this is a minimal event. More...
 
virtual EventPSet get_successor_events (const Event *e) const =0
 Returns successor events of a given event within this area, or an empty set if this is a maximal event. More...
 
virtual EventPList get_minimal_events () const =0
 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...
 
virtual EventPList get_maximal_events () const =0
 Returns the list of maximal events in this area, i.e., those not having any successors within the area. 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

virtual EventPtr add_event_impl (const EventPtr &e)=0
 
- 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 ()
 

Protected Attributes

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

General base area which contains events.

For details about EventArea organization at Instance see Instance.

Definition at line 33 of file EventArea.h.

Constructor & Destructor Documentation

EventArea::EventArea ( )
inline

Definition at line 51 of file EventArea.h.

EventArea::EventArea ( EventArea original)
inline

Constructor.

Definition at line 62 of file EventArea.h.

virtual EventArea::~EventArea ( )
inlinevirtual

Definition at line 70 of file EventArea.h.

Member Function Documentation

template<typename EventType >
boost::intrusive_ptr<EventType> EventArea::add_event ( const boost::intrusive_ptr< EventType > &  e)
inline

Puts an event in this area as a maximal event. The event itself is returned.

Definition at line 141 of file EventArea.h.

Referenced by EventsCreatorListener::on_white_event_found().

template<typename EventType >
boost::intrusive_ptr<EventType> EventArea::add_event ( EventType *  e)
inline

Puts an event in this area as a maximal event. The event itself is returned.

Definition at line 150 of file EventArea.h.

virtual EventPtr EventArea::add_event_impl ( const EventPtr e)
protectedpure virtual

Implemented in CoregionArea, and StrictOrderArea.

const Coordinate& EventArea::get_begin_height ( ) const
inline
const Coordinate& EventArea::get_end_height ( ) const
inline

Definition at line 112 of file EventArea.h.

Size EventArea::get_height ( ) const
inline

Definition at line 122 of file EventArea.h.

Referenced by PrintBmsc::insert_event().

Instance* EventArea::get_instance ( ) const
inline

Getter for m_instance

Definition at line 87 of file EventArea.h.

Referenced by Event::get_instance(), get_next_area(), get_previous_area(), and Instance::get_successor_events().

virtual EventPList EventArea::get_maximal_events ( ) const
pure 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.

Implemented in StrictOrderArea, and CoregionArea.

Referenced by VisualClosureInitiator::make_closure(), and DFSBackwardTraverser::traverse_area().

virtual EventPList EventArea::get_minimal_events ( ) const
pure 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.

Implemented in StrictOrderArea, and CoregionArea.

Referenced by DFSAreaTraverser::traverse_area(), and DFSEventsTraverser::traverse_area().

const EventAreaPtr EventArea::get_next_area ( ) const

Returns the next event area on the same instance, or intrusive NULL-pointer if this is the last one. TODO: refactor out usages of this method where possible, use iteration instead

Definition at line 22 of file EventArea.cpp.

References Instance::get_areas(), and get_instance().

Referenced by MonteCarlo::BMscDealer::traverse_area(), DFSEventsTraverser::traverse_area(), MonteCarlo::BMscDealer::traverse_event(), and DFSEventsTraverser::traverse_event().

virtual EventPSet EventArea::get_predecessor_events ( const Event e) const
pure virtual

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

Implemented in CoregionArea, and StrictOrderArea.

EventArea * EventArea::get_previous_area ( ) const

Returns the previous event area on the same instance, or intrusive NULL-pointer if this is the first one. TODO: refactor out usages of this method where possible, use iteration instead

Definition at line 33 of file EventArea.cpp.

References Instance::get_areas(), and get_instance().

Referenced by VisualClosureInitiator::make_closure(), DFSBackwardTraverser::traverse_area(), and DFSBackwardTraverser::traverse_event().

virtual EventPSet EventArea::get_successor_events ( const Event e) const
pure virtual

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

Implemented in CoregionArea, and StrictOrderArea.

Referenced by Instance::get_successor_events().

Size EventArea::get_width ( ) const
inline
virtual bool EventArea::is_empty ( ) const
pure virtual
virtual void EventArea::remove_event ( Event e)
pure virtual

Removes a given event from the area.

Implemented in CoregionArea, and StrictOrderArea.

Referenced by remove_added_message().

void EventArea::set_begin_height ( const Coordinate begin_height)
inline

Definition at line 107 of file EventArea.h.

void EventArea::set_end_height ( const Coordinate end_height)
inline

Definition at line 117 of file EventArea.h.

void EventArea::set_instance ( Instance instance)
inline

Definition at line 92 of file EventArea.h.

void EventArea::set_width ( const Size width)
inline

Member Data Documentation

Coordinate EventArea::m_begin_height
protected

Definition at line 37 of file EventArea.h.

Coordinate EventArea::m_end_height
protected

Definition at line 38 of file EventArea.h.

Instance* EventArea::m_instance
protected

Instance which EventArea occures on

Warning
boost::intrusive_ptr mustn't be used because of possible cyclic dependency

Definition at line 47 of file EventArea.h.

Size EventArea::m_width
protected

Definition at line 40 of file EventArea.h.


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