All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
GENAPI_NAMESPACE::CMathParser Class Reference

Expression parser and evaluator of CSwissKnife. More...

#include <MathParser.h>

Classes

struct  Operation
 

Public Member Functions

 CMathParser (void)
 
const char * Eval (double *result)
 
const char * Parse (const char *Formula, bool ConvertUpperCase)
 
 ~CMathParser ()
 

Public Attributes

CStrMapExtFunctions
 
PrmSrchFunc MoreParams
 
CStrMapParameters
 
void * ParamFuncParam
 

Private Types

typedef struct GENAPI_NAMESPACE::CMathParser::Operation Operation
 
enum  OperType_t {
  OP_SHL, OP_SHR, OP_POW, OP_LOGIC_NEQ,
  OP_LOGIC_GEQ, OP_LOGIC_LEQ, OP_LOGIC_AND, OP_LOGIC_OR,
  OP_COMSTART, OP_ASSIGN, OP_OBR, OP_ADD,
  OP_SUB, OP_MUL, OP_DIV, OP_MOD,
  OP_UNK, OP_XOR, OP_NOT, OP_AND,
  OP_OR, OP_EQU, OP_GREATER, OP_LESS,
  OP_LOGIC, OP_LOGIC_SEP, OP_CBR, OP_COMMA,
  OP_FORMULAEND, OP_INDEX_TO_VAR, OP_FUNC_ONEARG, OP_FUNC_MULTIARG
}
 

Private Member Functions

const char * Calc ()
 
const char * CalcToObr ()
 
const char * ParseFormula (bool ConvertUpperCase)
 
const char * PrepareFormula ()
 

Private Attributes

std::vector< char > errbuf
 
CLexer Lexer
 
int ObrDist
 
std::vector< OperationOpStack
 
std::vector< OperationOpStackEval
 
int OpTop
 
std::vector< double > ValStack
 
std::vector< double > ValStackEval
 
int ValTop
 
CStrMapVarParams
 

Static Private Attributes

static const Operation BrOp
 
static const Operation CbrOp
 
static const Operation CommaOp
 
static CStaticFuncMapDouble DoubleFunctions
 
static const Operation ItvOp
 
static CSymTable MathSymTable
 
static const Operation NegOp
 
static const signed char OpPriorities [OP_FUNC_MULTIARG+1]
 

Detailed Description

Expression parser and evaluator of CSwissKnife.

Definition at line 53 of file MathParser.h.

Member Typedef Documentation

◆ Operation

Member Enumeration Documentation

◆ OperType_t

Enumerator
OP_SHL 
OP_SHR 
OP_POW 
OP_LOGIC_NEQ 
OP_LOGIC_GEQ 
OP_LOGIC_LEQ 
OP_LOGIC_AND 
OP_LOGIC_OR 
OP_COMSTART 
OP_ASSIGN 
OP_OBR 
OP_ADD 
OP_SUB 
OP_MUL 
OP_DIV 
OP_MOD 
OP_UNK 
OP_XOR 
OP_NOT 
OP_AND 
OP_OR 
OP_EQU 
OP_GREATER 
OP_LESS 
OP_LOGIC 
OP_LOGIC_SEP 
OP_CBR 
OP_COMMA 
OP_FORMULAEND 
OP_INDEX_TO_VAR 
OP_FUNC_ONEARG 
OP_FUNC_MULTIARG 

Definition at line 55 of file MathParser.h.

Constructor & Destructor Documentation

◆ CMathParser()

GENAPI_NAMESPACE::CMathParser::CMathParser ( void  )

◆ ~CMathParser()

GENAPI_NAMESPACE::CMathParser::~CMathParser ( )

Member Function Documentation

◆ Calc()

const char* GENAPI_NAMESPACE::CMathParser::Calc ( )
private

◆ CalcToObr()

const char* GENAPI_NAMESPACE::CMathParser::CalcToObr ( )
private

◆ Eval()

const char* GENAPI_NAMESPACE::CMathParser::Eval ( double *  result)

◆ Parse()

