types Namespace Reference

Data Structures

struct  SAME_TYPE
struct  SAME_TYPE< T1, T1 >

Functions

template<typename T >
sup (T var=0)
template<typename T >
inf (T var=0)
template<typename T >
unsigned nBits (T var=0)
template<typename T >
bool isSigned (T var=0)
template<typename T >
bool isInteger (T var=0)
template<typename T >
bool isPointer (T var=0)
template<typename T >
const char * str (T var=0)
template<typename T1 , typename T2 >
bool sameType (T1 var1, T2 var2)
template<typename T1 , typename T2 >
bool sameType ()
template<>
int sup< int > (int)
template<>
int inf< int > (int)
template<>
unsigned int sup< unsigned int > (unsigned int)
template<>
unsigned int inf< unsigned int > (unsigned int)
template<>
short sup< short > (short)
template<>
short inf< short > (short)
template<>
unsigned short sup< unsigned short > (unsigned short)
template<>
unsigned short inf< unsigned short > (unsigned short)
template<>
char sup< char > (char)
template<>
char inf< char > (char)
template<>
unsigned char sup< unsigned char > (unsigned char)
template<>
unsigned char inf< unsigned char > (unsigned char)
template<>
long sup< long > (long)
template<>
long inf< long > (long)
template<>
unsigned long sup< unsigned long > (unsigned long)
template<>
unsigned long inf< unsigned long > (unsigned long)
template<>
bool sup< bool > (bool)
template<>
bool inf< bool > (bool)
template<>
bool isSigned< unsigned int > (unsigned int)
template<>
bool isSigned< unsigned char > (unsigned char)
template<>
bool isSigned< unsigned short > (unsigned short)
template<>
bool isSigned< unsigned long > (unsigned long)
template<>
bool isSigned< bool > (bool)
template<>
bool isInteger< float > (float)
template<>
bool isInteger< double > (double)
template<>
bool isPointer< int > (int)
template<>
bool isPointer< unsigned int > (unsigned int)
template<>
bool isPointer< short > (short)
template<>
bool isPointer< unsigned short > (unsigned short)
template<>
bool isPointer< char > (char)
template<>
bool isPointer< unsigned char > (unsigned char)
template<>
bool isPointer< long > (long)
template<>
bool isPointer< unsigned long > (unsigned long)
template<>
bool isPointer< float > (float)
template<>
bool isPointer< double > (double)
template<>
const char * str< bool > (bool)
template<>
const char * str< int > (int)
template<>
const char * str< unsigned int > (unsigned int)
template<>
const char * str< short > (short)
template<>
const char * str< unsigned short > (unsigned short)
template<>
const char * str< char > (char)
template<>
const char * str< unsigned char > (unsigned char)
template<>
const char * str< long > (long)
template<>
const char * str< unsigned long > (unsigned long)
template<>
const char * str< float > (float)
template<>
const char * str< double > (double)
template<>
const char * str< int * > (int *)
template<>
const char * str< unsigned int * > (unsigned int *)
template<>
const char * str< short * > (short *)
template<>
const char * str< unsigned short * > (unsigned short *)
template<>
const char * str< char * > (char *)
template<>
const char * str< unsigned char * > (unsigned char *)
template<>
const char * str< long * > (long *)
template<>
const char * str< float * > (float *)
template<>
const char * str< double * > (double *)
template<>
const char * str< void * > (void *)

Detailed Description

The namespace grouping the collection of functions to help with type manipulations in template implementations.


Function Documentation

template<typename T >
T types::inf ( var = 0  )  [inline]

Returns the lowest value that can be stored in the type passed as template parameter.

template<>
bool types::inf< bool > ( bool   )  [inline]
template<>
char types::inf< char > ( char   )  [inline]
template<>
int types::inf< int > ( int   )  [inline]
template<>
long types::inf< long > ( long   )  [inline]
template<>
short types::inf< short > ( short   )  [inline]
template<>
unsigned char types::inf< unsigned char > ( unsigned  char  )  [inline]
template<>
unsigned int types::inf< unsigned int > ( unsigned  int  )  [inline]
template<>
unsigned long types::inf< unsigned long > ( unsigned  long  )  [inline]
template<>
unsigned short types::inf< unsigned short > ( unsigned  short  )  [inline]
template<typename T >
bool types::isInteger ( var = 0  )  [inline]

Returns true if the type passed as template parameter is integer.

