Planeshift
|
#include <fparser.h>
Classes | |
class | FunctionWrapper |
Public Types | |
typedef Value_t(* | FunctionPtr )(const Value_t *) |
enum | ParseErrorType { SYNTAX_ERROR = 0, MISM_PARENTH, MISSING_PARENTH, EMPTY_PARENTH, EXPECT_OPERATOR, OUT_OF_MEMORY, UNEXPECTED_ERROR, INVALID_VARS, ILL_PARAMS_AMOUNT, PREMATURE_EOS, EXPECT_PARENTH_FUNC, UNKNOWN_IDENTIFIER, NO_FUNCTION_PARSED_YET, FP_NO_ERROR } |
typedef Value_t | value_type |
Public Member Functions | |
bool | AddConstant (const std::string &name, Value_t value) |
bool | AddFunction (const std::string &name, FunctionPtr, unsigned paramsAmount) |
bool | AddFunction (const std::string &name, FunctionParserBase &) |
template<typename DerivedWrapper > | |
bool | AddFunctionWrapper (const std::string &name, const DerivedWrapper &, unsigned paramsAmount) |
bool | AddUnit (const std::string &name, Value_t value) |
const char * | ErrorMsg () const |
Value_t | Eval (const Value_t *Vars) |
int | EvalError () const |
void | ForceDeepCopy () |
FunctionParserBase () | |
FunctionParserBase (const FunctionParserBase &) | |
FunctionWrapper * | GetFunctionWrapper (const std::string &name) |
ParseErrorType | GetParseErrorType () const |
FunctionParserBase & | operator= (const FunctionParserBase &) |
void | Optimize () |
int | Parse (const std::string &Function, const std::string &Vars, bool useDegrees=false) |
int | Parse (const char *Function, const std::string &Vars, bool useDegrees=false) |
int | ParseAndDeduceVariables (const std::string &function, int *amountOfVariablesFound=0, bool useDegrees=false) |
int | ParseAndDeduceVariables (const std::string &function, std::vector< std::string > &resultVars, bool useDegrees=false) |
int | ParseAndDeduceVariables (const std::string &function, std::string &resultVarString, int *amountOfVariablesFound=0, bool useDegrees=false) |
bool | RemoveIdentifier (const std::string &name) |
void | setDelimiterChar (char) |
~FunctionParserBase () | |
Static Public Member Functions | |
static Value_t | epsilon () |
static void | setEpsilon (Value_t) |
Protected Member Functions | |
Data * | getParserData () |
Static Protected Member Functions | |
static unsigned | ParseIdentifier (const char *) |
static std::pair< const char *, Value_t > | ParseLiteral (const char *) |
typedef Value_t(* FunctionParserBase< Value_t >::FunctionPtr)(const Value_t *) |
typedef Value_t FunctionParserBase< Value_t >::value_type |
enum FunctionParserBase::ParseErrorType |
FunctionParserBase< Value_t >::FunctionParserBase | ( | ) |
FunctionParserBase< Value_t >::~FunctionParserBase | ( | ) |
FunctionParserBase< Value_t >::FunctionParserBase | ( | const FunctionParserBase< Value_t > & | ) |
bool FunctionParserBase< Value_t >::AddConstant | ( | const std::string & | name, |
Value_t | value | ||
) |
bool FunctionParserBase< Value_t >::AddFunction | ( | const std::string & | name, |
FunctionPtr | , | ||
unsigned | paramsAmount | ||
) |
bool FunctionParserBase< Value_t >::AddFunction | ( | const std::string & | name, |
FunctionParserBase< Value_t > & | |||
) |
bool FunctionParserBase< Value_t >::AddFunctionWrapper | ( | const std::string & | name, |
const DerivedWrapper & | wrapper, | ||
unsigned | paramsAmount | ||
) |
bool FunctionParserBase< Value_t >::AddUnit | ( | const std::string & | name, |
Value_t | value | ||
) |
static Value_t FunctionParserBase< Value_t >::epsilon | ( | ) | [static] |
const char* FunctionParserBase< Value_t >::ErrorMsg | ( | ) | const |
Value_t FunctionParserBase< Value_t >::Eval | ( | const Value_t * | Vars | ) |
int FunctionParserBase< Value_t >::EvalError | ( | ) | const |
void FunctionParserBase< Value_t >::ForceDeepCopy | ( | ) |
FunctionWrapper* FunctionParserBase< Value_t >::GetFunctionWrapper | ( | const std::string & | name | ) |
ParseErrorType FunctionParserBase< Value_t >::GetParseErrorType | ( | ) | const |
Data* FunctionParserBase< Value_t >::getParserData | ( | ) | [protected] |
FunctionParserBase& FunctionParserBase< Value_t >::operator= | ( | const FunctionParserBase< Value_t > & | ) |
void FunctionParserBase< Value_t >::Optimize | ( | ) |
int FunctionParserBase< Value_t >::Parse | ( | const std::string & | Function, |
const std::string & | Vars, | ||
bool | useDegrees = false |
||
) |
int FunctionParserBase< Value_t >::Parse | ( | const char * | Function, |
const std::string & | Vars, | ||
bool | useDegrees = false |
||
) |
int FunctionParserBase< Value_t >::ParseAndDeduceVariables | ( | const std::string & | function, |
int * | amountOfVariablesFound = 0 , |
||
bool | useDegrees = false |
||
) |
int FunctionParserBase< Value_t >::ParseAndDeduceVariables | ( | const std::string & | function, |
std::vector< std::string > & | resultVars, | ||
bool | useDegrees = false |
||
) |
int FunctionParserBase< Value_t >::ParseAndDeduceVariables | ( | const std::string & | function, |
std::string & | resultVarString, | ||
int * | amountOfVariablesFound = 0 , |
||
bool | useDegrees = false |
||
) |
static unsigned FunctionParserBase< Value_t >::ParseIdentifier | ( | const char * | ) | [static, protected] |
static std::pair<const char*, Value_t> FunctionParserBase< Value_t >::ParseLiteral | ( | const char * | ) | [static, protected] |
bool FunctionParserBase< Value_t >::RemoveIdentifier | ( | const std::string & | name | ) |
void FunctionParserBase< Value_t >::setDelimiterChar | ( | char | ) |
static void FunctionParserBase< Value_t >::setEpsilon | ( | Value_t | ) | [static] |