#include <nrro.h>
This class represents un-typed data elements, local accessors [v() & ()] are pure doubles (LCD) they will be slow, you should use iterators for speed
Definition at line 326 of file nrro.h.
Public Member Functions | |
__dbl (Nrro *n, int pos) | |
~__dbl () | |
double | operator= (const __dbl &vp) |
double | operator= (double v) |
repeats, avoid upcast for simple assignments | |
float | operator= (float v) |
unsigned short | operator= (unsigned short v) |
short | operator= (short v) |
unsigned int | operator= (unsigned int v) |
int | operator= (int v) |
char | operator= (char v) |
double | operator+= (double v) |
double | operator-= (double v) |
double | operator++ () |
double | operator-- () |
double | val () const |
value proxy | |
template<class T> T | assn (T val) |
here is why I bothered to template this: if you maybe know the type, you can assign it without an upcast and then a down cast, for instance: n.assn<char>(10); /// the nrro has char data this is just a minor speed issue, but probably worth the effort. | |
operator double () const | |
danger danger, auto typecast to double, fail safe | |
Protected Attributes | |
Nrro * | _n |
int | _pos |
|
|
|
|
|
here is why I bothered to template this: if you maybe know the type, you can assign it without an upcast and then a down cast, for instance: n.assn<char>(10); /// the nrro has char data this is just a minor speed issue, but probably worth the effort. TODO: use arrays of pointers instead of switches!!! Yuk, you are doing this switch every assignment!!, and access too for that matter, slow slow. to type cast reslut to requested type .. cast (void*) data ptr to the real data type ptr, increment position to where it needs to be, de-reference ptr, and assign the value. cast reslut to castT( (dref((cast to (real)) + offset) ) = val) Definition at line 740 of file nrro.h. References _n, _pos, Nrro::CHAR, Nrro::DOUBLE, Nrro::FLOAT, Nrro::getData(), Nrro::getType(), Nrro::INT, Nrro::SHORT, Nrro::UCHAR, Nrro::UINT, and Nrro::USHORT. |
|
danger danger, auto typecast to double, fail safe
Definition at line 347 of file nrro.h. References val(). |
|
Definition at line 341 of file nrro.h. References val(). |
|
|
|
Definition at line 342 of file nrro.h. References val(). |
|
|
|
Definition at line 338 of file nrro.h. References v. |
|
Definition at line 337 of file nrro.h. References v. |
|
Definition at line 336 of file nrro.h. References v. |
|
Definition at line 335 of file nrro.h. References v. |
|
Definition at line 334 of file nrro.h. References v. |
|
Definition at line 333 of file nrro.h. References v. |
|
repeats, avoid upcast for simple assignments
Definition at line 332 of file nrro.h. References v. |
|
Definition at line 726 of file nrro.h. References val(). |
|
value proxy
Definition at line 720 of file nrro.h. References _n, _pos, and Nrro::val(). Referenced by operator double(), operator++(), operator+=(), operator--(), operator-=(), and operator=(). |
|
|
|
|