My Project
 All Classes Functions Variables Pages
Classes | Public Types | Public Member Functions | Protected Member Functions | Static Protected Member Functions | Friends | List of all members
FunctionParserBase< Value_t > Class Template Reference
Inheritance diagram for FunctionParserBase< Value_t >:
Inheritance graph
[legend]

Classes

class  FunctionWrapper
 

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

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
 
Value_t Eval (const Value_t *Vars)
 
int EvalError () const
 
bool AddConstant (const std::string &name, Value_t value)
 
bool AddUnit (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)
 
FunctionWrapperGetFunctionWrapper (const std::string &name)
 
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)
 
 FunctionParserBase (const FunctionParserBase &)
 
FunctionParserBaseoperator= (const FunctionParserBase &)
 
void ForceDeepCopy ()
 

Protected Member Functions

Data * getParserData ()
 

Static Protected Member Functions

static std::pair< const char
*, Value_t > 
ParseLiteral (const char *)
 
static unsigned ParseIdentifier (const char *)
 

Friends

class FPoptimizer_CodeTree::CodeTree< Value_t >
 

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