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

#include <text_eval_parser.h>

Public Types

using VAR_CALLBACK = EVAL_VISITOR::VAR_CALLBACK
 

Static Public Member Functions

static std::pair< std::string, bool > Process (const DOC &aDoc, VAR_CALLBACK aVariableCallback)
 Process document using callback for variable resolution.
 
static std::tuple< std::string, std::vector< std::string >, bool > ProcessWithDetails (const DOC &aDoc, VAR_CALLBACK aCallback)
 Process document with detailed error reporting.
 

Detailed Description

Definition at line 454 of file text_eval_parser.h.

Member Typedef Documentation

◆ VAR_CALLBACK

Member Function Documentation

◆ Process()

std::pair< std::string, bool > calc_parser::DOC_PROCESSOR::Process ( const DOC & aDoc,
VAR_CALLBACK aVariableCallback )
static

Process document using callback for variable resolution.

Parameters
aDocDocument to process
aVariableCallbackFunction to resolve variables
Returns
Pair of (result_string, had_errors)

Definition at line 1128 of file text_eval_parser.cpp.

References calc_parser::Calc, calc_parser::DOC::GetNodes(), calc_parser::RESULT< T >::GetValue(), calc_parser::DOC::HasErrors(), calc_parser::ERROR_COLLECTOR::HasErrors(), result, calc_parser::Text, and calc_parser::VALUE_UTILS::ToString().

Referenced by BOOST_AUTO_TEST_CASE(), EXPRESSION_EVALUATOR::evaluateWithFullParser(), and ProcessWithDetails().

◆ ProcessWithDetails()

std::tuple< std::string, std::vector< std::string >, bool > calc_parser::DOC_PROCESSOR::ProcessWithDetails ( const DOC & aDoc,
VAR_CALLBACK aCallback )
static

Process document with detailed error reporting.

Parameters
aDocDocument to process
aCallbackFunction to resolve variables
Returns
Tuple of (result_string, error_messages, had_errors)

Definition at line 1173 of file text_eval_parser.cpp.

References calc_parser::DOC::GetErrors(), Process(), and result.


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