The Gaudi Framework  master (37c0b60a)
concurrency::NodePropertiesValidator Class Reference

#include </builds/gaudi/Gaudi/GaudiHive/src/PRGraph/Visitors/Validators.h>

Inheritance diagram for concurrency::NodePropertiesValidator:
Collaboration diagram for concurrency::NodePropertiesValidator:

Public Member Functions

bool visitEnter (AlgorithmNode &) const override
 
bool visitEnter (DataNode &) const override
 
bool visitEnter (ConditionNode &) const override
 
bool visit (DecisionNode &) override
 
std::string reply () const
 
bool passed () const
 
void reset () override
 
virtual bool visit (DecisionNode &)
 
virtual bool visit (AlgorithmNode &)
 
virtual bool visit (DataNode &)
 
virtual bool visit (ConditionNode &)
 
virtual bool visitEnter (DecisionNode &) const
 
virtual bool visitEnter (AlgorithmNode &) const
 
virtual bool visitEnter (DataNode &) const
 
virtual bool visitEnter (ConditionNode &) const
 
- Public Member Functions inherited from concurrency::IGraphVisitor
virtual ~IGraphVisitor ()=default
 
virtual bool visitEnter (DecisionNode &) const
 
virtual bool visit (AlgorithmNode &)
 
virtual bool visit (DataNode &)
 
virtual bool visit (ConditionNode &)
 

Private Attributes

std::ostringstream m_status { " No 'Concurrent'/'Prompt' contradictions found" }
 
bool m_foundViolations { false }
 

Detailed Description

Definition at line 28 of file Validators.h.

Member Function Documentation

◆ passed()

bool concurrency::NodePropertiesValidator::passed ( ) const
inline

Definition at line 40 of file Validators.h.

40 { return !m_foundViolations; }

◆ reply()

std::string concurrency::NodePropertiesValidator::reply ( ) const
inline

Definition at line 39 of file Validators.h.

39 { return m_status.str(); }

◆ reset()

void concurrency::NodePropertiesValidator::reset ( )
inlineoverridevirtual

Reimplemented from concurrency::IGraphVisitor.

Definition at line 41 of file Validators.h.

41  {
42  m_foundViolations = false;
43  m_status.clear();
44  }

◆ visit() [1/5]

virtual bool concurrency::IGraphVisitor::visit
inline

Definition at line 29 of file IGraphVisitor.h.

29 { return true; }

◆ visit() [2/5]

virtual bool concurrency::IGraphVisitor::visit
inline

Definition at line 35 of file IGraphVisitor.h.

35 { return true; }

◆ visit() [3/5]

virtual bool concurrency::IGraphVisitor::visit
inline

Definition at line 32 of file IGraphVisitor.h.

32 { return true; }

◆ visit() [4/5]

virtual bool concurrency::IGraphVisitor::visit
inline

Definition at line 26 of file IGraphVisitor.h.

26 { return true; }

◆ visit() [5/5]

bool concurrency::NodePropertiesValidator::visit ( DecisionNode node)
overridevirtual

Reimplemented from concurrency::IGraphVisitor.

Definition at line 18 of file Validators.cpp.

18  {
19 
20  if ( node.m_modeConcurrent && node.m_modePromptDecision ) {
21 
22  if ( !m_foundViolations )
23  m_status
24  << " 'Concurrent'/'Prompt' contradiction(s) found. Settings are mutually exclusive within a task group. "
25  "Discarding 'Prompt' for ";
26 
27  m_status << ( m_foundViolations ? ", " : "" ) << node.name();
28 
29  if ( !m_foundViolations ) m_foundViolations = true;
30 
31  return false;
32  }
33 
34  return true;
35  }

◆ visitEnter() [1/7]

virtual bool concurrency::IGraphVisitor::visitEnter
inline

Definition at line 28 of file IGraphVisitor.h.

28 { return true; }

◆ visitEnter() [2/7]

bool concurrency::NodePropertiesValidator::visitEnter ( AlgorithmNode ) const
inlineoverridevirtual

Reimplemented from concurrency::IGraphVisitor.

Definition at line 33 of file Validators.h.

33 { return false; }

◆ visitEnter() [3/7]

virtual bool concurrency::IGraphVisitor::visitEnter
inline

Definition at line 34 of file IGraphVisitor.h.

34 { return true; }

◆ visitEnter() [4/7]

bool concurrency::NodePropertiesValidator::visitEnter ( ConditionNode ) const
inlineoverridevirtual

Reimplemented from concurrency::IGraphVisitor.

Definition at line 35 of file Validators.h.

35 { return false; }

◆ visitEnter() [5/7]

virtual bool concurrency::IGraphVisitor::visitEnter
inline

Definition at line 31 of file IGraphVisitor.h.

31 { return true; }

◆ visitEnter() [6/7]

bool concurrency::NodePropertiesValidator::visitEnter ( DataNode ) const
inlineoverridevirtual

Reimplemented from concurrency::IGraphVisitor.

Definition at line 34 of file Validators.h.

34 { return false; }

◆ visitEnter() [7/7]

virtual bool concurrency::IGraphVisitor::visitEnter
inline

Definition at line 25 of file IGraphVisitor.h.

25 { return true; }

Member Data Documentation

◆ m_foundViolations

bool concurrency::NodePropertiesValidator::m_foundViolations { false }
private

Definition at line 48 of file Validators.h.

◆ m_status

std::ostringstream concurrency::NodePropertiesValidator::m_status { " No 'Concurrent'/'Prompt' contradictions found" }
private

Definition at line 47 of file Validators.h.


The documentation for this class was generated from the following files:
concurrency::NodePropertiesValidator::m_status
std::ostringstream m_status
Definition: Validators.h:47
std::ostringstream::clear
T clear(T... args)
concurrency::NodePropertiesValidator::m_foundViolations
bool m_foundViolations
Definition: Validators.h:48
std::ostringstream::str
T str(T... args)