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

UnaryExpressionNode Node class with a single expression node as child. More...

#include <CutNodes.h>

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

Public Types

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

Public Member Functions

AVariableManager::VarVariant evaluate (const Object *p) const override
 Evaluation of the child nodes and return result as a variant<double, int, bool> return negative result if m_unary_minus true. More...
 
void print () const override
 Print node.
 
std::string decompile () const override
 Decompile Node back to a string. More...
 
 ~UnaryExpressionNode ()
 Destructor.
 

Private Types

typedef AbstractExpressionNode< AVariableManager >::Object Object
 Template argument dependent Particle type definition.
 

Private Member Functions

 UnaryExpressionNode (Nodetuple node, bool unary_minus, bool parenthesized)
 Constructor. More...
 

Private Attributes

std::unique_ptr< const AbstractExpressionNode< AVariableManager > > m_enode
 pointer to single expression node
 
const bool m_unary_minus
 flag if expression evaluation should be returned times -1
 
const bool m_parenthesized
 flag if expression in cut was in parenthesis
 

Friends

class NodeFactory
 

Detailed Description

template<class AVariableManager>
class Belle2::UnaryExpressionNode< AVariableManager >

UnaryExpressionNode Node class with a single expression node as child.

Used for unary minus signs and parenthesis conservation on decompiling cuts.

Definition at line 653 of file CutNodes.h.

Constructor & Destructor Documentation

◆ UnaryExpressionNode()

UnaryExpressionNode ( Nodetuple  node,
bool  unary_minus,
bool  parenthesized 
)
inlineexplicitprivate

Constructor.

Parameters
node(const boost::python::tuple&): tuple containing an expression node
unary_minus(bool): flag indicating if evaluate result should be multiplied by -1
parenthesized(bool): flag indicating if expression in cut was in parenthesis

Definition at line 711 of file CutNodes.h.

Member Function Documentation

◆ decompile()

std::string decompile ( ) const
inlineoverridevirtual

Decompile Node back to a string.

decompile(compile) should give the same result.

Implements AbstractExpressionNode< AVariableManager >.

Definition at line 689 of file CutNodes.h.

◆ evaluate()

AVariableManager::VarVariant evaluate ( const Object p) const
inlineoverridevirtual

Evaluation of the child nodes and return result as a variant<double, int, bool> return negative result if m_unary_minus true.

Parameters
ppointer to the object, that should be checked.

Implements AbstractExpressionNode< AVariableManager >.

Definition at line 664 of file CutNodes.h.


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