Commit 5c3241b9 authored by Ben Boeckel's avatar Ben Boeckel
Browse files

vtkInstantiator: remove instantiator macro from main sources

These functions are fine in the instantiator files themselves and are
not needed in the class files.

Change-Id: I68af29307a527f266ee644b5ac8988abf08acee4
parent 3a86ca42
......@@ -72,6 +72,7 @@ MACRO(VTK_MAKE_INSTANTIATOR3 className outSourceList SOURCES EXPORT_MACRO HEADER
# Initialize local variables
SET(HEADER_CONTENTS)
SET(CXX_CONTENTS_INCLUDE)
SET(CXX_CONTENTS)
SET(CXX_CONTENTS2)
SET(CXX_CONTENTS3)
......@@ -110,6 +111,12 @@ MACRO(VTK_MAKE_INSTANTIATOR3 className outSourceList SOURCES EXPORT_MACRO HEADER
IF (${FILE} MATCHES "vtkVariant")
SET (WRAP_THIS_CLASS 0)
ENDIF (${FILE} MATCHES "vtkVariant")
IF (${FILE} MATCHES "vtkObjectBase")
SET (WRAP_THIS_CLASS 0)
ENDIF ()
IF (${FILE} MATCHES "vtkInformation.*Key")
SET (WRAP_THIS_CLASS 0)
ENDIF ()
# finally if we should wrap it, then ...
IF (WRAP_THIS_CLASS)
......@@ -117,9 +124,12 @@ MACRO(VTK_MAKE_INSTANTIATOR3 className outSourceList SOURCES EXPORT_MACRO HEADER
# what is the filename without the extension
GET_FILENAME_COMPONENT(TMP_FILENAME ${FILE} NAME_WE)
SET (CXX_CONTENTS_INCLUDE
"${CXX_CONTENTS_INCLUDE}#include \"${TMP_FILENAME}.h\"\n")
# generate the implementation
SET (CXX_CONTENTS
"${CXX_CONTENTS}extern vtkObject* vtkInstantiator${TMP_FILENAME}New();\n")
"${CXX_CONTENTS}vtkInstantiatorNewMacro(${TMP_FILENAME})\n")
SET (CXX_CONTENTS2
"${CXX_CONTENTS2} vtkInstantiator::RegisterInstantiator(\"${TMP_FILENAME}\", vtkInstantiator${TMP_FILENAME}New);\n")
......
#include "@VTK_MAKE_INSTANTIATOR_CLASS_NAME@.h"
@CXX_CONTENTS_INCLUDE@
#include "vtkSetGet.h"
@CXX_CONTENTS@
......
......@@ -17,10 +17,6 @@
#include "vtkDebugLeaks.h"
//-----------------------------------------------------------------------------
// Needed when we don't use the vtkStandardNewMacro.
vtkInstantiatorNewMacro(vtkDynamicLoader);
//-----------------------------------------------------------------------------
vtkDynamicLoader* vtkDynamicLoader::New()
{
......
......@@ -124,10 +124,6 @@ protected:
// ------------------------------------vtkObject----------------------
//----------------------------------------------------------------------------
// Needed when we don't use the vtkStandardNewMacro.
vtkInstantiatorNewMacro(vtkObject);
vtkObject *vtkObject::New()
{
#ifdef VTK_DEBUG_LEAKS
......
......@@ -322,16 +322,14 @@ vtkObjectFactory* vtkLoad() \
thisClass* thisClass::New() \
{ \
VTK_STANDARD_NEW_BODY(thisClass) \
} \
vtkInstantiatorNewMacro(thisClass)
}
// Macro to implement the object factory form of the New() method.
#define vtkObjectFactoryNewMacro(thisClass) \
thisClass* thisClass::New() \
{ \
VTK_OBJECT_FACTORY_NEW_BODY(thisClass) \
} \
vtkInstantiatorNewMacro(thisClass)
}
// Macro to implement the abstract object factory form of the New() method.
// That is an abstract base class that can only be instantiated if the
......@@ -340,5 +338,4 @@ vtkObjectFactory* vtkLoad() \
thisClass* thisClass::New() \
{ \
VTK_ABSTRACT_OBJECT_FACTORY_NEW_BODY(thisClass) \
} \
vtkInstantiatorNewMacro(thisClass)
}
......@@ -17,10 +17,6 @@
#include "vtkDebugLeaks.h"
//----------------------------------------------------------------------------
// Needed when we don't use the vtkStandardNewMacro.
vtkInstantiatorNewMacro(vtkObjectFactoryCollection);
vtkObjectFactoryCollection* vtkObjectFactoryCollection::New()
{
#ifdef VTK_DEBUG_LEAKS
......
......@@ -22,10 +22,6 @@
#include "vtkDebugLeaks.h"
//----------------------------------------------------------------------------
// Needed when we don't use the vtkStandardNewMacro.
vtkInstantiatorNewMacro(vtkOutputWindow);
//----------------------------------------------------------------------------
vtkOutputWindow* vtkOutputWindow::Instance = 0;
......
......@@ -30,10 +30,6 @@
#include "vtkUnsignedShortArray.h"
//----------------------------------------------------------------------------
// Needed when we don't use the vtkStandardNewMacro.
vtkInstantiatorNewMacro(vtkPoints);
//----------------------------------------------------------------------------
vtkPoints* vtkPoints::New(int dataType)
{
......
......@@ -30,10 +30,6 @@
#include "vtkUnsignedShortArray.h"
//----------------------------------------------------------------------------
// Needed when we don't use the vtkStandardNewMacro.
vtkInstantiatorNewMacro(vtkPoints2D);
//----------------------------------------------------------------------------
vtkPoints2D* vtkPoints2D::New(int dataType)
{
......
......@@ -21,10 +21,6 @@
#include <vtksys/SystemTools.hxx>
//----------------------------------------------------------------------------
// Needed when we don't use the vtkStandardNewMacro.
vtkInstantiatorNewMacro(vtkDirectory);
//----------------------------------------------------------------------------
vtkDirectory* vtkDirectory::New()
{
......
......@@ -24,10 +24,6 @@
#include <algorithm>
//----------------------------------------------------------------------------
// Needed when we don't use the vtkStandardNewMacro.
vtkInstantiatorNewMacro(vtkGlobFileNames);
//----------------------------------------------------------------------------
vtkGlobFileNames* vtkGlobFileNames::New()
{
......
......@@ -34,10 +34,6 @@
#include <vector>
#include <vtksys/hash_map.hxx>
//----------------------------------------------------------------------------
// Needed when we don't use the vtkStandardNewMacro.
vtkInstantiatorNewMacro(vtkMultiProcessController);
//-----------------------------------------------------------------------------
// Stores internal members that cannot or should not be exposed in the header
// file (for example, because they use templated types).
......
......@@ -23,10 +23,6 @@
#include "vtkGPUInfoListArray.h"
// ----------------------------------------------------------------------------
// Needed when we don't use the vtkStandardNewMacro.
vtkInstantiatorNewMacro(vtkGPUInfoList);
// ----------------------------------------------------------------------------
vtkGPUInfoList *vtkGPUInfoList::New()
{
......
......@@ -55,10 +55,6 @@ typedef std::map<int,vtkTimerStruct>::iterator vtkTimerIdMapIterator;
static int vtkTimerId = 1;
//----------------------------------------------------------------------------
// Needed when we don't use the vtkStandardNewMacro.
vtkInstantiatorNewMacro(vtkRenderWindowInteractor);
//----------------------------------------------------------------------------
vtkCxxSetObjectMacro(vtkRenderWindowInteractor,Picker,vtkAbstractPicker);
//----------------------------------------------------------------------
......
......@@ -92,9 +92,6 @@ public:
unsigned char rgba[4];
};
//----------------------------------------------------------------------------
vtkInstantiatorNewMacro(vtkFreeTypeTools);
//----------------------------------------------------------------------------
// The singleton, and the singleton cleanup
vtkFreeTypeTools* vtkFreeTypeTools::Instance = NULL;
......
......@@ -47,9 +47,6 @@ using namespace ftgl;
#define VTK_FTFC_DEBUG 0
#define VTK_FTFC_DEBUG_CD 0
//----------------------------------------------------------------------------
vtkInstantiatorNewMacro(vtkFreeTypeUtilities);
//----------------------------------------------------------------------------
// The singleton, and the singleton cleanup
......
......@@ -29,9 +29,6 @@
#include <algorithm>
//----------------------------------------------------------------------------
vtkInstantiatorNewMacro(vtkMathTextUtilities)
//----------------------------------------------------------------------------
// The singleton, and the singleton cleanup
vtkMathTextUtilities* vtkMathTextUtilities::Instance = NULL;
......
......@@ -168,7 +168,6 @@ vtkMatplotlibMathTextUtilities* vtkMatplotlibMathTextUtilities::New()
return new vtkMatplotlibMathTextUtilities;
}
vtkInstantiatorNewMacro(vtkMatplotlibMathTextUtilities)
//----------------------------------------------------------------------------
vtkMatplotlibMathTextUtilities::vtkMatplotlibMathTextUtilities()
: Superclass(), MaskParser(NULL), PathParser(NULL), FontPropertiesClass(NULL),
......
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