const char* GENAPI_NAMESPACE::CMathParser::Parse ( const char *  Formula,
bool  ConvertUpperCase 
)

◆ ParseFormula()

const char* GENAPI_NAMESPACE::CMathParser::ParseFormula ( bool  ConvertUpperCase)
private

◆ PrepareFormula()

const char* GENAPI_NAMESPACE::CMathParser::PrepareFormula ( )
private

Member Data Documentation

◆ BrOp

const Operation GENAPI_NAMESPACE::CMathParser::BrOp
staticprivate

Definition at line 81 of file MathParser.h.

◆ CbrOp

const Operation GENAPI_NAMESPACE::CMathParser::CbrOp
staticprivate

Definition at line 82 of file MathParser.h.

◆ CommaOp

const Operation GENAPI_NAMESPACE::CMathParser::CommaOp
staticprivate

Definition at line 85 of file MathParser.h.

◆ DoubleFunctions

CStaticFuncMapDouble GENAPI_NAMESPACE::CMathParser::DoubleFunctions
staticprivate

Definition at line 95 of file MathParser.h.

◆ errbuf

std::vector<char> GENAPI_NAMESPACE::CMathParser::errbuf
private

Definition at line 94 of file MathParser.h.

◆ ExtFunctions

CStrMap* GENAPI_NAMESPACE::CMathParser::ExtFunctions

Definition at line 103 of file MathParser.h.

◆ ItvOp

const Operation GENAPI_NAMESPACE::CMathParser::ItvOp
staticprivate

Definition at line 84 of file MathParser.h.

◆ Lexer

CLexer GENAPI_NAMESPACE::CMathParser::Lexer
private

Definition at line 92 of file MathParser.h.

◆ MathSymTable

CSymTable GENAPI_NAMESPACE::CMathParser::MathSymTable
staticprivate

Definition at line 96 of file MathParser.h.

◆ MoreParams

PrmSrchFunc GENAPI_NAMESPACE::CMathParser::MoreParams

Definition at line 104 of file MathParser.h.

◆ NegOp

const Operation GENAPI_NAMESPACE::CMathParser::NegOp
staticprivate

Definition at line 83 of file MathParser.h.

◆ ObrDist

int GENAPI_NAMESPACE::CMathParser::ObrDist
private

Definition at line 91 of file MathParser.h.

◆ OpPriorities

const signed char GENAPI_NAMESPACE::CMathParser::OpPriorities[OP_FUNC_MULTIARG+1]
staticprivate

Definition at line 70 of file MathParser.h.

◆ OpStack

std::vector<Operation> GENAPI_NAMESPACE::CMathParser::OpStack
private

Definition at line 86 of file MathParser.h.

◆ OpStackEval

std::vector<Operation> GENAPI_NAMESPACE::CMathParser::OpStackEval
private

Definition at line 87 of file MathParser.h.

◆ OpTop

int GENAPI_NAMESPACE::CMathParser::OpTop
private

Definition at line 90 of file MathParser.h.

◆ Parameters

CStrMap* GENAPI_NAMESPACE::CMathParser::Parameters

Definition at line 102 of file MathParser.h.

◆ ParamFuncParam

void* GENAPI_NAMESPACE::CMathParser::ParamFuncParam

Definition at line 105 of file MathParser.h.

◆ ValStack

std::vector<double> GENAPI_NAMESPACE::CMathParser::ValStack
private

Definition at line 88 of file MathParser.h.

◆ ValStackEval

std::vector<double> GENAPI_NAMESPACE::CMathParser::ValStackEval
private

Definition at line 89 of file MathParser.h.

◆ ValTop

int GENAPI_NAMESPACE::CMathParser::ValTop
private

Definition at line 90 of file MathParser.h.

◆ VarParams

CStrMap* GENAPI_NAMESPACE::CMathParser::VarParams
private

Definition at line 93 of file MathParser.h.


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


rc_genicam_api
Author(s): Heiko Hirschmueller
autogenerated on Wed Dec 4 2024 03:10:13