Go to the first, previous, next, last section, table of contents.


CNDouble -- Doubles derived from CNObject

SYNOPSIS

#include <CNCL/Double.h>

TYPE

CN_DOUBLE

BASE CLASSES

CNObject

DERIVED CLASSES

None

RELATED CLASSES

CNInt

DESCRIPTION

This class provides a double value derived from CNObject. Such it combines the behavior of the builtin type double with the possibility to use this type with generic containers (like CNDLList) or as parameters to CNEvents and SDLSignals.
Note: CNDouble consumes much more memory than an ordinary double. Therfore it isn't a good idea to create large arrays of CNDoubles when one doesn't need its special capabilities.
Constructors:

CNDouble(double n=0.0);
CNDouble(CNParam *param);
Initializes the Double with the value n (default = 0.0).


In addition to the member functions required by CNCL, CNDouble provides:

operator double()
Conversion of CNDouble to ordinary double. This allows the use of CNDouble in calculations.
Note: to explicitly convert a CNDouble identifier to an ordinary long (or else) write long(double(identifier)). Implicit conversion however works well without casting to double first.
double operator -()
double operator +()
Unary minus and plus operator.
double operator +=(double n)
double operator -=(double n)
double operator *=(double n)
double operator /=(double n)
Arithmetic operators where a CNDouble is on the left and on the right side of an equation. Note: unary * and & operators aren't overloaded.


Go to the first, previous, next, last section, table of contents.