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

nrroDispatch.h File Reference

#include "nrro.h"

Go to the source code of this file.

Defines

#define dispatchIter1(FUNC, NSP)
 call a templated function that takes 1 NrroIterator<>, using a NrroSP example:

#define retDispatchIter1(RET, FUNC, NSP)
 call a templated function that takes 1 NrroIterator<>, and captures the return value example:

#define tdis2(FUNC, NSP1, NSP2)
 a helper function ignore this...

#define dispatchIter2(FUNC, NSP1, NSP2)
 call a templated function that takes 2 NrroIterator<>s example:

#define retDis2(RET, FUNC, NSP1, NSP2)
 a helper function ignore this...

#define retDispatchIter2(RET, FUNC, NSP1, NSP2)
 call a templated function that takes 2 NrroIterator<>s and captures the return value example:


Define Documentation

#define dispatchIter1 FUNC,
NSP   ) 
 

Value:

switch( NSP->getType() ) { \
   case Nrro::CHAR: \
      FUNC( NSP->begin<char>()); \
      break; \
   case Nrro::UCHAR:  \
      FUNC( NSP->begin<unsigned char>()); \
      break; \
   case Nrro::SHORT: \
      FUNC( NSP->begin<short>());  \
      break; \
   case Nrro::USHORT: \
      FUNC( NSP->begin<unsigned short>()); \
      break; \
   case Nrro::INT: \
      FUNC( NSP->begin<int>()); \
      break; \
   case Nrro::UINT: \
      FUNC( NSP->begin<unsigned int>()); \
      break; \
   case Nrro::FLOAT: \
      FUNC( NSP->begin<float>()); \
      break; \
   case Nrro::DOUBLE: \
      FUNC( NSP->begin<double>()); \
      break; \
   }
call a templated function that takes 1 NrroIterator<>, using a NrroSP example:

Definition at line 50 of file nrroDispatch.h.

Referenced by TFElementBox::rasterize2D().

#define dispatchIter2 FUNC,
NSP1,
NSP2   ) 
 

Value:

switch(NSP1->getType()) { \
   case Nrro::CHAR: \
      tdis2(FUNC,NSP1->begin<char>(),NSP2) \
      break; \
   case Nrro::UCHAR:  \
      tdis2(FUNC,NSP1->begin<unsigned char>(),NSP2) \
      break; \
   case Nrro::SHORT: \
      tdis2(FUNC,NSP1->begin<short>(),NSP2)  \
      break; \
   case Nrro::USHORT: \
      tdis2(FUNC,NSP1->begin<unsigned short>(),NSP2) \
      break; \
   case Nrro::INT: \
      tdis2(FUNC,NSP1->begin<int>(),NSP2) \
      break; \
   case Nrro::UINT: \
      tdis2(FUNC,NSP1->begin<unsigned int>(),NSP2) \
      break; \
   case Nrro::FLOAT: \
      tdis2(FUNC,NSP1->begin<float>(),NSP2) \
      break; \
   case Nrro::DOUBLE: \
      tdis2(FUNC,NSP1->begin<double>(),NSP2) \
      break; \
   }
call a templated function that takes 2 NrroIterator<>s example:

Definition at line 168 of file nrroDispatch.h.

#define retDis2 RET,
FUNC,
NSP1,
NSP2   ) 
 

Value:

switch(NSP2->getType()) { \
   case Nrro::CHAR: \
      RET = FUNC(NSP1,NSP2->begin<char>()); \
      break; \
   case Nrro::UCHAR:  \
      RET = FUNC(NSP1,NSP2->begin<unsigned char>()); \
      break; \
   case Nrro::SHORT: \
      RET = FUNC(NSP1,NSP2->begin<short>());  \
      break; \
   case Nrro::USHORT: \
      RET = FUNC(NSP1,NSP2->begin<unsigned short>()); \
      break; \
   case Nrro::INT: \
      RET = FUNC(NSP1,NSP2->begin<int>()); \
      break; \
   case Nrro::UINT: \
      RET = FUNC(NSP1,NSP2->begin<unsigned int>()); \
      break; \
   case Nrro::FLOAT: \
      RET = FUNC(NSP1,NSP2->begin<float>()); \
      break; \
   case Nrro::DOUBLE: \
      RET = FUNC(NSP1,NSP2->begin<double>()); \
      break; \
   }
