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

#include <constraint_syntax.h>

Inheritance diagram for ConstraintsChecker:
Inheritance graph
Collaboration diagram for ConstraintsChecker:
Collaboration graph

Public Member Functions

 ConstraintsChecker ()
 
std::list< BMscPtrcheck (BMscPtr, ChannelMapperPtr)
 
std::list< HMscPtrcheck (HMscPtr, ChannelMapperPtr)
 
void on_new_inner_bmsc_found (BMscPtr bmsc, ReferenceNode *refNode)
 
void on_new_inner_hmsc_found (HMscPtr hmsc, ReferenceNode *refNode)
 
std::wstring get_property_name () const
 
virtual std::wstring get_help_filename () const
 
Checker::PreconditionList get_preconditions (MscPtr msc) const
 Returns a list of preconditions for the check. More...
 
void cleanup_attributes ()
 
bool is_supported (ChannelMapperPtr chm)
 
- Public Member Functions inherited from Checker
virtual ~Checker ()
 
- Public Member Functions inherited from Reporter
 Reporter ()
 
 Reporter (ReportPrinter *printer)
 
virtual ~Reporter ()
 
void set_printer (ReportPrinter *printer)
 
int print_report (TReportSeverity severity, const std::wstring &message)
 
- Public Member Functions inherited from HMscChecker
virtual ~HMscChecker ()
 
- Public Member Functions inherited from BMscChecker
virtual ~BMscChecker ()
 
- Public Member Functions inherited from InnerBMscFoundListener
 InnerBMscFoundListener ()
 
 InnerBMscFoundListener (std::set< BMsc * > bmscs)
 
virtual ~InnerBMscFoundListener ()
 
void inner_bmsc_found (BMscPtr bmsc, ReferenceNode *refNode)
 
virtual void on_inner_bmsc_found (BMscPtr, ReferenceNode *)
 
- Public Member Functions inherited from InnerHMscFoundListener
 InnerHMscFoundListener ()
 
 InnerHMscFoundListener (std::set< HMsc * > hmscs)
 
virtual ~InnerHMscFoundListener ()
 
void add_hmsc_as_traversed (HMscPtr hmsc)
 
void inner_hmsc_found (HMscPtr, ReferenceNode *)
 
virtual void on_inner_hmsc_found (HMscPtr, ReferenceNode *)
 

Private Member Functions

void mark ()
 
void mark (ReferenceNode *n)
 
void mark (Msc *msc)
 

Private Attributes

HMscPtr m_copy
 
HMscPtr m_original
 
DFSHMscsTraversem_tra
 
bool m_changed
 
std::stack< Msc * > wrong_msc
 

Additional Inherited Members

- Public Types inherited from Checker
typedef std::vector
< PrerequisiteCheck
PreconditionList
 List of properties that must be satisfied before executing the check. More...
 
- Protected Member Functions inherited from HMscChecker
 HMscChecker ()
 
- Protected Attributes inherited from InnerHMscFoundListener
std::set< HMsc * > m_hmscs
 
- Static Protected Attributes inherited from BMscChecker
static BMscCheckerPtr m_checker
 

Detailed Description

Definition at line 52 of file constraint_syntax.h.

Constructor & Destructor Documentation

ConstraintsChecker::ConstraintsChecker ( )
inline

Definition at line 73 of file constraint_syntax.h.

Member Function Documentation

std::list< BMscPtr > ConstraintsChecker::check ( BMscPtr  bmsc,
ChannelMapperPtr  mapper 
)
virtual

Checks BMsc against specific property.

Returns a list of BMscPtr with violating examples if there are any in bmsc otherwise the list is empty.

Parameters
bmsc- BMsc to be checked
mapper- ChannelMapper which is chosen as delivery semantic

Implements BMscChecker.

Definition at line 77 of file constraint_syntax.cpp.

References BMscConstraintCheck::check(), and result.

std::list< HMscPtr > ConstraintsChecker::check ( HMscPtr  hmsc,
ChannelMapperPtr  mapper 
)
virtual

