00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00038 #ifndef __vtkTemplateAliasMacro_h
00039 #define __vtkTemplateAliasMacro_h
00040
00041 #include "vtkTypeTraits.h"
00042
00043
00044
00045 #define VTK_USE_INT8 1
00046 #define VTK_USE_UINT8 1
00047 #define VTK_USE_INT16 1
00048 #define VTK_USE_UINT16 1
00049 #define VTK_USE_INT32 1
00050 #define VTK_USE_UINT32 1
00051 #define VTK_USE_INT64 1
00052 #define VTK_USE_UINT64 1
00053 #define VTK_USE_FLOAT32 1
00054 #define VTK_USE_FLOAT64 1
00055
00056
00057 #if defined(VTK_TYPE_USE___INT64) && !defined(VTK_TYPE_CONVERT_UI64_TO_DOUBLE)
00058 # undef VTK_USE_UINT64
00059 # define VTK_USE_UINT64 0
00060 #endif
00061
00062
00063
00064
00065 #define vtkTemplateAliasMacroCase(typeN, call) \
00066 vtkTemplateAliasMacroCase0(typeN, call, VTK_TYPE_SIZED_##typeN)
00067 #define vtkTemplateAliasMacroCase0(typeN, call, sized) \
00068 vtkTemplateAliasMacroCase1(typeN, call, sized)
00069 #define vtkTemplateAliasMacroCase1(typeN, call, sized) \
00070 vtkTemplateAliasMacroCase2(typeN, call, VTK_USE_##sized)
00071 #define vtkTemplateAliasMacroCase2(typeN, call, value) \
00072 vtkTemplateAliasMacroCase3(typeN, call, value)
00073 #define vtkTemplateAliasMacroCase3(typeN, call, value) \
00074 vtkTemplateAliasMacroCase_##value(typeN, call)
00075 #define vtkTemplateAliasMacroCase_0(typeN, call) \
00076 case VTK_##typeN: \
00077 { \
00078 vtkGenericWarningMacro("Support for VTK_" #typeN " not compiled."); \
00079 }; break
00080 #define vtkTemplateAliasMacroCase_1(typeN, call) \
00081 case VTK_##typeN: \
00082 { \
00083 typedef vtkTypeTraits<VTK_TYPE_NAME_##typeN>::SizedType VTK_TT; call; \
00084 }; break
00085
00086
00087 #if defined(VTK_TYPE_USE_LONG_LONG)
00088 # define vtkTemplateAliasMacroCase_ll(typeN, call) \
00089 vtkTemplateAliasMacroCase(typeN, call);
00090 #else
00091 # define vtkTemplateAliasMacroCase_ll(typeN, call)
00092 #endif
00093
00094
00095 #if defined(VTK_TYPE_USE___INT64)
00096 # define vtkTemplateAliasMacroCase_i64(typeN, call) \
00097 vtkTemplateAliasMacroCase(typeN, call);
00098 #else
00099 # define vtkTemplateAliasMacroCase_i64(typeN, call)
00100 #endif
00101
00102
00103
00104 #define vtkTemplateAliasMacro(call) \
00105 vtkTemplateAliasMacroCase(DOUBLE, call); \
00106 vtkTemplateAliasMacroCase(FLOAT, call); \
00107 vtkTemplateAliasMacroCase_ll(LONG_LONG, call) \
00108 vtkTemplateAliasMacroCase_ll(UNSIGNED_LONG_LONG, call) \
00109 vtkTemplateAliasMacroCase_i64(__INT64, call) \
00110 vtkTemplateAliasMacroCase_i64(UNSIGNED___INT64, call) \
00111 vtkTemplateAliasMacroCase(ID_TYPE, call); \
00112 vtkTemplateAliasMacroCase(LONG, call); \
00113 vtkTemplateAliasMacroCase(UNSIGNED_LONG, call); \
00114 vtkTemplateAliasMacroCase(INT, call); \
00115 vtkTemplateAliasMacroCase(UNSIGNED_INT, call); \
00116 vtkTemplateAliasMacroCase(SHORT, call); \
00117 vtkTemplateAliasMacroCase(UNSIGNED_SHORT, call); \
00118 vtkTemplateAliasMacroCase(CHAR, call); \
00119 vtkTemplateAliasMacroCase(SIGNED_CHAR, call); \
00120 vtkTemplateAliasMacroCase(UNSIGNED_CHAR, call)
00121
00122 #endif