- Main Page
- Modules
- Classes
- Files
- Directories
- Related Pages

- Class List
- Class Hierarchy
- Class Members

# cDoubleExpression Class Reference

`#include <cpar.h>`

Inheritance diagram for cDoubleExpression:

List of all members.

## Detailed Description

Abstract base class for double-valued expressions.

Currently used by nedtool-generated C++ code, which contains cDoubleExpression-based compiled expressions (used via cPar) for e.g. submodule parameters.

The actual expression should be supplied by creating a subclass and overriding evaluate(). The expression may use parameters stored in data members of the class; parameters can be initialized e.g. in the constructor.

Example:

       class Expr12 : public cDoubleExpression {
           private:
               long p1;
               cPar& p2;
           public:
               Expr12(long ap1, cPar& ap2) : p1(ap1), p2(ap2) {}
               virtual double evaluate() {return 3*p1+p2;}
       };

See also:
  cPar

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

- cpar.h