Scribus
Open source desktop publishing at your fingertips
FunctionParser Class Reference

Public Types

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, NO_FUNCTION_PARSED_YET,
  FP_NO_ERROR
}
 
typedef double(* FunctionPtr) (const double *)
 

Public Member Functions

int Parse (const char *Function, const std::string &Vars, bool useDegrees=false)
 
int Parse (const std::string &Function, const std::string &Vars, bool useDegrees=false)
 
void setDelimiterChar (char)
 
const char * ErrorMsg () const
 
ParseErrorType GetParseErrorType () const
 
double Eval (const double *Vars)
 
int EvalError () const
 
bool AddConstant (const std::string &name, double value)
 
bool AddUnit (const std::string &name, double value)
 
bool AddFunction (const std::string &name, FunctionPtr, unsigned paramsAmount)
 
bool AddFunction (const std::string &name, FunctionParser &)
 
bool RemoveIdentifier (const std::string &name)
 
void Optimize ()
 
int ParseAndDeduceVariables (const std::string &function, int *amountOfVariablesFound=0, bool useDegrees=false)
 
int ParseAndDeduceVariables (const std::string &function, std::string &resultVarString, int *amountOfVariablesFound=0, bool useDegrees=false)
 
int ParseAndDeduceVariables (const std::string &function, std::vector< std::string > &resultVars, bool useDegrees=false)
 
 FunctionParser (const FunctionParser &)
 
FunctionParseroperator= (const FunctionParser &)
 
void ForceDeepCopy ()
 

Friends

class FPoptimizer_CodeTree::CodeTree
 

The documentation for this class was generated from the following files: