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

Parser and evaluator for CIntSwissKnife. More...

#include <Int64MathParser.h>

Classes

struct  Operation
 

Public Member Functions

 CInt64MathParser (void)
 
const char * Eval (int64_t *result)
 
const char * Parse (const char *Formula, bool ConvertUpperCase)
 
 ~CInt64MathParser ()
 

Public Attributes

CStrMapExtFunctions
 
PrmSrchFunc MoreParams
 
CStrMapParameters
 
void * ParamFuncParam
 

Private Types

typedef char *(* MultiArgFunc) (int paramcnt, int64_t *args, CStrMap *strparams, int64_t *result)
 
typedef int64_t(* OneArgFunc) (int64_t arg)
 
typedef struct GENAPI_NAMESPACE::CInt64MathParser::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
}
 
typedef int(* PrmSrchFunc) (const char *str, size_t len, int64_t *value, void *param)
 

Private Member Functions

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

Private Attributes

std::vector< char > errbuf
 
CInt64Lexer Lexer
 
int ObrDist
 
std::vector< OperationOpStack
 
std::vector< OperationOpStackEval
 
int OpTop
 
std::vector< int64_tValStack
 
std::vector< int64_tValStackEval
 
int ValTop
 
CStrMapVarParams
 

Static Private Attributes

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

Detailed Description

Parser and evaluator for CIntSwissKnife.

Definition at line 54 of file Int64MathParser.h.

Member Typedef Documentation

◆ MultiArgFunc

typedef char*( * GENAPI_NAMESPACE::CInt64MathParser::MultiArgFunc) (int paramcnt, int64_t *args, CStrMap *strparams, int64_t *result)
private

Definition at line 57 of file Int64MathParser.h.

◆ OneArgFunc

typedef int64_t( * GENAPI_NAMESPACE::CInt64MathParser::OneArgFunc) (int64_t arg)
private

Definition at line 56 of file Int64MathParser.h.

◆ Operation

◆ PrmSrchFunc

typedef int( * GENAPI_NAMESPACE::CInt64MathParser::PrmSrchFunc) (const char *str, size_t len, int64_t *value, void *param)
private

Definition at line 59 of file Int64MathParser.h.

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 61 of file Int64MathParser.h.

Constructor & Destructor Documentation

◆ CInt64MathParser()

GENAPI_NAMESPACE::CInt64MathParser::CInt64MathParser ( void  )

◆ ~CInt64MathParser()

GENAPI_NAMESPACE::CInt64MathParser::~CInt64MathParser ( )

Member Function Documentation

◆ Calc()

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

◆ CalcToObr()

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

◆ Eval()

const char* GENAPI_NAMESPACE::CInt64MathParser::Eval ( int64_t result)

◆ Parse()

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

◆ ParseFormula()

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

◆ PrepareFormula()

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

Member Data Documentation

◆ BrOp

const Operation GENAPI_NAMESPACE::CInt64MathParser::BrOp
staticprivate

Definition at line 87 of file Int64MathParser.h.

◆ CbrOp

const Operation GENAPI_NAMESPACE::CInt64MathParser::CbrOp
staticprivate

Definition at line 88 of file Int64MathParser.h.

◆ CommaOp

const Operation GENAPI_NAMESPACE::CInt64MathParser::CommaOp
staticprivate

Definition at line 91 of file Int64MathParser.h.

◆ errbuf

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

Definition at line 102 of file Int64MathParser.h.

◆ ExtFunctions

CStrMap* GENAPI_NAMESPACE::CInt64MathParser::ExtFunctions

Definition at line 109 of file Int64MathParser.h.

◆ IntFunctions

CStaticFuncMapInt64 GENAPI_NAMESPACE::CInt64MathParser::IntFunctions
staticprivate

Definition at line 100 of file Int64MathParser.h.

◆ ItvOp

const Operation GENAPI_NAMESPACE::CInt64MathParser::ItvOp
staticprivate

Definition at line 90 of file Int64MathParser.h.

◆ Lexer

CInt64Lexer GENAPI_NAMESPACE::CInt64MathParser::Lexer
private

Definition at line 98 of file Int64MathParser.h.

◆ MathSymTable

CSymTable GENAPI_NAMESPACE::CInt64MathParser::MathSymTable
staticprivate

Definition at line 101 of file Int64MathParser.h.

◆ MoreParams

PrmSrchFunc GENAPI_NAMESPACE::CInt64MathParser::MoreParams

Definition at line 110 of file Int64MathParser.h.

◆ NegOp

const Operation GENAPI_NAMESPACE::CInt64MathParser::NegOp
staticprivate

Definition at line 89 of file Int64MathParser.h.

◆ ObrDist

int GENAPI_NAMESPACE::CInt64MathParser::ObrDist
private

Definition at line 97 of file Int64MathParser.h.

◆ OpPriorities

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

Definition at line 76 of file Int64MathParser.h.

◆ OpStack

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

Definition at line 92 of file Int64MathParser.h.

◆ OpStackEval

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

Definition at line 93 of file Int64MathParser.h.

◆ OpTop

int GENAPI_NAMESPACE::CInt64MathParser::OpTop
private

Definition at line 96 of file Int64MathParser.h.

◆ Parameters

CStrMap* GENAPI_NAMESPACE::CInt64MathParser::Parameters

Definition at line 108 of file Int64MathParser.h.

◆ ParamFuncParam

void* GENAPI_NAMESPACE::CInt64MathParser::ParamFuncParam

Definition at line 111 of file Int64MathParser.h.

◆ ValStack

std::vector<int64_t> GENAPI_NAMESPACE::CInt64MathParser::ValStack
private

Definition at line 94 of file Int64MathParser.h.

◆ ValStackEval

std::vector<int64_t> GENAPI_NAMESPACE::CInt64MathParser::ValStackEval
private

Definition at line 95 of file Int64MathParser.h.

◆ ValTop

int GENAPI_NAMESPACE::CInt64MathParser::ValTop
private

Definition at line 96 of file Int64MathParser.h.

◆ VarParams

CStrMap* GENAPI_NAMESPACE::CInt64MathParser::VarParams
private

Definition at line 99 of file Int64MathParser.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:12