KiCad PCB EDA Suite
Loading...
Searching...
No Matches
calc_parser::EVAL_VISITOR Class Reference

#include <text_eval_parser.h>

Public Types

using VAR_CALLBACK = std::function<RESULT<VALUE>(const std::string& aVariableName)>
 

Public Member Functions

 EVAL_VISITOR (VAR_CALLBACK aVariableCallback, ERROR_COLLECTOR &aErrorCollector)
 Construct evaluator with variable callback function.
 
RESULT< VALUE > operator() (const NODE &aNode) const
 

Private Member Functions

RESULT< VALUE > evaluateFunction (const FUNC_DATA &aFunc) const
 

Private Attributes

VAR_CALLBACK m_variableCallback
 
ERROR_COLLECTOR & m_errors
 
std::random_device m_rd
 
std::mt19937 m_gen
 

Detailed Description

Definition at line 426 of file text_eval_parser.h.

Member Typedef Documentation

◆ VAR_CALLBACK

using calc_parser::EVAL_VISITOR::VAR_CALLBACK = std::function<RESULT<VALUE>(const std::string& aVariableName)>

Definition at line 430 of file text_eval_parser.h.

Constructor & Destructor Documentation

◆ EVAL_VISITOR()

calc_parser::EVAL_VISITOR::EVAL_VISITOR ( VAR_CALLBACK aVariableCallback,
ERROR_COLLECTOR & aErrorCollector )
explicit

Construct evaluator with variable callback function.

Parameters
aVariableCallbackFunction to call when resolving variables
aErrorCollectorError collector for storing errors

Definition at line 523 of file text_eval_parser.cpp.

References m_errors, m_gen, m_rd, m_variableCallback, and move.

Member Function Documentation

◆ evaluateFunction()

◆ operator()()

Member Data Documentation

◆ m_errors

ERROR_COLLECTOR& calc_parser::EVAL_VISITOR::m_errors
private

Definition at line 448 of file text_eval_parser.h.

Referenced by EVAL_VISITOR().

◆ m_gen

std::mt19937 calc_parser::EVAL_VISITOR::m_gen
mutableprivate

Definition at line 450 of file text_eval_parser.h.

Referenced by EVAL_VISITOR(), and evaluateFunction().

◆ m_rd

std::random_device calc_parser::EVAL_VISITOR::m_rd
mutableprivate

Definition at line 449 of file text_eval_parser.h.

Referenced by EVAL_VISITOR().

◆ m_variableCallback

VAR_CALLBACK calc_parser::EVAL_VISITOR::m_variableCallback
private

Definition at line 447 of file text_eval_parser.h.

Referenced by EVAL_VISITOR(), and operator()().


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