7 #ifndef CAFU_MATSYS_EXPRESSION_HPP_INCLUDED
8 #define CAFU_MATSYS_EXPRESSION_HPP_INCLUDED
11 #include "Templates/Array.hpp"
35 TableT() : ColumnSnap(false), ColumnClamp(false) { }
38 float Lookup(
float x)
const;
50 enum TypeT { FloatNumber, IntNumber, SymbolTime, SymbolALRed, SymbolALGreen, SymbolALBlue, TableLookup,
51 CastInt, Add, Sub, Mul, Div, GENERIC_FLOAT_START=0x10000, GENERIC_INT_START=0x20000 };
74 float AmbientLightColor[3];
113 float FloatNumberValue;
ResultT(float Value)
Constructor.
Definition: Expression.hpp:60
~ExpressionT()
Destructor (Law of the Big Three).
Definition: Expression.cpp:255
TypeT Type
The type of the result, can only be FloatNumber or IntNumber.
Definition: Expression.hpp:56
int ValueInt
If Type==IntNumber, this is the value of the result. Otherwise it is undefined.
Definition: Expression.hpp:58
float Lookup(float x) const
Looks up the table value at x.
Definition: Expression.cpp:17
TypeT
The type of the expression.
Definition: Expression.hpp:50
ExpressionT(float FloatNumberValue_=0.0)
Constructor.
Definition: Expression.cpp:88
Definition: Expression.hpp:17
A helper structure for returning both the type and the value of an expression.
Definition: Expression.hpp:54
ResultT(int Value)
Constructor.
Definition: Expression.hpp:61
A typed expression class.
Definition: Expression.hpp:43
ExpressionT & operator=(const ExpressionT &Source)
Assignment Operator (Law of the Big Three).
Definition: Expression.cpp:264
float ValueFloat
If Type==FloatNumber, this is the value of the result. Otherwise it is undefined. ...
Definition: Expression.hpp:57
ArrayT< int > GenInt
Generic / general purpose int variables/symbols.
Definition: Expression.hpp:76
ArrayT< float > GenFloat
Generic / general purpose float variables/symbols.
Definition: Expression.hpp:75
This structure contains the values for the "variables" of an expression.
Definition: Expression.hpp:69
ResultT Evaluate(const SymbolsT &Symbols) const
Evaluates this expression and returns the result.
Definition: Expression.cpp:319
std::string GetString() const
Returns a string description of this ExpressionT.
Definition: Expression.cpp:283
Definition: Expression.hpp:21
TableT()
Constructor.
Definition: Expression.hpp:35
This is a class for parsing text.
Definition: TextParser.hpp:21