Checks HMsc against specific property.

Returns a list of MscPathPtr with violating examples if there are any in hmsc otherwise the list is empty.

Parameters
hmsc- HMsc to be checked
mapper- ChannelMapper which is chosen as delivery semantic

Implements HMscChecker.

Definition at line 45 of file constraint_syntax.cpp.

References DFSHMscFlatTraverser::add_inner_bmsc_listener(), DFSHMscFlatTraverser::add_inner_hmsc_listener(), HMscDuplicator::duplicate(), InnerHMscFoundListener::inner_hmsc_found(), m_changed, m_copy, m_original, m_tra, mark(), result, and DFSHMscsTraverse::traverse().

void ConstraintsChecker::cleanup_attributes ( )
inlinevirtual

Removes no more needed attributes.

Descendat of this class should remove attributes of MscElements that are no more needed. This method should be called after finish of algorithm.

Implements Checker.

Definition at line 101 of file constraint_syntax.h.

virtual std::wstring ConstraintsChecker::get_help_filename ( ) const
inlinevirtual

Ralative path to a HTML file displayed as help.

Implements Checker.

Definition at line 91 of file constraint_syntax.h.

Checker::PreconditionList ConstraintsChecker::get_preconditions ( MscPtr  msc) const
inlinevirtual

Returns a list of preconditions for the check.

Implements Checker.

Definition at line 94 of file constraint_syntax.h.

References PrerequisiteCheck::PP_REQUIRED.

std::wstring ConstraintsChecker::get_property_name ( ) const
inlinevirtual

Human readable name of the property being checked.

Implements Checker.

Definition at line 83 of file constraint_syntax.h.

bool ConstraintsChecker::is_supported ( ChannelMapperPtr  chm)
inlinevirtual

Checks whether Checker supports given ChannelMapper.

Deafult behaviour is false for all mappers, but it is neccessary to check out this behaviour in individual checkers.

Implements Checker.

Definition at line 103 of file constraint_syntax.h.

void ConstraintsChecker::mark ( )
private

Definition at line 88 of file constraint_syntax.cpp.

References wrong_msc.

Referenced by check(), and mark().

void ConstraintsChecker::mark ( ReferenceNode n)
private
void ConstraintsChecker::mark ( Msc msc)
private

Definition at line 111 of file constraint_syntax.cpp.

References DFSHMscsTraverse::get_parents(), m_tra, and mark().

void ConstraintsChecker::on_new_inner_bmsc_found ( BMscPtr  bmsc,
ReferenceNode refNode 
)
virtual

Reimplemented from InnerBMscFoundListener.

Definition at line 23 of file constraint_syntax.cpp.

References BMscConstraintCheck::check_copy(), m_changed, and wrong_msc.

void ConstraintsChecker::on_new_inner_hmsc_found ( HMscPtr  hmsc,
ReferenceNode refNode 
)
virtual

Reimplemented from InnerHMscFoundListener.

Definition at line 34 of file constraint_syntax.cpp.

References HMscConstraintCheck::check_copy(), m_changed, and wrong_msc.

Member Data Documentation

bool ConstraintsChecker::m_changed
private

Definition at line 64 of file constraint_syntax.h.

Referenced by check(), on_new_inner_bmsc_found(), and on_new_inner_hmsc_found().

HMscPtr ConstraintsChecker::m_copy
private

Definition at line 60 of file constraint_syntax.h.

Referenced by check().

HMscPtr ConstraintsChecker::m_original
private

Definition at line 61 of file constraint_syntax.h.

Referenced by check().

DFSHMscsTraverse* ConstraintsChecker::m_tra
private

Definition at line 62 of file constraint_syntax.h.

Referenced by check(), and mark().

std::stack<Msc*> ConstraintsChecker::wrong_msc
private

Definition at line 65 of file constraint_syntax.h.

Referenced by mark(), on_new_inner_bmsc_found(), and on_new_inner_hmsc_found().


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