template<>
bool types::isInteger< double > ( double   )  [inline]
template<>
bool types::isInteger< float > ( float   )  [inline]
template<typename T >
bool types::isPointer ( var = 0  )  [inline]

Returns true if the type passed as template parameter is integer.

template<>
bool types::isPointer< char > ( char   )  [inline]
template<>
bool types::isPointer< double > ( double   )  [inline]
template<>
bool types::isPointer< float > ( float   )  [inline]
template<>
bool types::isPointer< int > ( int   )  [inline]
template<>
bool types::isPointer< long > ( long   )  [inline]
template<>
bool types::isPointer< short > ( short   )  [inline]
template<>
bool types::isPointer< unsigned char > ( unsigned  char  )  [inline]
template<>
bool types::isPointer< unsigned int > ( unsigned  int  )  [inline]
template<>
bool types::isPointer< unsigned long > ( unsigned  long  )  [inline]
template<>
bool types::isPointer< unsigned short > ( unsigned  short  )  [inline]
template<typename T >
bool types::isSigned ( var = 0  )  [inline]

Returns true if the type passed as template parameter is signed.

template<>
bool types::isSigned< bool > ( bool   )  [inline]
template<>
bool types::isSigned< unsigned char > ( unsigned  char  )  [inline]
template<>
bool types::isSigned< unsigned int > ( unsigned  int  )  [inline]
template<>
bool types::isSigned< unsigned long > ( unsigned  long  )  [inline]
template<>
bool types::isSigned< unsigned short > ( unsigned  short  )  [inline]
template<typename T >
unsigned types::nBits ( var = 0  )  [inline]

Returns the number of bits of the type passed as template parameter.

template<typename T1 , typename T2 >
bool types::sameType (  )  [inline]
template<typename T1 , typename T2 >
bool types::sameType ( T1  var1,
T2  var2 
) [inline]
template<typename T >
const char* types::str ( var = 0  )  [inline]

Returns a string containing the name of the template type.

Referenced by DGtal::FreemanChain::read().

template<>
const char* types::str< bool > ( bool   )  [inline]
template<>
const char* types::str< char * > ( char *   )  [inline]
template<>
const char* types::str< char > ( char   )  [inline]
template<>
const char* types::str< double * > ( double *   )  [inline]
template<>
const char* types::str< double > ( double   )  [inline]
template<>
const char* types::str< float * > ( float *   )  [inline]
template<>
const char* types::str< float > ( float   )  [inline]
template<>
const char* types::str< int * > ( int *   )  [inline]
template<>
const char* types::str< int > ( int   )  [inline]
template<>
const char* types::str< long * > ( long *   )  [inline]
template<>
const char* types::str< long > ( long   )  [inline]
template<>
const char* types::str< short * > ( short *   )  [inline]
template<>
const char* types::str< short > ( short   )  [inline]
template<>
const char* types::str< unsigned char * > ( unsigned char *   )  [inline]
template<>
const char* types::str< unsigned char > ( unsigned  char  )  [inline]
template<>
const char* types::str< unsigned int * > ( unsigned int *   )  [inline]
template<>
const char* types::str< unsigned int > ( unsigned  int  )  [inline]
template<>
const char* types::str< unsigned long > ( unsigned  long  )  [inline]
template<>
const char* types::str< unsigned short * > ( unsigned short *   )  [inline]
template<>
const char* types::str< unsigned short > ( unsigned  short  )  [inline]
template<>
const char* types::str< void * > ( void *   )  [inline]
template<typename T >
T types::sup ( var = 0  )  [inline]

Returns the highest value that can be stored in the type passed as template parameter.

template<>
bool types::sup< bool > ( bool   )  [inline]
template<>
char types::sup< char > ( char   )  [inline]
template<>
int types::sup< int > ( int   )  [inline]
template<>
long types::sup< long > ( long   )  [inline]
template<>
short types::sup< short > ( short   )  [inline]
template<>
unsigned char types::sup< unsigned char > ( unsigned  char  )  [inline]
template<>
unsigned int types::sup< unsigned int > ( unsigned  int  )  [inline]
template<>
unsigned long types::sup< unsigned long > ( unsigned  long  )  [inline]
template<>
unsigned short types::sup< unsigned short > ( unsigned  short  )  [inline]
Generated on Wed Oct 6 10:18:19 2010 for DGtal by  doxygen 1.6.3