Belle II Software  release-08-01-10
UnaryBooleanNode< AVariableManager > Class Template Reference

Nodeclass with a single AbstractBooleanNode as child. More...

#include <CutNodes.h>

Inheritance diagram for UnaryBooleanNode< AVariableManager >:
Collaboration diagram for UnaryBooleanNode< AVariableManager >:

Public Types

typedef AVariableManager::Var Var
 Template argument dependent Variable type definition.
 

Public Member Functions

bool check (const Object *p) const override
 Check if Object passes this subexpression of the cut by calling check on the child node. More...
 
void print () const override
 Print node brackets and negation keywords are added if m_bracketized, m_negation are set to true.
 
std::string decompile () const override
 Decompile Node back to a string. More...
 
 ~UnaryBooleanNode ()
 Destructor.
 

Private Types

typedef AVariableManager::Object Object
 Template argument dependent Particle type definition.
 

Private Member Functions

 UnaryBooleanNode (Nodetuple node, bool negation, bool bracketized)
 

Private Attributes

std::unique_ptr< const AbstractBooleanNode< AVariableManager > > m_bnode
 boolean subexpression of a cut
 
const bool m_negation
 if the evaluation of m_bnode->check(p) should be negated in check()
 
const bool m_bracketized
 if the boolean expression from which this node is compiled was in brackets, relevant in decompile to yield the original string
 

Friends

class NodeFactory
 

Detailed Description

template<class AVariableManager>
class Belle2::UnaryBooleanNode< AVariableManager >

Nodeclass with a single AbstractBooleanNode as child.

Class for constructing Node objects of boost::python::tuple NodeFactory is a friend to all Node classes, in order to use their private Constructor.

check() returns the negated result of the child node if m_negation is true.

Definition at line 198 of file CutNodes.h.

Constructor & Destructor Documentation

◆ UnaryBooleanNode()

UnaryBooleanNode ( Nodetuple  node,
bool  negation,
bool  bracketized 
)
inlineexplicitprivate
Parameters
node(const boost::python::tuple&) tuple containing a boolean node
negation(bool): flag if check output of m_bnode should be returned negated
bracketized(bool): flag if cut substring was in brackets, used for preserving brackets when decompling to a string.

Definition at line 255 of file CutNodes.h.

256  : m_bnode{NodeFactory::compile_boolean_node<AVariableManager>(node)}, m_negation{negation}, m_bracketized{bracketized}
257  {
258  }
const bool m_bracketized
if the boolean expression from which this node is compiled was in brackets, relevant in decompile to ...
Definition: CutNodes.h:263
const bool m_negation
if the evaluation of m_bnode->check(p) should be negated in check()
Definition: CutNodes.h:261
std::unique_ptr< const AbstractBooleanNode< AVariableManager > > m_bnode
boolean subexpression of a cut
Definition: CutNodes.h:260

Member Function Documentation

◆ check()

bool check ( const Object p) const
inlineoverridevirtual

Check if Object passes this subexpression of the cut by calling check on the child node.

Parameters
ppointer to the object, that should be checked.

Implements AbstractBooleanNode< AVariableManager >.

Definition at line 208 of file CutNodes.h.

◆ decompile()

std::string decompile ( ) const
inlineoverridevirtual

Decompile Node back to a string.

Decompile(compile) should give the same result. brackets and negation keywords are added if m_bracketized, m_negation are set to true.

Implements AbstractBooleanNode< AVariableManager >.

Definition at line 232 of file CutNodes.h.


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