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

Represents process (vertical line) in Basic MSC. More...

#include <Instance.h>

Inheritance diagram for Instance:
Inheritance graph
Collaboration diagram for Instance:
Collaboration graph

Public Member Functions

 Instance (const std::wstring &label, const std::wstring &kind=L"")
 
 Instance (Instance *original)
 
virtual ~Instance ()
 
InstanceAxisForm get_form () const
 
const EventAreaPtr get_first_area () const
 
const EventAreaPtr get_last_area () const
 
void add_area (EventAreaPtr area)
 
const EventAreaPtrListget_areas () const
 
const std::wstring & get_label () const
 
void set_label (const std::wstring &label)
 
BMscget_bmsc () const
 
void set_bmsc (BMsc *bmsc)
 
const MscPointget_line_begin () const
 
void set_line_begin (const MscPoint &line_begin)
 
const MscPointget_line_end () const
 
void set_line_end (const MscPoint &line_end)
 
Size get_height () const
 
Size get_width () const
 
void set_width (const Size &width)
 
bool is_empty () const
 Returns true iff the instance has any event area. More...
 
bool has_events () const
 Returns true iff the instance contains at least one event. More...
 
const EventPList get_minimal_events (EventAreaPtrList::const_iterator from_area) const
 Returns a list of minimal events on the instance part starting from a given area, in the insert order to the area. Minimal events are those without any preceding event within the instance part starting at from_area. In case there are no events on the instance from the starting area, an empty list is returned. More...
 
const EventPList get_minimal_events () const
 Returns a list of minimal events on this instance, in the insert order to the area. Minimal events are those without any preceding event on the instance. In case there are no events, an empty list is returned. More...
 
const EventPList get_maximal_events () const
 Returns a list of maximal events on this instance, in the insert order to the area. Maximal events are those without any successor event on the instance. In case there are no events, an empty list is returned. More...
 
const EventPSet get_successor_events (const Event *e) const
 Returns a set of immediate successor events of a given event. More...
 
- Public Member Functions inherited from MscElementTmpl< Instance >
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...
 
Instanceget_original () const
 
void set_original (Instance *e)
 
