rasdaman complete source
Public Member Functions | Public Attributes | List of all members
r_MiterDirect Class Reference

#include <miterd.hh>

Public Member Functions

 r_MiterDirect (void *data, const r_Minterval &total, const r_Minterval &iter, r_Bytes tlen, unsigned int step=1)
 constructor More...
 
 ~r_MiterDirect (void)
 destructor More...
 
r_MiterDirectoperator++ (void)
 increment the iterator in the default order, i.e. last dimension first More...
 
r_MiterDirectiterateUserOrder (const r_Dimension *order, const unsigned int *step)
 increment in user-specified order More...
 
r_MiterDirectiterateUserOrder (const unsigned int *order, const int *step)
 increment or decrement in user-specified order More...
 
bool isDone (void) const
 returns != 0 if iteration is finished. More...
 
void * getData (void)
 returns pointer to data during normal iteration. More...
 
void * getData (unsigned int *order)
 return pointer to data for non-standard iteration order More...
 
r_Range getDimStep (r_Dimension d) const
 returns number of bytes to step in dimension d in one iteration More...
 
r_Bytes getDimBaseStep (r_Dimension d) const
 returns number of bytes to step in dimension d when pos changes by 1. More...
 
r_Range getExtent (r_Dimension d) const
 returns extent in dimension d More...
 
void posChanged (void)
 notify that the position was changed and internal variables need to be recalculated More...
 
void reset (void)
 reset the iterator (pos to low and data to baseAddress + offset) More...
 
void print_pos (std::ostream &str) const
 print the position More...
 

Public Attributes

bool done
 
r_miter_direct_dataid
 
void * baseAddress
 

Constructor & Destructor Documentation

r_MiterDirect::r_MiterDirect ( void *  data,
const r_Minterval total,
const r_Minterval iter,
r_Bytes  tlen,
unsigned int  step = 1 
)

constructor

r_MiterDirect::~r_MiterDirect ( void  )

destructor

constructor getting the data, the total domain, the iteration domain, the base type length and the number of steps per iteration.

Member Function Documentation

void* r_MiterDirect::getData ( void  )
inline

returns pointer to data during normal iteration.

void* r_MiterDirect::getData ( unsigned int *  order)
inline

return pointer to data for non-standard iteration order

r_Bytes r_MiterDirect::getDimBaseStep ( r_Dimension  d) const
inline

returns number of bytes to step in dimension d when pos changes by 1.

r_Range r_MiterDirect::getDimStep ( r_Dimension  d) const
inline

returns number of bytes to step in dimension d in one iteration

returns pointer to data during user-defined iteration; order is as defined in iterateUserOrder().

r_Range r_MiterDirect::getExtent ( r_Dimension  d) const
inline

returns extent in dimension d

bool r_MiterDirect::isDone ( void  ) const
inline

returns != 0 if iteration is finished.

see the other incrementUserOrder method for more details

r_MiterDirect& r_MiterDirect::iterateUserOrder ( const r_Dimension order,
const unsigned int *  step 
)
inline

increment in user-specified order

r_MiterDirect& r_MiterDirect::iterateUserOrder ( const unsigned int *  order,
const int *  step 
)
inline

increment or decrement in user-specified order

increment the iterator in a user-specified order. order points to an array defining the order of the dimensions during iteration, e.g. for a 3D iteration 0,1,2 would iterate over the first dimension first and the last dimension last wheres 2,1,0 is equivalent to operator++(). step is the number of steps to do in each dimension.

r_MiterDirect& r_MiterDirect::operator++ ( void  )
inline

increment the iterator in the default order, i.e. last dimension first

void r_MiterDirect::posChanged ( void  )
inline

notify that the position was changed and internal variables need to be recalculated

void r_MiterDirect::print_pos ( std::ostream &  str) const

print the position

void r_MiterDirect::reset ( void  )

reset the iterator (pos to low and data to baseAddress + offset)

Member Data Documentation

void* r_MiterDirect::baseAddress
bool r_MiterDirect::done
r_miter_direct_data* r_MiterDirect::id

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