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

Condition on an instance in Basic MSC. TODO: support multiple instances bound to a single condition. More...

#include <Condition.h>

Inheritance diagram for Condition:
Inheritance graph
Collaboration diagram for Condition:
Collaboration graph

Public Member Functions

 Condition (const std::wstring &text=L"", Coordinate width=0.0, Coordinate height=0.0)
 
 Condition (Condition *original)
 
const std::wstring & get_text () const
 
std::pair< SystemState,
SystemState
get_condition_effect () const
 
void glue_event (ConditionEvent *event)
 
ConditionEventget_event ()
 
bool is_glued () const
 
Coordinate get_width () const
 
Coordinate get_height () const
 
void set_width (Coordinate width)
 
void set_height (Coordinate height)
 
- Public Member Functions inherited from MscElementTmpl< Condition >
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...
 
Conditionget_original () const
 
void set_original (Condition *e)
 
void set_original (boost::intrusive_ptr< Condition > &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_text
 
ConditionEventm_event
 
Coordinate m_width
 
Coordinate m_height
 

Additional Inherited Members

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

Detailed Description

Condition on an instance in Basic MSC. TODO: support multiple instances bound to a single condition.

Definition at line 28 of file Condition.h.

Constructor & Destructor Documentation

Condition::Condition ( const std::wstring &  text = L"",
Coordinate  width = 0.0,
Coordinate  height = 0.0 
)
inline

Definition at line 45 of file Condition.h.

Condition::Condition ( Condition original)
inline

Definition at line 50 of file Condition.h.

Member Function Documentation

std::pair< SystemState, SystemState > Condition::get_condition_effect ( ) const

Computes the condition effect of this condition. In the first element of the pair, a set of condition variable names which get set by this condition is returned. In the second element of the pair, a set of condition variable names which get unset by this condition is returned.

Definition at line 36 of file Condition.cpp.

References ConditionNode::assign_label(), ConditionNode::get_names(), ConditionNode::get_type(), m_text, ConditionNode::SETTING, string, and ConditionNode::UNSETTING.

ConditionEvent* Condition::get_event ( )
inline

Definition at line 71 of file Condition.h.

Coordinate Condition::get_height ( ) const
inline

Definition at line 86 of file Condition.h.

Referenced by LayoutOptimizer::process().

const std::wstring& Condition::get_text ( ) const
inline

Definition at line 57 of file Condition.h.

Coordinate Condition::get_width ( ) const
inline

Definition at line 81 of file Condition.h.

void Condition::glue_event ( ConditionEvent event)

Definition at line 21 of file Condition.cpp.

References m_event, and ConditionEvent::set_condition().

bool Condition::is_glued ( ) const
inline

Definition at line 76 of file Condition.h.

void Condition::set_height ( Coordinate  height)
inline

Definition at line 96 of file Condition.h.

Referenced by CDrawingExtractor::extract_bmsc().

void Condition::set_width ( Coordinate  width)
inline

Definition at line 91 of file Condition.h.

Referenced by CDrawingExtractor::extract_bmsc().

Member Data Documentation

ConditionEvent* Condition::m_event
private

Peer event.

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

Definition at line 39 of file Condition.h.

Referenced by glue_event().

Coordinate Condition::m_height
private

Definition at line 42 of file Condition.h.

std::wstring Condition::m_text
private

Condition text.

Definition at line 33 of file Condition.h.

Referenced by get_condition_effect().

Coordinate Condition::m_width
private

Definition at line 41 of file Condition.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