Geant4 11.2.2
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
Evaluator.cc File Reference
#include "CLHEP/Evaluator/Evaluator.h"
#include <iostream>
#include <sstream>
#include <string>
#include <cmath>
#include <stack>
#include <unordered_map>
#include <string.h>
#include <ctype.h>
#include <errno.h>
#include <stdlib.h>

Go to the source code of this file.

Classes

struct  Item
 
struct  Struct
 

Namespaces

namespace  HepTool
 

Macros

#define EVAL   HepTool::Evaluator
 
#define REMOVE_BLANKS
 
#define SKIP_BLANKS
 
#define EVAL_EXIT(STATUS, POSITION)
 
#define MAX_N_PAR   5
 

Typedefs

typedef void(* voidfuncptr) ()
 
using pchar = char *
 
using dic_type = std::unordered_map<string, Item>
 

Enumerations

enum  {
  ENDL , LBRA , OR , AND ,
  EQ , NE , GE , GT ,
  LE , LT , PLUS , MINUS ,
  UNARY_PLUS , UNARY_MINUS , MULT , DIV ,
  POW , RBRA , VALUE
}
 

Macro Definition Documentation

◆ EVAL

#define EVAL   HepTool::Evaluator

Definition at line 51 of file Evaluator.cc.

◆ EVAL_EXIT

#define EVAL_EXIT ( STATUS,
POSITION )
Value:
endp = POSITION; return STATUS
struct position POSITION

Definition at line 63 of file Evaluator.cc.

◆ MAX_N_PAR

#define MAX_N_PAR   5

◆ REMOVE_BLANKS

#define REMOVE_BLANKS
Value:
for(pointer=name;;pointer++) if (!isspace(*pointer)) break; \
for(n=(int)strlen(pointer);n>0;n--) if (!isspace(*(pointer+n-1))) break

Definition at line 53 of file Evaluator.cc.

53#define REMOVE_BLANKS \
54for(pointer=name;;pointer++) if (!isspace(*pointer)) break; \
55for(n=(int)strlen(pointer);n>0;n--) if (!isspace(*(pointer+n-1))) break

Referenced by HepTool::Evaluator::findFunction(), HepTool::Evaluator::findVariable(), HepTool::Evaluator::removeFunction(), and HepTool::Evaluator::removeVariable().

◆ SKIP_BLANKS

#define SKIP_BLANKS
Value:
for(;;pointer++) { \
c = (pointer > end) ? '\0' : *pointer; \
if (!isspace(c)) break; \
}

Definition at line 57 of file Evaluator.cc.

57#define SKIP_BLANKS \
58for(;;pointer++) { \
59 c = (pointer > end) ? '\0' : *pointer; \
60 if (!isspace(c)) break; \
61}

Typedef Documentation

◆ dic_type

using dic_type = std::unordered_map<string, Item>

Definition at line 40 of file Evaluator.cc.

◆ pchar

using pchar = char *

Definition at line 39 of file Evaluator.cc.

◆ voidfuncptr

typedef void(* voidfuncptr) ()

Definition at line 23 of file Evaluator.cc.

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
ENDL 
LBRA 
OR 
AND 
EQ 
NE 
GE 
GT 
LE 
LT 
PLUS 
MINUS 
UNARY_PLUS 
UNARY_MINUS 
MULT 
DIV 
POW 
RBRA 
VALUE 

Definition at line 68 of file Evaluator.cc.

68 { ENDL, LBRA, OR, AND, EQ, NE, GE, GT, LE, LT,
@ RBRA
Definition Evaluator.cc:69
@ LBRA
Definition Evaluator.cc:68
@ GT
Definition Evaluator.cc:68
@ MULT
Definition Evaluator.cc:69
@ ENDL
Definition Evaluator.cc:68
@ POW
Definition Evaluator.cc:69
@ UNARY_MINUS
Definition Evaluator.cc:69
@ LT
Definition Evaluator.cc:68
@ NE
Definition Evaluator.cc:68
@ GE
Definition Evaluator.cc:68
@ UNARY_PLUS
Definition Evaluator.cc:69
@ LE
Definition Evaluator.cc:68
@ DIV
Definition Evaluator.cc:69
@ AND
Definition Evaluator.cc:68
@ PLUS
Definition Evaluator.cc:69
@ OR
Definition Evaluator.cc:68
@ EQ
Definition Evaluator.cc:68
@ VALUE
Definition Evaluator.cc:69
@ MINUS
Definition Evaluator.cc:69