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 | Friends | List of all members
MscElement Class Referenceabstract

Common basic abstract class for all elements of MSC. More...

#include <MscElement.h>

Inheritance diagram for MscElement:
Inheritance graph
Collaboration diagram for MscElement:
Collaboration graph

Public Member Functions

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 MscElementget_general_original () const =0
 See MscElementTmpl for details about attribute original. More...
 
virtual void set_general_original (MscElement *original)=0
 See MscElementTmpl for details about attribute original. More...
 
virtual ~MscElement ()
 

Protected Member Functions

 MscElement ()
 

Private Attributes

AttributePMap m_attributes
 Atributes of MscElement which may be dynamically created. More...
 
enum MarkType m_marked
 Determines whether this element is in some way interesting for creator. More...
 
MscColor m_color
 
volatile boost::uint32_t m_counter
 Number of references to this object. More...
 

Friends

void intrusive_ptr_add_ref (const MscElement *ptr)
 
void intrusive_ptr_release (const MscElement *ptr)
 

Detailed Description

Common basic abstract class for all elements of MSC.

Definition at line 25 of file MscElement.h.

Constructor & Destructor Documentation

MscElement::MscElement ( )
inlineprotected

Definition at line 45 of file MscElement.h.

References NONE.

virtual MscElement::~MscElement ( )
inlinevirtual

Definition at line 223 of file MscElement.h.

Member Function Documentation

void MscElement::clear_color ( )
inline

Definition at line 205 of file MscElement.h.

template<class T >
T& MscElement::get_attribute ( const std::string name,
const T &  def 
)
inline

Returns dynamic attribute of MscElement.

If attribute is not set, value of def is copied into its value and is returned. T is type of attribute.

Keep in mind that this method hasn't got constant complexity but O(log n) where n=number of dynamic attributes set to this element.

Parameters
name- attribute name
def- default value of attribute

Definition at line 80 of file MscElement.h.

Referenced by TarjanCycles::backtrack(), AcyclicChecker::check(), check_node_ref_time(), TarjanCycles::circuit_enumeration(), compare_events(), compare_events_attribute(), create_absolute_constraint(), CausalClosureInitiator::get_causal_closure(), FifoChecker::get_channel_id(), DFSBHMscTraverser::get_color(), DFSBackwardTraverser::get_color(), DFSEventsTraverser::get_color(), DFSBMscGraphTraverser::get_color(), Duplicator::get_copy(), GraphCreatorListener::get_end_list(), MinimalEventsInitiator::get_events(), MaximalEventsInitiator::get_events_less(), HMscConstraintCheck::get_first_find_with(), InstanceIdMarker::get_instance_id(), HMscConstraintCheck::get_local_active_constraints(), WhiteNodeMarker::get_mark(), GraphCreatorListener::get_referencing_node(), VisualClosureInitiator::get_topology_index(), VisualClosureInitiator::get_visual_closure(), BoundednessListener::on_elementary_cycle_found(), InstanceSuccessors::on_event_successor(), EventConstraintCreator::on_event_successor(), MyTraverse::on_node_finished(), MessageSuceessors::on_send_receive_pair(), EventConstraintCreator::on_send_receive_pair(), CleanHMscListener::on_white_event_found(), CommunicationGraphListener::on_white_event_found(), EventConstraintCreator::on_white_event_found(), FindResultsListener::on_white_node_found(), ResultCatcher::on_white_node_found(), IterationListener::on_white_node_found(), CatchResults::on_white_node_found(), ProcessListener::on_white_node_found(), BMscResultsCatcher::on_white_node_found(), LayoutOptimizer::process(), and CDrawingVisualizer::visualize_hmsc().

template<class T >
T& MscElement::get_attribute ( const std::string name,
const T &  def,
bool &  status 
)
inline

Returns dynamic attribute of MscElement.

If attribute is not set, value of def is copied into its value and is returned. T is type of attribute.

Keep in mind that this method hasn't got constant complexity but O(log n) where n=number of dynamic attributes set to this element.

