Public Member Functions

SCalc::Expression Class Reference

An expression ! More...

#include <expression.hh>

Inheritance diagram for SCalc::Expression:
Inheritance graph
[legend]
Collaboration diagram for SCalc::Expression:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 Expression (Session *s)
virtual int is_expression ()
 Yes, this is an expression:
virtual double evaluate (const double *values, const double *s=NULL)=0
 Evaluate the expression.
virtual void dump (::std::ostream &stream=::std::cerr)
 Dumps the contents of the expression to a stream.
virtual std::set< int > used_variables ()
 Variable used by an expression.
int evaluable ()
 Tells if this expression can be evaluated.
double evaluate ()
 If it can be evaluated, returns the given value.
virtual int is_null ()
virtual int is_id ()
 If Id, then the value is always 1.
virtual int is_const ()
 If const, then the value is always 1.
virtual int is_valid ()
virtual Expressionderive (int id)
 Derive an expression with regards to one variable.
virtual Expressioncopy ()
 Returns a freshly allocated copy of the expression.
virtual std::string pretty_print ()=0
 Pretty prints to a string.
virtual Expressionsimplify ()
 Simplifies the expression.
virtual double * mass_evaluate (int nb, double *target, const double **variables)
 Evaluates the Expression for different parameters.

Static Public Member Functions

Oper5e77ef400008 (at your option) any later version. 00009 00010 This program is distributed in the hope that it will be useful, 00011 but WITHOUT ANY WARRANTY; without even the implied warranty of 00012 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00013 GNU General Public License for more details (in the COPYING file). 00014 00015 */ 00016 00017 namespace SCalc { 00018 00026 class SyntaxError : public ParserResult { 00027 protected: 00028 std::string original; 00029 std::string message; 00030 int start; 00031 int end; 00032 public: 00033 00035 virtual int is_syntax_error() { return 1;}; 00036 00037 SyntaxError(Session * s, const char * str, 00038 const char *error, int st, int en); 00039 00041 std::string original_string() { return original;}; 00043 std::string error_message() { return message;}; 00045 int start_pos() { return start;}; 00047 int end_pos() { return end;}; 00048 00056 virtual std::string pretty_print(); 00057 }; 00058 };
./usr/share/doc/libscalc-dev/html/classSCalc_1_1Expression.html0000644000000000000000000006040011425647335023320 0ustar rootroot SCalc: SCalc::Expression Class Reference

SCalc::Expression Class Reference

An expression ! More...

#include <expression.hh>

Inheritance diagram for SCalc::Expression:
Collaboration diagram for SCalc::Expression:

List of all members.

Public Member Functions

 Expression (Session *s)
virtual int is_expression ()
 Yes, this is an expression:
virtual double evaluate (const double *values, const double *s=NULL)=0
 Evaluate the expression.
virtual void dump (::std::ostream &stream=::std::cerr)
 Dumps the contents of the expression to a stream.
virtual std::set< int > used_variables ()
 Variable used by an expression.
int evaluable ()
 Tells if this expression can be evaluated.
double evaluate ()
 If it can be evaluated, returns the given value.
virtual int is_null ()
virtual int is_id ()
 If Id, then the value is always 1.
virtual int is_const ()
 If const, then the value is always 1.
virtual int is_valid ()
virtual Expressionderive (int id)
 Derive an expression with regards to one variable.