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

HMSC condition node. More...

#include <ConditionNode.h>

Inheritance diagram for ConditionNode:
Inheritance graph
Collaboration diagram for ConditionNode:
Collaboration graph

Public Types

enum  ConditionType {
  SETTING, UNSETTING, GUARDING, RANDOM,
  OTHERWISE
}
 

Public Member Functions

 ConditionNode ()
 
 ConditionNode (const std::string &label)
 
 ConditionNode (ConditionNode *original)
 
virtual ~ConditionNode ()
 
void assign_label (const std::string &label)
 
std::string get_label () const
 
void set_type (ConditionType type)
 Setter of m_type. More...
 
ConditionType get_type () const
 Getter of m_type. More...
 
void add_name (const std::string &name)
 Setter of m_names. More...
 
const std::vector< std::string > & get_names () const
 Getter of m_states. More...
 
void set_probability (double probability)
 Setter of m_probability. More...
 
double get_probability () const
 Getter of m_probability. More...
 
- Public Member Functions inherited from HMscNode
HMscget_owner () const
 
void set_owner (HMsc *owner)
 
const MscPointget_position () const
 
void set_position (const MscPoint &position)
 
HMscNodePtr my_ptr ()
 
virtual ~HMscNode ()
 
- Public Member Functions inherited from MscElementTmpl< HMscNode >
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...
 
HMscNodeget_original () const
 
void set_original (HMscNode *e)
 
void set_original (boost::intrusive_ptr< HMscNode > &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
 
- Public Member Functions inherited from PredecessorNode
 PredecessorNode ()
 
virtual ~PredecessorNode ()
 
const NodeRelationPtrVectorget_successors () const
 
NodeRelationPtr add_successor (SuccessorNode *succ)
 
void remove_successor (const NodeRelationPtr &n)
 
void remove_successors ()
 
bool has_successors () const
 
- Public Member Functions inherited from SuccessorNode
 SuccessorNode ()
 
virtual ~SuccessorNode ()
 
const NodeRelationPtrVectorget_predecessors () const
 
NodeRelationPtr add_predecessor (PredecessorNode *pred)
 
void remove_predecessor (const NodeRelationPtr &n)
 
void remove_predecessors ()
 
bool has_predecessors () const
 

Private Attributes

ConditionType m_type
 
std::vector< std::stringm_names
 
double m_probability
 probability (0-1) this condition is applied More...
 

Additional Inherited Members

- Protected Member Functions inherited from HMscNode
 HMscNode ()
 
 HMscNode (HMscNode *original)
 
- Protected Member Functions inherited from MscElementTmpl< HMscNode >
 MscElementTmpl ()
 
 MscElementTmpl (HMscNode *original)
 Creates MscElement referencing the original one. More...
 
- Protected Member Functions inherited from MscElement
 MscElement ()
 
- Protected Attributes inherited from HMscNode
HMscm_owner
 
- Protected Attributes inherited from MscElementTmpl< HMscNode >
int m_visual_style
 Visual style of the shape. More...
 
boost::intrusive_ptr< HMscNodem_original
 Pointer to original version of MscElement. More...
 
- Protected Attributes inherited from Commentable
CommentPtrSet m_comments
 
- Protected Attributes inherited from PredecessorNode
NodeRelationPtrVector m_successors
 Succesors of the PredecessorNode. More...
 
- Protected Attributes inherited from SuccessorNode
NodeRelationPtrVector m_predecessors
 Predecessors of the SuccessorNode. More...
 

Detailed Description

HMSC condition node.

Represents an HMSC condition.

Definition at line 27 of file ConditionNode.h.

Member Enumeration Documentation

Enumerator
SETTING 
UNSETTING 
GUARDING 
RANDOM 
OTHERWISE 

Definition at line 31 of file ConditionNode.h.

Constructor & Destructor Documentation

ConditionNode::ConditionNode ( )
inline

Definition at line 48 of file ConditionNode.h.

ConditionNode::ConditionNode ( const std::string label)
inline

Definition at line 53 of file ConditionNode.h.

ConditionNode::ConditionNode ( ConditionNode original)
inline

ConditionNode is allowed to reference via m_original different types of HMscNode.

Definition at line 63 of file ConditionNode.h.

References m_names, m_probability, and m_type.

virtual ConditionNode::~ConditionNode ( )
inlinevirtual

Definition at line 73 of file ConditionNode.h.

Member Function Documentation

void ConditionNode::add_name ( const std::string name)
inline

Setter of m_names.

Definition at line 93 of file ConditionNode.h.

void ConditionNode::assign_label ( const std::string label)
std::string ConditionNode::get_label ( ) const

Definition at line 149 of file ConditionNode.cpp.

References GUARDING, m_names, m_probability, m_type, OTHERWISE, RANDOM, SETTING, and UNSETTING.

const std::vector<std::string>& ConditionNode::get_names ( ) const
inline
double ConditionNode::get_probability ( ) const
inline

Getter of m_probability.

Definition at line 111 of file ConditionNode.h.

Referenced by MonteCarlo::HMscDealer::traverse_condition().

ConditionType ConditionNode::get_type ( ) const
inline

Getter of m_type.

Definition at line 87 of file ConditionNode.h.

Referenced by Condition::get_condition_effect(), and MonteCarlo::HMscDealer::traverse_condition().

void ConditionNode::set_probability ( double  probability)
inline

Setter of m_probability.

Definition at line 105 of file ConditionNode.h.

void ConditionNode::set_type ( ConditionType  type)
inline

Setter of m_type.

Definition at line 81 of file ConditionNode.h.

Member Data Documentation

std::vector<std::string> ConditionNode::m_names
private

Definition at line 43 of file ConditionNode.h.

Referenced by assign_label(), ConditionNode(), and get_label().

double ConditionNode::m_probability
private

probability (0-1) this condition is applied

Definition at line 45 of file ConditionNode.h.

Referenced by assign_label(), ConditionNode(), and get_label().

ConditionType ConditionNode::m_type
private

Definition at line 41 of file ConditionNode.h.

Referenced by assign_label(), ConditionNode(), and get_label().


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