void set_original (boost::intrusive_ptr< Instance > &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 ()
 

Private Attributes

std::wstring m_label
 
std::wstring m_kind
 
InstanceAxisForm m_form
 
EventAreaPtrList m_event_areas
 
BMscm_bmsc
 
MscPoint m_line_begin
 
MscPoint m_line_end
 
Size m_width
 

Additional Inherited Members

- Protected Member Functions inherited from MscElementTmpl< Instance >
 MscElementTmpl ()
 
 MscElementTmpl (Instance *original)
 Creates MscElement referencing the original one. More...
 
- Protected Member Functions inherited from MscElement
 MscElement ()
 
- Protected Attributes inherited from MscElementTmpl< Instance >
int m_visual_style
 Visual style of the shape. More...
 
boost::intrusive_ptr< Instancem_original
 Pointer to original version of MscElement. More...
 

Detailed Description

Represents process (vertical line) in Basic MSC.

Definition at line 27 of file Instance.h.

Constructor & Destructor Documentation

Instance::Instance ( const std::wstring &  label,
const std::wstring &  kind = L"" 
)
inline
Parameters
label- label of instance

Definition at line 69 of file Instance.h.

Instance::Instance ( Instance original)
inline

Definition at line 78 of file Instance.h.

virtual Instance::~Instance ( )
inlinevirtual

Definition at line 89 of file Instance.h.

Member Function Documentation

void Instance::add_area ( EventAreaPtr  area)

Inserts a new event area at the end of the instance.

Definition at line 24 of file Instance.cpp.

References m_event_areas.

Referenced by HMscFlatPathToBMscDuplicator::duplicate_path(), and EventsCreatorListener::on_white_event_found().

const EventAreaPtrList& Instance::get_areas ( ) const
inline
BMsc* Instance::get_bmsc ( ) const
inline
const EventAreaPtr Instance::get_first_area ( ) const
inline

Gets the first event area, or boost intrusive NULL-pointer if there is no event area on the instance. TODO: find out whether it is still used after refactoring

Definition at line 102 of file Instance.h.

Referenced by DFSInstanceEventsTraverser::traverse().

InstanceAxisForm Instance::get_form ( ) const
inline

Definition at line 93 of file Instance.h.

Size Instance::get_height ( ) const
inline

Definition at line 185 of file Instance.h.

const std::wstring& Instance::get_label ( ) const
inline
const EventAreaPtr Instance::get_last_area ( ) const
inline

Gets the last event area, or boost intrusive NULL-pointer if there is no event area on the instance. TODO: find out whether it is still used after refactoring

Definition at line 116 of file Instance.h.

const MscPoint& Instance::get_line_begin ( ) const
inline
const MscPoint& Instance::get_line_end ( ) const
inline

Definition at line 175 of file Instance.h.

const EventPList Instance::get_maximal_events ( ) const

Returns a list of maximal events on this instance, in the insert order to the area. Maximal events are those without any successor event on the instance. In case there are no events, an empty list is returned.

Definition at line 48 of file Instance.cpp.

References m_event_areas.

Referenced by get_last_instance_event().

const EventPList Instance::get_minimal_events ( EventAreaPtrList::const_iterator  from_area) const

Returns a list of minimal events on the instance part starting from a given area, in the insert order to the area. Minimal events are those without any preceding event within the instance part starting at from_area. In case there are no events on the instance from the starting area, an empty list is returned.

Definition at line 39 of file Instance.cpp.

References m_event_areas.

const EventPList Instance::get_minimal_events ( ) const
inline

Returns a list of minimal events on this instance, in the insert order to the area. Minimal events are those without any preceding event on the instance. In case there are no events, an empty list is returned.

Definition at line 230 of file Instance.h.

Referenced by get_successor_events().

const EventPSet Instance::get_successor_events ( const Event e) const

Returns a set of immediate successor events of a given event.

Definition at line 57 of file Instance.cpp.

References Event::get_area(), EventArea::get_instance(), get_minimal_events(), EventArea::get_successor_events(), and m_event_areas.

Size Instance::get_width ( ) const
inline

Definition at line 192 of file Instance.h.

bool Instance::has_events ( ) const

Returns true iff the instance contains at least one event.

Definition at line 30 of file Instance.cpp.

References m_event_areas.

bool Instance::is_empty ( ) const
inline

Returns true iff the instance has any event area.

Note that the event area itself may be empty. To tell whether there are some events on the instance, use the has_events() method.

Definition at line 208 of file Instance.h.

void Instance::set_bmsc ( BMsc bmsc)
inline

Definition at line 160 of file Instance.h.

void Instance::set_label ( const std::wstring &  label)
inline

Definition at line 147 of file Instance.h.

void Instance::set_line_begin ( const MscPoint line_begin)
inline

Definition at line 170 of file Instance.h.

void Instance::set_line_end ( const MscPoint line_end)
inline

Definition at line 180 of file Instance.h.

void Instance::set_width ( const Size width)
inline

Definition at line 197 of file Instance.h.

Member Data Documentation

BMsc* Instance::m_bmsc
private

BMsc which this instance belongs to

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

Definition at line 57 of file Instance.h.

EventAreaPtrList Instance::m_event_areas
private

List of event areas the instance consists of.

Definition at line 50 of file Instance.h.

Referenced by add_area(), get_maximal_events(), get_minimal_events(), get_successor_events(), and has_events().

InstanceAxisForm Instance::m_form
private

Form of instance axis (line/column)

Definition at line 45 of file Instance.h.

std::wstring Instance::m_kind
private

Kind of instance – name of particular type of instance

Definition at line 40 of file Instance.h.

std::wstring Instance::m_label
private

Label of instance – name of concrete instance

Definition at line 35 of file Instance.h.

MscPoint Instance::m_line_begin
private

Definition at line 59 of file Instance.h.

MscPoint Instance::m_line_end
private

Definition at line 60 of file Instance.h.

Size Instance::m_width
private

Definition at line 62 of file Instance.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