Classes | Public Member Functions | Public Attributes | Private Types | Private Member Functions | Private Attributes | Static Private Attributes
CInt64MathParser Class Reference

Parser and evaluator for CIntSwissKnife. More...

#include <Int64MathParser.h>

List of all members.

Classes

struct  Operation

Public Member Functions

 CInt64MathParser (void)
const char * Parse (const char *Formula, int64_t *result, 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)
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_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 (int64_t *result, bool ConvertUpperCase)
const char * PrepareFormula ()

Private Attributes

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

Static Private Attributes

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

Detailed Description

Parser and evaluator for CIntSwissKnife.

Definition at line 51 of file Int64MathParser.h.


Member Typedef Documentation

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

Definition at line 53 of file Int64MathParser.h.

typedef int64_t(* CInt64MathParser::OneArgFunc)(int64_t arg) [private]

Definition at line 52 of file Int64MathParser.h.

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

Definition at line 55 of file Int64MathParser.h.


Member Enumeration Documentation

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_FUNC_ONEARG 
OP_FUNC_MULTIARG 

Definition at line 57 of file Int64MathParser.h.


Constructor & Destructor Documentation


Member Function Documentation

const char* CInt64MathParser::Calc ( ) [private]
const char* CInt64MathParser::CalcToObr ( ) [private]
const char* CInt64MathParser::Parse ( const char *  Formula,
int64_t result,
bool  ConvertUpperCase 
)
const char* CInt64MathParser::ParseFormula ( int64_t result,
bool  ConvertUpperCase 
) [private]
const char* CInt64MathParser::PrepareFormula ( ) [private]

Member Data Documentation

const Operation CInt64MathParser::BrOp [static, private]

Definition at line 78 of file Int64MathParser.h.

std::vector<char> CInt64MathParser::errbuf [private]

Definition at line 88 of file Int64MathParser.h.

Definition at line 95 of file Int64MathParser.h.

Definition at line 86 of file Int64MathParser.h.

Definition at line 84 of file Int64MathParser.h.

Definition at line 87 of file Int64MathParser.h.

Definition at line 96 of file Int64MathParser.h.

const Operation CInt64MathParser::NegOp [static, private]

Definition at line 79 of file Int64MathParser.h.

Definition at line 83 of file Int64MathParser.h.

const char CInt64MathParser::OpPriorities[OP_FUNC_MULTIARG+1] [static, private]

Definition at line 71 of file Int64MathParser.h.

std::vector<Operation> CInt64MathParser::OpStack [private]

Definition at line 80 of file Int64MathParser.h.

int CInt64MathParser::OpTop [private]

Definition at line 82 of file Int64MathParser.h.

Definition at line 94 of file Int64MathParser.h.

Definition at line 97 of file Int64MathParser.h.

std::vector<int64_t> CInt64MathParser::ValStack [private]

Definition at line 81 of file Int64MathParser.h.

int CInt64MathParser::ValTop [private]

Definition at line 82 of file Int64MathParser.h.

Definition at line 85 of file Int64MathParser.h.


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


rc_visard_driver
Author(s): Heiko Hirschmueller , Christian Emmerich , Felix Ruess
autogenerated on Thu Jun 6 2019 20:43:10