ExpressionException Class Reference
[Mathematical algorithms]

#include <Expression.hpp>

Inheritance diagram for ExpressionException:

Inheritance graph
[legend]
Collaboration diagram for ExpressionException:

Collaboration graph
[legend]
List of all members.

Detailed Description

This class provides the ability to resolve general mathematical expressions at run time.

The goal is to allow the end user the ability to specify arbitrary observation transformations.

The expression is input as a string in the constructor of the class. The expression is first broken up into tokens. Those tokens are prioritized according to operator precedence and the number of parentheses surrounding them. This list of prioritized combinations is then converted into a 'classic" binary expression tree. All this happens during construction, hidden to the user.

The design of the expression node classes is based on material by David Eck and Scotty Orr found at

http://math.hws.edu/orr/s04/cpsc225/btrees/index.html

After the expression is instantiated, it can be evaluated. If the expression contains variables, those must be set using the set operation for the expression to successfully evaluate.

Definition at line 73 of file Expression.hpp.

Public Member Functions

 ExpressionException () throw ()
 Default constructor.
 ExpressionException (const ExpressionException &a) throw ()
 Copy constructor.
 ExpressionException (const gpstk::Exception &a) throw ()
 Cast constructor.
 ExpressionException (std::string a, unsigned long b=0, gpstk::Exception::Severity c=gpstk::Exception::unrecoverable) throw ()
 \ Common use constructor.
 ~ExpressionException () throw ()
 Destructor.
std::string getName () const throw ()
 Returns the name of the exception class.
ExpressionExceptionoperator= (const ExpressionException &kid)
 assignment operator for derived exceptions

Friends

std::ostream & operator<< (std::ostream &s, const ExpressionException &c) throw ()
 ostream operator for derived exceptions


Constructor & Destructor Documentation

ExpressionException  )  throw () [inline]
 

Default constructor.

Definition at line 73 of file Expression.hpp.

ExpressionException const ExpressionException a  )  throw () [inline]
 

Copy constructor.

Definition at line 73 of file Expression.hpp.

ExpressionException const gpstk::Exception a  )  throw () [inline]
 

Cast constructor.

Definition at line 73 of file Expression.hpp.

ExpressionException std::string  a,
unsigned long  b = 0,
gpstk::Exception::Severity  c = gpstk::Exception::unrecoverable
throw () [inline]
 

\ Common use constructor.

\ param a text description of exception condition. \ param b error code (default none) \ param c severity of exception (default unrecoverable) \

Definition at line 78 of file Expression.hpp.

~ExpressionException  )  throw () [inline]
 

Destructor.

Definition at line 78 of file Expression.hpp.


Member Function Documentation

std::string getName  )  const throw () [inline]
 

Returns the name of the exception class.

Reimplemented from Exception.

Definition at line 78 of file Expression.hpp.

ExpressionException& operator= const ExpressionException kid  )  [inline]
 

assignment operator for derived exceptions

Definition at line 78 of file Expression.hpp.


Friends And Related Function Documentation

std::ostream& operator<< std::ostream &  s,
const ExpressionException c
throw () [friend]
 

ostream operator for derived exceptions

Definition at line 78 of file Expression.hpp.


The documentation for this class was generated from the following file:
Generated on Thu Feb 9 03:31:35 2012 for GPS ToolKit Software Library by  doxygen 1.3.9.1