Parameters
name- attribute name
def- default value of attribute
status- set to true if attribute was just created, to false otherwise

Definition at line 111 of file MscElement.h.

std::set<std::string> MscElement::get_attribute_names ( ) const
inline

List all attributes of MscElement.

Definition at line 172 of file MscElement.h.

References result.

MscColor MscElement::get_color ( ) const
inline

Definition at line 195 of file MscElement.h.

Referenced by CDrawingVisualizer::visualize_hmsc().

virtual MscElement* MscElement::get_general_original ( ) const
pure virtual
enum MarkType MscElement::get_marked ( ) const
inline
bool MscElement::is_attribute_set ( const std::string name) const
inline
template<class T >
void MscElement::remove_attribute ( const std::string name)
inline

Removes attribute of MscElement.

Keep in mind that this method hasn't got constant complexity but O(log n) where n=number of dynamic attributes set to this element.

Removes attribute with specified name from m_attributes map and deletes it from memory too. T is type of attribute.

Parameters
name- attribute name

Definition at line 159 of file MscElement.h.

Referenced by FootprintTraverser::cleanup(), MinimalEventsInitiator::cleanup_attributes(), CausalClosureInitiator::cleanup_attributes(), FifoChecker::cleanup_attributes(), MaximalEventsInitiator::cleanup_attributes(), HMscConstraintCheck::cleanup_attributes(), HMscFlatPathDuplicator::duplicate_path(), NodeFinder::find_predecessors(), NodeFinder::find_successors(), ReferenceNodeFinderListener::on_gray_node_found(), FootprintTraverser::on_gray_node_found(), MyTraverse::on_node_finished(), GraphCreatorListener::on_node_finished(), CleanHMscListener::on_white_event_found(), BackwardMarker::on_white_node_found(), CleanupListener::on_white_node_found(), ResultFinderListener::on_white_node_found(), FindResultsListener::on_white_node_found(), ResultCatcher::on_white_node_found(), IterationListener::on_white_node_found(), CleanupListenerLC::on_white_node_found(), BoundednessCleanupListener::on_white_node_found(), Unmarker::on_white_node_found(), CatchResults::on_white_node_found(), BMscResultsCatcher::on_white_node_found(), MembershipContext::remove_attributed_event(), remove_attributes(), remove_inst_cor_attributes(), FootprintTraverser::traverse(), and GraphCreatorListener::~GraphCreatorListener().

template<class T >
void MscElement::set_attribute ( const std::string name,
const T &  val 
)
inline
void MscElement::set_color ( MscColor  color)
inline
virtual void MscElement::set_general_original ( MscElement original)
pure virtual
void MscElement::set_marked ( enum MarkType  marked = MARKED)
inline

Friends And Related Function Documentation

void intrusive_ptr_add_ref ( const MscElement ptr)
friend

Definition at line 236 of file MscElement.h.

void intrusive_ptr_release ( const MscElement ptr)
friend

Definition at line 250 of file MscElement.h.

Member Data Documentation

AttributePMap MscElement::m_attributes
private

Atributes of MscElement which may be dynamically created.

It is neccessary to ensure to remove any attribute if the attribute is no more required. These attributes are mostly used in checking algorithms.

Warning
individual attributes are of type AttributeP, i.e. type control is left up to piece of code using these attributes

Definition at line 36 of file MscElement.h.

MscColor MscElement::m_color
private

Definition at line 41 of file MscElement.h.

volatile boost::uint32_t MscElement::m_counter
mutableprivate

Number of references to this object.

Definition at line 229 of file MscElement.h.

Referenced by intrusive_ptr_add_ref(), and intrusive_ptr_release().

enum MarkType MscElement::m_marked
private

Determines whether this element is in some way interesting for creator.

Definition at line 39 of file MscElement.h.


The documentation for this class was generated from the following file:

SourceForge.net Logo
Generated on Fri Jan 15 2016 16:26:59 for Sequence Chart Studio by  doxygen