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

A common ancestor for all event classes. More...

#include <Event.h>

Inheritance diagram for Event:
Inheritance graph
Collaboration diagram for Event:
Collaboration graph

Public Member Functions

 Event ()
 
virtual ~Event ()
 
virtual Eventclone ()
 
virtual const std::wstring to_string ()
 
Instanceget_instance () const
 
EventAreaget_area () const
 
EventAreaPtrList::const_iterator get_area_iterator () const
 
void set_area (EventArea *area)
 
const MscPointget_position () const
 
void set_position (const MscPoint &position)
 
bool is_minimal () const
 Finds out whether this event is minimal within its area. This is just a convenience method. The call is delegated to the area. More...
 
bool is_maximal () const
 Finds out whether this event is maximal within its area. This is just a convenience method. The call is delegated to the area. More...
 
EventPSet get_predecessor_events () const
 Returns the set of predecessors of this event within the same area. This is just a convenience method. The call is delegated to the area. More...
 
EventPSet get_successor_events () const
 Returns the set of successors of this event within the same area. This is just a convenience method. The call is delegated to the area. More...
 
EventP get_predecessor_event () const
 Returns any single predecessor of this event within the same area, or NULL if there isn't any. Suitable for situations where it is irrelevant which predecessor is to be taken, or if there may be just one. This is just a convenience method. The call is delegated to the area. More...
 
EventP get_successor_event () const
 Returns any single successor of this event within the same area, or NULL if there isn't any. Suitable for situations where it is irrelevant which successor is to be taken, or if there may be just one. This is just a convenience method. The call is delegated to the area. More...
 
bool has_predecessor_events () const
 Finds out whether this event has any predecessors within the same area. This is just a convenience method. The call is delegated to the area. More...
 
bool has_successor_events () const
 Finds out whether this event has any successors within the same area. This is just a convenience method. The call is delegated to the area. More...
 
bool in_coregion_area () const
 Finds out whether the event is in a coregion area. NOTE: Should only be used where it is not obvious in what type of area this event is, and only for printing/formatting purposes. More...
 
bool in_strict_order_area () const
 Finds out whether the event is in a strict-order area. NOTE: Should only be used where it is not obvious in what type of area this event is, and only for printing/formatting purposes. More...
 
void add_time_relation (const TimeRelationEventPtr &relation)
 
void remove_time_relation (const TimeRelationEventPtr &relation)
 
void set_time_relations (const TimeRelationEventPtrList &list)
 
const TimeRelationEventPtrListget_time_relations () const
 
void clear_time_relations ()
 
void add_absolut_time (MscTimeIntervalSetD absolut_time)
 
void remove_absolut_time (const MscTimeIntervalSetD &absolute_time)
 
void set_absolut_time (const std::list< AbsoluteTimePtr > &list)
 
const AbsoluteTimePtrListget_absolut_times () const
 
void clear_absolut_times ()
 
- Public Member Functions inherited from MscElementTmpl< Event >
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...
 
Eventget_original () const
 
void set_original (Event *e)
 
