src/thirdparty/mathexpr/mathexpr.h File Reference

#include <string.h>
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <float.h>

Include dependency graph for mathexpr.h:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  RVar
class  ROperation
class  RFunction

Defines

#define atanl   atan
#define asinl   asin
#define acosl   acos
#define expl   exp
#define logl   log
#define powl   pow
#define pow10l(x)   pow(10,x)
#define fabsl   fabs
#define cosl   cos
#define sinl   sin
#define tanl   tan
#define fmodl   fmod
#define sqrtl   sqrt

Typedefs

typedef RVarPRVar
typedef ROperationPROperation
typedef RFunctionPRFunction

Enumerations

enum  ROperator {
  ErrOp, Juxt, Num, Var,
  Add, Sub, Opp, Mult,
  Div, Pow, Sqrt, NthRoot,
  Abs, Sin, Cos, Tg,
  Ln, Exp, Acos, Asin,
  Atan, E10, Fun
}

Functions

typedef void ((*pfoncld)(float *&))
char * MidStr (const char *s, int i1, int i2)
char * CopyStr (const char *s)
char * InsStr (const char *s, int n, char c)
signed char EqStr (const char *s, const char *s2)
signed char CompStr (const char *s, int n, const char *s2)
char * DelStr (const char *s, int n)

Variables

const float ErrVal = DBL_MAX


Define Documentation

#define acosl   acos

Definition at line 34 of file mathexpr.h.

#define asinl   asin

Definition at line 33 of file mathexpr.h.

#define atanl   atan

Definition at line 32 of file mathexpr.h.

#define cosl   cos

Definition at line 40 of file mathexpr.h.

#define expl   exp

Definition at line 35 of file mathexpr.h.

#define fabsl   fabs

Definition at line 39 of file mathexpr.h.

#define fmodl   fmod

Definition at line 43 of file mathexpr.h.

#define logl   log

Definition at line 36 of file mathexpr.h.

#define pow10l ( x   )     pow(10,x)

Definition at line 38 of file mathexpr.h.

#define powl   pow

Definition at line 37 of file mathexpr.h.

#define sinl   sin

Definition at line 41 of file mathexpr.h.

#define sqrtl   sqrt

Definition at line 44 of file mathexpr.h.

#define tanl   tan

Definition at line 42 of file mathexpr.h.


Typedef Documentation

typedef RFunction* PRFunction

Definition at line 72 of file mathexpr.h.

typedef ROperation* PROperation

Definition at line 70 of file mathexpr.h.

typedef RVar* PRVar

Definition at line 63 of file mathexpr.h.


Enumeration Type Documentation

enum ROperator

Enumerator:
ErrOp 
Juxt 
Num 
Var 
Add 
Sub 
Opp 
Mult 
Div 
Pow 
Sqrt 
NthRoot 
Abs 
Sin 
Cos 
Tg 
Ln 
Exp 
Acos 
Asin 
Atan 
E10 
Fun 

Definition at line 65 of file mathexpr.h.


Function Documentation

signed char CompStr ( const char *  s,
int  n,
const char *  s2 
)

Definition at line 59 of file mathexpr.cpp.

00060 {if(n<0||n>=(int)strlen(s)||n+(int)strlen(s2)>(int)strlen(s))return 0;
00061     int i;
00062     for(i=0;s2[i];i++)if(s[i+n]!=s2[i])return 0;
00063     return 1;
00064 }

char* CopyStr ( const char *  s  ) 

Definition at line 38 of file mathexpr.cpp.

00039 {char*s1=new char[strlen(s)+1];char*s12=s1;const char*s2=s;
00040     while((*s12++=*s2++));return s1;}

char* DelStr ( const char *  s,
int  n 
)

signed char EqStr ( const char *  s,
const char *  s2 
)

Definition at line 52 of file mathexpr.cpp.

00053 {if(strlen(s)!=strlen(s2))return 0;
00054     int i;
00055     for(i=0;s[i];i++)if(s[i]!=s2[i])return 0;
00056     return 1;
00057 }

char* InsStr ( const char *  s,
int  n,
char  c 
)

char* MidStr ( const char *  s,
int  i1,
int  i2 
)

Definition at line 25 of file mathexpr.cpp.

00026 {
00027     if(i1<0||i2>=(int)strlen(s)||i1>i2){
00028         char* cp = new char[1];
00029         cp[0] = '\0';
00030         return cp;
00031     }
00032     char*s1=new char[i2-i1+2];
00033     int i;
00034     for(i=i1;i<=i2;i++)s1[i-i1]=s[i];
00035     s1[i2-i1+1]=0;return s1;
00036 }

typedef void ( (*)(float *&)  pfoncld  ) 

Referenced by Init_armagetronad(), gCycle::Render(), and yyparse().

Here is the caller graph for this function:


Variable Documentation

const float ErrVal = DBL_MAX

Definition at line 50 of file mathexpr.h.

Referenced by Absolu(), Addition(), ApplyOperator(), ArcCosinus(), ArcSinus(), ArcTangente(), ArcTangente2(), Argument(), BCDouble(), BCFun(), BCSimple(), COperation::BuildCode(), ROperation::BuildCode(), CFunction::CFunction(), Conjugue(), COperation::COperation(), Cosinus(), COperation::Diff(), ROperation::Diff(), COperation::DiffConj(), Division(), Exponentielle(), FonctionError(), Imaginaire(), Logarithme(), Multiplication(), COperation::NthMember(), ROperation::NthMember(), operator/(), Oppose(), Puiss10(), Puissance(), Racine(), RacineN(), Reelle(), RFunction::RFunction(), ROperation::ROperation(), Sinus(), Soustraction(), Tangente(), CFunction::Val(), and RFunction::Val().


Generated on Sat Mar 15 23:09:14 2008 for Armagetron Advanced by  doxygen 1.5.4