Commit 147ee1b4 authored by Brad King's avatar Brad King
Browse files

ENH: Implemented support for not doing explicit instantiation for compilers that don't support it.

parent 4a806c76
......@@ -16,9 +16,10 @@
=========================================================================*/
#ifndef CMAKE_NO_EXPLICIT_TEMPLATE_INSTATIATION
#include "vtkImageIterator.txx"
#ifndef VTK_NO_EXPLICIT_TEMPLATE_INSTANTIATION
template class VTK_COMMON_EXPORT vtkImageIterator<char>;
template class VTK_COMMON_EXPORT vtkImageIterator<int>;
template class VTK_COMMON_EXPORT vtkImageIterator<long>;
......
......@@ -73,7 +73,7 @@ protected:
int ContinuousIncrements[3];
};
#ifdef CMAKE_NO_EXPLICIT_TEMPLATE_INSTATIATION
#ifdef VTK_NO_EXPLICIT_TEMPLATE_INSTANTIATION
#include "vtkImageIterator.txx"
#endif
......
......@@ -15,11 +15,12 @@
PURPOSE. See the above copyright notice for more information.
=========================================================================*/
// Include blockers needed since vtkImageIterator.h includes this file
// when VTK_NO_EXPLICIT_TEMPLATE_INSTANTIATION is defined.
#ifndef __vtkImageIterator_txx
#define __vtkImageIterator_txx
#ifndef CMAKE_NO_EXPLICIT_TEMPLATE_INSTATIATION
#include "vtkImageIterator.h"
#endif
#include "vtkImageData.h"
template <class DType>
......@@ -52,3 +53,5 @@ void vtkImageIterator<DType>::NextSpan()
this->SliceEndPointer += this->Increments[2];
}
}
#endif
......@@ -16,9 +16,10 @@
=========================================================================*/
#ifndef CMAKE_NO_EXPLICIT_TEMPLATE_INSTANTIATION
#include "vtkImageProgressIterator.txx"
#ifndef VTK_NO_EXPLICIT_TEMPLATE_INSTANTIATION
template class VTK_COMMON_EXPORT vtkImageProgressIterator<char>;
template class VTK_COMMON_EXPORT vtkImageProgressIterator<int>;
template class VTK_COMMON_EXPORT vtkImageProgressIterator<long>;
......
......@@ -54,8 +54,7 @@ protected:
int ID;
};
#ifdef CMAKE_NO_EXPLICIT_TEMPLATE_INSTANTIATION
// include the code
#ifdef VTK_NO_EXPLICIT_TEMPLATE_INSTANTIATION
#include "vtkImageProgressIterator.txx"
#endif
......
......@@ -15,12 +15,14 @@
PURPOSE. See the above copyright notice for more information.
=========================================================================*/
// Include blockers needed since vtkImageProgressIterator.h includes
// this file when VTK_NO_EXPLICIT_TEMPLATE_INSTANTIATION is defined.
#ifndef __vtkImageProgressIterator_txx
#define __vtkImageProgressIterator_txx
#ifndef CMAKE_NO_EXPLICIT_TEMPLATE_INSTATIATION
#include "vtkImageProgressIterator.h"
#include "vtkImageData.h"
#include "vtkProcessObject.h"
#endif
template <class DType>
vtkImageProgressIterator<DType>::vtkImageProgressIterator(vtkImageData *imgd,
......@@ -60,4 +62,4 @@ void vtkImageProgressIterator<DType>::NextSpan()
}
}
#endif
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment