arbeit
Main Page | Namespace List | Class Hierarchy | Alphabetical List | Compound List | File List | Namespace Members | Compound Members | File Members

Nrro::__dbl Class Reference

#include <nrro.h>

List of all members.


Detailed Description

ignore this class, it just represents a double for assignment.

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


Constructor & Destructor Documentation

Nrro::__dbl::__dbl Nrro n,
int  pos
[inline]
 

Definition at line 328 of file nrro.h.

References _n, _pos, and n.

Nrro::__dbl::~__dbl  )  [inline]
 

Definition at line 329 of file nrro.h.


Member Function Documentation

template<class T>
T Nrro::__dbl::assn val  )  [inline]
 

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.

Nrro::__dbl::operator double  )  const [inline]
 

danger danger, auto typecast to double, fail safe

Definition at line 347 of file nrro.h.

References val().

double Nrro::__dbl::operator++  )  [inline]
 

Definition at line 341 of file nrro.h.

References val().

double Nrro::__dbl::operator+= double  v  )  [inline]
 

Definition at line 339 of file nrro.h.

References v, and val().

double Nrro::__dbl::operator--  )  [inline]
 

Definition at line 342 of file nrro.h.

References val().

double Nrro::__dbl::operator-= double  v  )  [inline]
 

Definition at line 340 of file nrro.h.

References v, and val().

char Nrro::__dbl::operator= char  v  )  [inline]
 

Definition at line 338 of file nrro.h.

References v.

int Nrro::__dbl::operator= int  v  )  [inline]
 

Definition at line 337 of file nrro.h.

References v.

unsigned int Nrro::__dbl::operator= unsigned int  v  )  [inline]
 

Definition at line 336 of file nrro.h.

References v.

short Nrro::__dbl::operator= short  v  )  [inline]
 

Definition at line 335 of file nrro.h.

References v.

unsigned short Nrro::__dbl::operator= unsigned short  v  )  [inline]
 

Definition at line 334 of file nrro.h.

References v.

float Nrro::__dbl::operator= float  v  )  [inline]
 

Definition at line 333 of file nrro.h.

References v.

double Nrro::__dbl::operator= double  v  )  [inline]
 

repeats, avoid upcast for simple assignments

Definition at line 332 of file nrro.h.

References v.

double Nrro::__dbl::operator= const __dbl vp  )  [inline]
 

Definition at line 726 of file nrro.h.

References val().

double Nrro::__dbl::val  )  const [inline]
 

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=().


Member Data Documentation

Nrro* Nrro::__dbl::_n [protected]
 

Definition at line 349 of file nrro.h.

Referenced by __dbl(), assn(), and val().

int Nrro::__dbl::_pos [protected]
 

Definition at line 350 of file nrro.h.

Referenced by __dbl(), assn(), and val().


The documentation for this class was generated from the following file:
Send questions, comments, and bug reports to:
jmk