a helper function ignore this...

Definition at line 199 of file nrroDispatch.h.

#define retDispatchIter1 RET,
FUNC,
NSP   ) 
 

Value:

switch( NSP->getType() ) { \
   case Nrro::CHAR: \
      RET = FUNC( NSP->begin<char>()); \
      break; \
   case Nrro::UCHAR:  \
      RET = FUNC( NSP->begin<unsigned char>()); \
      break; \
   case Nrro::SHORT: \
      RET = FUNC( NSP->begin<short>());  \
      break; \
   case Nrro::USHORT: \
      RET = FUNC( NSP->begin<unsigned short>()); \
      break; \
   case Nrro::INT: \
      RET = FUNC( NSP->begin<int>()); \
      break; \
   case Nrro::UINT: \
      RET = FUNC( NSP->begin<unsigned int>()); \
      break; \
   case Nrro::FLOAT: \
      RET = FUNC( NSP->begin<float>()); \
      break; \
   case Nrro::DOUBLE: \
      RET = FUNC( NSP->begin<double>()); \
      break; \
   }
call a templated function that takes 1 NrroIterator<>, and captures the return value example:

Definition at line 94 of file nrroDispatch.h.

Referenced by Nrro::updateMinMax().

#define retDispatchIter2 RET,
FUNC,
NSP1,
NSP2   ) 
 

Value:

switch(NSP1->getType()) { \
   case Nrro::CHAR: \
      retDis2(RET,FUNC,NSP1->begin<char>(),NSP2) \
      break; \
   case Nrro::UCHAR:  \
      retDis2(RET,FUNC,NSP1->begin<unsigned char>(),NSP2) \
      break; \
   case Nrro::SHORT: \
      retDis2(RET,FUNC,NSP1->begin<short>(),NSP2)  \
      break; \
   case Nrro::USHORT: \
      retDis2(RET,FUNC,NSP1->begin<unsigned short>(),NSP2) \
      break; \
   case Nrro::INT: \
      retDis2(RET,FUNC,NSP1->begin<int>(),NSP2) \
      break; \
   case Nrro::UINT: \
      retDis2(RET,FUNC,NSP1->begin<unsigned int>(),NSP2) \
      break; \
   case Nrro::FLOAT: \
      retDis2(RET,FUNC,NSP1->begin<float>(),NSP2) \
      break; \
   case Nrro::DOUBLE: \
      retDis2(RET,FUNC,NSP1->begin<double>(),NSP2) \
      break; \
   }
call a templated function that takes 2 NrroIterator<>s and captures the return value example:

Definition at line 245 of file nrroDispatch.h.

Referenced by NrroImage::fBlendOverRGBA().

#define tdis2 FUNC,
NSP1,
NSP2   ) 
 

Value:

switch(NSP2->getType()) { \
   case Nrro::CHAR: \
      FUNC(NSP1,NSP2->begin<char>()); \
      break; \
   case Nrro::UCHAR:  \
      FUNC(NSP1,NSP2->begin<unsigned char>()); \
      break; \
   case Nrro::SHORT: \
      FUNC(NSP1,NSP2->begin<short>());  \
      break; \
   case Nrro::USHORT: \
      FUNC(NSP1,NSP2->begin<unsigned short>()); \
      break; \
   case Nrro::INT: \
      FUNC(NSP1,NSP2->begin<int>()); \
      break; \
   case Nrro::UINT: \
      FUNC(NSP1,NSP2->begin<unsigned int>()); \
      break; \
   case Nrro::FLOAT: \
      FUNC(NSP1,NSP2->begin<float>()); \
      break; \
   case Nrro::DOUBLE: \
      FUNC(NSP1,NSP2->begin<double>()); \
      break; \
   }
a helper function ignore this...

Definition at line 125 of file nrroDispatch.h.


Send questions, comments, and bug reports to:
jmk