Scribus Developer Documentation - API
logo-pen

Scribus Developer Documentation - API

fparser.cpp File Reference

#include "fparser.h"
#include "fpconfig.h"
#include "fptypes.h"
#include <cstdlib>
#include <cstring>
#include <cctype>
#include <cmath>

Include dependency graph for fparser.cpp:

Go to the source code of this file.

Defines

#define M_PI   3.1415926535897932384626433832795

Functions

const FuncDefinitionfp_lower_bound (const FuncDefinition *first, const FuncDefinition *last, const FuncDefinition &value)
const FuncDefinitionFindFunction (const char *F)
bool ParseVars (const string &Vars, map< string, unsigned > &dest)
int IsOperator (const char *F)
void sws (const char *F, int &Ind)
int doubleToInt (double d)
double Min (double d1, double d2)
double Max (double d1, double d2)
double DegreesToRadians (double degrees)
double RadiansToDegrees (double radians)

Variables

const unsigned FUNC_AMOUNT = sizeof(Functions)/sizeof(Functions[0])
const char * ParseErrorMessage []
const char *const fpOperators []


Define Documentation

#define M_PI   3.1415926535897932384626433832795


Function Documentation

double @204::DegreesToRadians ( double  degrees  )  [inline, static]

Definition at line 1005 of file fparser.cpp.

References M_PI.

Referenced by FunctionParser::Eval().

int @204::doubleToInt ( double  d  )  [inline, static]

Definition at line 990 of file fparser.cpp.

References int().

Referenced by FunctionParser::Eval().

const FuncDefinition* @204::FindFunction ( const char *  F  )  [inline, static]

const FuncDefinition* @204::fp_lower_bound ( const FuncDefinition first,
const FuncDefinition last,
const FuncDefinition value 
) [static]

Definition at line 34 of file fparser.cpp.

Referenced by FindFunction().

int @204::IsOperator ( const char *  F  )  [inline, static]

Definition at line 341 of file fparser.cpp.

References op.

Referenced by FunctionParser::CheckSyntax().

double @204::Max ( double  d1,
double  d2 
) [inline, static]

Definition at line 999 of file fparser.cpp.

Referenced by FunctionParser::Eval().

double @204::Min ( double  d1,
double  d2 
) [inline, static]

Definition at line 995 of file fparser.cpp.

Referenced by FunctionParser::Eval().

bool @204::ParseVars ( const string &  Vars,
map< string, unsigned > &  dest 
) [static]

Definition at line 192 of file fparser.cpp.

References FUNCTIONPARSERTYPES::VarBegin.

Referenced by FunctionParser::Parse().

double @204::RadiansToDegrees ( double  radians  )  [inline, static]

Definition at line 1009 of file fparser.cpp.

Referenced by FunctionParser::Eval().

void @204::sws ( const char *  F,
int &  Ind 
) [inline, static]


Variable Documentation

const char* const fpOperators[] [static]

Initial value:

    {
        "+", "-", "*", "/", "%", "^",
        "=", "!=", "<=", "<", ">=", ">", "&", "|",
        0
    }

Definition at line 332 of file fparser.cpp.

const unsigned FUNC_AMOUNT = sizeof(Functions)/sizeof(Functions[0]) [static]

Definition at line 29 of file fparser.cpp.

const char* ParseErrorMessage[] [static]

Initial value:

    {
        "Syntax error",                             
        "Mismatched parenthesis",                   
        "Missing ')'",                              
        "Empty parentheses",                        
        "Syntax error: Operator expected",          
        "Not enough memory",                        
        "An unexpected error occurred. Please make a full bug report "
        "to the author",                            
        "Syntax error in parameter 'Vars' given to "
        "FunctionParser::Parse()",                  
        "Illegal number of parameters to function", 
        "Syntax error: Premature end of string",    
        "Syntax error: Expecting ( after function", 
        ""
    }

Definition at line 172 of file fparser.cpp.

Referenced by FunctionParser::ErrorMsg().

Created with personalized Doxygen. This is documentation for GPL software Scribus - Open Source Desktop Publishing.