home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Frozen Fish 1: Amiga
/
FrozenFish-Apr94.iso
/
bbs
/
oct93
/
graphics
/
graphtal.lha
/
Graphtal
/
ExprItems.h
< prev
next >
Wrap
C/C++ Source or Header
|
1992-11-20
|
8KB
|
443 lines
/*
* ExprItems.h - class definitions for ExprItem's.
*
* Copyright (C) 1992, Christoph Streit (streit@iam.unibe.ch)
* University of Berne, Switzerland
* All rights reserved.
*
* This software may be freely copied, modified, and redistributed
* provided that this copyright notice is preserved on all copies.
*
* You may not distribute this software, in whole or in part, as part of
* any commercial product without the express consent of the authors.
*
* There is no warranty or other guarantee of fitness of this software
* for any purpose. It is provided solely "as is".
*
*/
#ifndef ExprItems_H
# define ExprItems_H
#include <math.h>
#include "mathutilities.h"
#include "Expression.h"
#include "Name.h"
//___________________________________________________________ Variable
class Variable : public ExprItem
{
public:
Variable(const Name&, Value*);
~Variable();
void process(ValueStack*);
void print(ValueStack*);
int params();
ExprItem* copy();
private:
Value *theValue;
Name varname; // we need the name for the print function
};
//___________________________________________________________ Uminus
// unary minus
class Uminus : public ExprItem
{
public:
Uminus();
~Uminus();
void process(ValueStack*);
void print(ValueStack*);
int params();
ExprItem* copy();
};
//___________________________________________________________ Not
class Not : public ExprItem
{
public:
Not();
~Not();
void process(ValueStack*);
void print(ValueStack*);
int params();
ExprItem* copy();
};
//___________________________________________________________ Or
class Or : public ExprItem
{
public:
Or();
~Or();
void process(ValueStack*);
void print(ValueStack*);
int params();
ExprItem* copy();
};
//___________________________________________________________ And
class And : public ExprItem
{
public:
And();
~And();
void process(ValueStack*);
void print(ValueStack*);
int params();
ExprItem* copy();
};
//___________________________________________________________ Neq
class Neq : public ExprItem
{
public:
Neq();
~Neq();
void process(ValueStack*);
void print(ValueStack*);
int params();
ExprItem* copy();
};
//___________________________________________________________ Eq
class Eq : public ExprItem
{
public:
Eq();
~Eq();
void process(ValueStack*);
void print(ValueStack*);
int params();
ExprItem* copy();
};
//___________________________________________________________ Lt
class Lt : public ExprItem
{
public:
Lt();
~Lt();
void process(ValueStack*);
void print(ValueStack*);
int params();
ExprItem* copy();
};
//___________________________________________________________ Leq
class Leq : public ExprItem
{
public:
Leq();
~Leq();
void process(ValueStack*);
void print(ValueStack*);
int params();
ExprItem* copy();
};
//___________________________________________________________ Gt
class Gt : public ExprItem
{
public:
Gt();
~Gt();
void process(ValueStack*);
void print(ValueStack*);
int params();
ExprItem* copy();
};
//___________________________________________________________ Geq
class Geq : public ExprItem
{
public:
Geq();
~Geq();
void process(ValueStack*);
void print(ValueStack*);
int params();
ExprItem* copy();
};
//___________________________________________________________ Add
class Add : public ExprItem
{
public:
Add();
~Add();
void process(ValueStack*);
void print(ValueStack*);
int params();
ExprItem* copy();
};
//___________________________________________________________ Sub
class Sub : public ExprItem
{
public:
Sub();
~Sub();
void process(ValueStack*);
void print(ValueStack*);
int params();
ExprItem* copy();
};
//___________________________________________________________ Mul
class Mul : public ExprItem
{
public:
Mul();
~Mul();
void process(ValueStack*);
void print(ValueStack*);
int params();
ExprItem* copy();
};
//___________________________________________________________ Div
class Div : public ExprItem
{
public:
Div();
~Div();
void process(ValueStack*);
void print(ValueStack*);
int params();
ExprItem* copy();
};
//___________________________________________________________ Mod
class Mod : public ExprItem
{
public:
Mod();
~Mod();
void process(ValueStack*);
void print(ValueStack*);
int params();
ExprItem* copy();
};
//___________________________________________________________ Sin
class Sin : public ExprItem
{
public:
Sin();
~Sin();
void process(ValueStack*);
void print(ValueStack*);
int params();
ExprItem* copy();
};
//___________________________________________________________ Cos
class Cos : public ExprItem
{
public:
Cos();
~Cos();
void process(ValueStack*);
void print(ValueStack*);
int params();
ExprItem* copy();
};
//___________________________________________________________ Tan
class Tan : public ExprItem
{
public:
Tan();
~Tan();
void process(ValueStack*);
void print(ValueStack*);
int params();
ExprItem* copy();
};
//___________________________________________________________ Asin
class Asin : public ExprItem
{
public:
Asin();
~Asin();
void process(ValueStack*);
void print(ValueStack*);
int params();
ExprItem* copy();
};
//___________________________________________________________ Acos
class Acos : public ExprItem
{
public:
Acos();
~Acos();
void process(ValueStack*);
void print(ValueStack*);
int params();
ExprItem* copy();
};
//___________________________________________________________ Atan
class Atan : public ExprItem
{
public:
Atan();
~Atan();
void process(ValueStack*);
void print(ValueStack*);
int params();
ExprItem* copy();
};
//___________________________________________________________ Abs
class Abs : public ExprItem
{
public:
Abs();
~Abs();
void process(ValueStack*);
void print(ValueStack*);
int params();
ExprItem* copy();
};
//___________________________________________________________ Sqrt
class Sqrt : public ExprItem
{
public:
Sqrt();
~Sqrt();
void process(ValueStack*);
void print(ValueStack*);
int params();
ExprItem* copy();
};
//___________________________________________________________ Pow
class Pow : public ExprItem
{
public:
Pow();
~Pow();
void process(ValueStack*);
void print(ValueStack*);
int params();
ExprItem* copy();
};
//___________________________________________________________ Exp
class Exp : public ExprItem
{
public:
Exp();
~Exp();
void process(ValueStack*);
void print(ValueStack*);
int params();
ExprItem* copy();
};
//___________________________________________________________ Log
class Log : public ExprItem
{
public:
Log();
~Log();
void process(ValueStack*);
void print(ValueStack*);
int params();
ExprItem* copy();
};
//___________________________________________________________ Log10
class Log10 : public ExprItem
{
public:
Log10();
~Log10();
void process(ValueStack*);
void print(ValueStack*);
int params();
ExprItem* copy();
};
//___________________________________________________________ Rand
class Rand : public ExprItem
{
public:
Rand();
~Rand();
void process(ValueStack*);
void print(ValueStack*);
int params();
ExprItem* copy();
};
//___________________________________________________________ Gauss
class Gauss : public ExprItem
{
public:
Gauss();
~Gauss();
void process(ValueStack*);
void print(ValueStack*);
int params();
ExprItem* copy();
private:
int Nrand;
real GaussAdd, GaussFac;
};
//___________________________________________________________ If
class If : public ExprItem
{
public:
If();
~If();
void process(ValueStack*);
void print(ValueStack*);
int params();
ExprItem* copy();
};
class Discrete;
#endif // ExprItems_H