void set_original (boost::intrusive_ptr< Event > &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 ()
 
- Public Member Functions inherited from Commentable
virtual ~Commentable ()
 
void add_comment (CommentPtr comment)
 
const CommentPtrSetget_comments () const
 

Protected Member Functions

 Event (Event *original)
 
- Protected Member Functions inherited from MscElementTmpl< Event >
 MscElementTmpl ()
 
 MscElementTmpl (Event *original)
 Creates MscElement referencing the original one. More...
 
- Protected Member Functions inherited from MscElement
 MscElement ()
 

Private Attributes

EventAream_area
 
MscPoint m_position
 
TimeRelationEventPtrList m_time_relations
 
AbsoluteTimePtrList m_absolute_time
 

Additional Inherited Members

- Protected Attributes inherited from MscElementTmpl< Event >
int m_visual_style
 Visual style of the shape. More...
 
boost::intrusive_ptr< Eventm_original
 Pointer to original version of MscElement. More...
 
- Protected Attributes inherited from Commentable
CommentPtrSet m_comments
 

Detailed Description

A common ancestor for all event classes.

Every event, bound with an MscElement which triggers the event, should specialize the EventTmpl template class with the according MscElement type, i.e. a MscMessage, LocalAction, ...

Definition at line 34 of file Event.h.

Constructor & Destructor Documentation

Event::Event ( Event original)
protected

Copy constructor, used by the clone() method to event duplication. Instantiates new absolute time objects attached to this event. NOTE: only subclasses should call the copy constructor, internally; use the clone() method to copy an event from user code

Definition at line 21 of file Event.cpp.

References m_absolute_time.

Event::Event ( )
inline

Definition at line 69 of file Event.h.

virtual Event::~Event ( )
inlinevirtual

Definition at line 73 of file Event.h.

Member Function Documentation

void Event::add_absolut_time ( MscTimeIntervalSetD  absolut_time)

Definition at line 53 of file Event.cpp.

References m_absolute_time.

void Event::add_time_relation ( const TimeRelationEventPtr relation)
inline

Definition at line 252 of file Event.h.

Referenced by TimeRelationEvent::glue_event_a(), and TimeRelationEvent::glue_event_b().

void Event::clear_absolut_times ( )
inline

Definition at line 306 of file Event.h.

void Event::clear_time_relations ( )
inline

Definition at line 276 of file Event.h.

virtual Event* Event::clone ( )
inlinevirtual

Duplicates the event. Returns a new, dynamically allocated object. NOTE: Especially useful for creating dynamic clones. NOTE: override in a subclass which has some additional attributes to be cloned (as, e.g., EventTmpl does) NOTE: for why this is a good idea, see, e.g., http://www.agiledeveloper.com/articles/cloning072002.htm

Reimplemented in MessageEvent, ConditionEvent, and LocalActionEvent.

Definition at line 83 of file Event.h.

Referenced by EventsCreatorListener::on_white_event_found().

const AbsoluteTimePtrList& Event::get_absolut_times ( ) const
inline
EventArea* Event::get_area ( ) const
inline
EventAreaPtrList::const_iterator Event::get_area_iterator ( ) const
inline

Returns iterator to the EventArea this event occurs in.

Definition at line 113 of file Event.h.

Instance * Event::get_instance ( ) const
const MscPoint& Event::get_position ( ) const
inline

Returns relative position of the event within the respective event area.

Definition at line 134 of file Event.h.

Referenced by AbsoluteTimeEventListener::on_white_event_found().

EventP Event::get_predecessor_event ( ) const
inline

Returns any single predecessor of this event within the same area, or NULL if there isn't any. Suitable for situations where it is irrelevant which predecessor is to be taken, or if there may be just one. This is just a convenience method. The call is delegated to the area.

Definition at line 194 of file Event.h.

Referenced by can_reconstruct_message(), TightenLeftEndpointListener::on_event_finished(), OrderRelativeTimesListener::on_event_finished(), and post_processing_incomplete_msg().

EventPSet Event::get_predecessor_events ( ) const
inline

Returns the set of predecessors of this event within the same area. This is just a convenience method. The call is delegated to the area.

Definition at line 175 of file Event.h.

Referenced by VisualClosureInitiator::make_closure().

EventP Event::get_successor_event ( ) const
inline

Returns any single successor of this event within the same area, or NULL if there isn't any. Suitable for situations where it is irrelevant which successor is to be taken, or if there may be just one. This is just a convenience method. The call is delegated to the area.

Definition at line 208 of file Event.h.

Referenced by can_reconstruct_message(), check_coregion_attributes(), coregion_strict(), TightenRightEndpointListener::on_event_finished(), EventHeuristicListener::on_event_finished(), TimestampConsistencyListener::on_white_event_found(), post_processing_incomplete_msg(), and strict_strict().

EventPSet Event::get_successor_events ( ) const
inline

Returns the set of successors of this event within the same area. This is just a convenience method. The call is delegated to the area.

Definition at line 184 of file Event.h.

const TimeRelationEventPtrList& Event::get_time_relations ( ) const
inline
bool Event::has_predecessor_events ( ) const
inline

Finds out whether this event has any predecessors within the same area. This is just a convenience method. The call is delegated to the area.

Definition at line 221 of file Event.h.

Referenced by TightenLeftEndpointListener::on_event_finished(), and OrderRelativeTimesListener::on_event_finished().

bool Event::has_successor_events ( ) const
inline

Finds out whether this event has any successors within the same area. This is just a convenience method. The call is delegated to the area.

Definition at line 230 of file Event.h.

Referenced by TightenRightEndpointListener::on_event_finished(), and TimestampConsistencyListener::on_white_event_found().

bool Event::in_coregion_area ( ) const

Finds out whether the event is in a coregion area. NOTE: Should only be used where it is not obvious in what type of area this event is, and only for printing/formatting purposes.

Definition at line 43 of file Event.cpp.

References m_area.

Referenced by coregion_strict(), and EventsCreatorListener::create_successor().

bool Event::in_strict_order_area ( ) const

Finds out whether the event is in a strict-order area. NOTE: Should only be used where it is not obvious in what type of area this event is, and only for printing/formatting purposes.

Definition at line 48 of file Event.cpp.

References m_area.

Referenced by EventHeuristicListener::on_event_finished(), and TimestampConsistencyListener::on_white_event_found().

bool Event::is_maximal ( ) const
inline

Finds out whether this event is maximal within its area. This is just a convenience method. The call is delegated to the area.

Definition at line 165 of file Event.h.

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

bool Event::is_minimal ( ) const
inline

Finds out whether this event is minimal within its area. This is just a convenience method. The call is delegated to the area.

Definition at line 155 of file Event.h.

Referenced by VisualClosureInitiator::make_closure(), BMscInitListener::on_white_event_found(), ProcessListener::on_white_node_found(), and DFSBackwardTraverser::traverse_event().

void Event::remove_absolut_time ( const MscTimeIntervalSetD absolute_time)

Definition at line 59 of file Event.cpp.

References m_absolute_time.

void Event::remove_time_relation ( const TimeRelationEventPtr relation)
inline

Definition at line 257 of file Event.h.

Referenced by TimeRelationEvent::glue_event_a(), and TimeRelationEvent::glue_event_b().

void Event::set_absolut_time ( const std::list< AbsoluteTimePtr > &  list)
inline

Definition at line 296 of file Event.h.

void Event::set_area ( EventArea area)
inline

Sets the event area this event belongs to.

Definition at line 126 of file Event.h.

void Event::set_position ( const MscPoint position)
inline

Sets relative position of the event within the respective event area.

Definition at line 142 of file Event.h.

void Event::set_time_relations ( const TimeRelationEventPtrList list)
inline

Definition at line 266 of file Event.h.

virtual const std::wstring Event::to_string ( )
inlinevirtual

Returns a textual identification of the event (label of the attached message, local action contents, etc.). No strict format is enforced, just a free-form text for the user to identify an event (e.g. in an error message).

Reimplemented in TemporaryEvent, MessageEvent, ConditionEvent, and LocalActionEvent.

Definition at line 92 of file Event.h.

Member Data Documentation

AbsoluteTimePtrList Event::m_absolute_time
private

Absolute times attached to this event.

Definition at line 57 of file Event.h.

Referenced by add_absolut_time(), Event(), and remove_absolut_time().

EventArea* Event::m_area
private

Event area which this Event belongs to.

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

Definition at line 42 of file Event.h.

Referenced by get_instance(), in_coregion_area(), and in_strict_order_area().

MscPoint Event::m_position
private

Relative position of the event within the respective event area.

Definition at line 47 of file Event.h.

TimeRelationEventPtrList Event::m_time_relations
private

Time relations attached to this event.

Definition at line 52 of file Event.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