Updates will be applied April 15th at 12pm EDT (UTC-0400). GitLab could be a little slow between 12 - 12:45pm EDT.

Commit d4f4b96f authored by Bill Hoffman's avatar Bill Hoffman

ENH: changed all static New methods to use the vtkObjectFactory

parent de79eb27

Too many changes to show.

To preserve performance only 1000 of 1000+ files are displayed.
......@@ -13,19 +13,8 @@ VPATH = @srcdir@
ABSTRACT_H =
CONCRETE_H = \
vtkDataSetCollection \
vtkFloatNormals \
vtkFloatPoints \
vtkFloatScalars \
vtkFloatTCoords \
vtkFloatTensors \
vtkFloatVectors \
vtkImplicitFunctionCollection \
vtkObjectFactoryCollection \
vtkPlaneCollection \
vtkPropCollection \
vtkTransformCollection \
vtkVersion
vtkObjectFactoryCollection
ABSTRACT = \
vtkAbstractMapper \
......@@ -59,6 +48,7 @@ vtkCoordinate \
vtkDataInformation \
vtkDataObject \
vtkDataSetAttributes \
vtkDataSetCollection \
vtkDirectory \
vtkDynamicLoader \
vtkDoubleArray \
......@@ -66,6 +56,12 @@ vtkEdgeTable \
vtkEmptyCell \
vtkFieldData \
vtkFloatArray \
vtkFloatNormals \
vtkFloatPoints \
vtkFloatScalars \
vtkFloatTCoords \
vtkFloatTensors \
vtkFloatVectors \
vtkGenericCell \
vtkHexahedron \
vtkIdList \
......@@ -73,6 +69,7 @@ vtkImageData \
vtkImageInformation \
vtkImageSource \
vtkImageToStructuredPoints \
vtkImplicitFunctionCollection \
vtkIndent \
vtkIntArray \
vtkLine \
......@@ -89,6 +86,7 @@ vtkNormals \
vtkObject \
vtkPixel \
vtkPlane \
vtkPlaneCollection \
vtkPointData \
vtkPointLocator \
vtkPointLocator2D \
......@@ -101,6 +99,7 @@ vtkPriorityQueue \
vtkProcessObject \
vtkProp \
vtkPropAssembly \
vtkPropCollection \
vtkProperty2D \
vtkPyramid \
vtkQuad \
......@@ -122,6 +121,7 @@ vtkTetra \
vtkTimerLog \
vtkTimeStamp \
vtkTransform \
vtkTransformCollection \
vtkTriangle \
vtkTriangleStrip \
vtkUnsignedCharArray \
......
......@@ -40,6 +40,25 @@ MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
=========================================================================*/
#include "vtkAbstractMapper.h"
#include "vtkDataSet.h"
#include "vtkObjectFactory.h"
//------------------------------------------------------------------------------
vtkAbstractMapper* vtkAbstractMapper::New()
{
// First try to create the object from the vtkObjectFactory
vtkObject* ret = vtkObjectFactory::CreateInstance("vtkAbstractMapper");
if(ret)
{
return (vtkAbstractMapper*)ret;
}
// If the factory was unable to create the object, then create it here.
return new vtkAbstractMapper;
}
// Construct object.
vtkAbstractMapper::vtkAbstractMapper()
......
......@@ -62,7 +62,7 @@ public:
// Description:
// Instantiate object.
static vtkAbstractMapper *New() {return new vtkAbstractMapper;};
static vtkAbstractMapper *New();
// Description:
// Release any graphics resources that are being consumed by this mapper.
......
......@@ -42,6 +42,25 @@ MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
#include "vtkProperty2D.h"
#include "vtkMapper2D.h"
#include "vtkPropCollection.h"
#include "vtkObjectFactory.h"
//------------------------------------------------------------------------------
vtkActor2D* vtkActor2D::New()
{
// First try to create the object from the vtkObjectFactory
vtkObject* ret = vtkObjectFactory::CreateInstance("vtkActor2D");
if(ret)
{
return (vtkActor2D*)ret;
}
// If the factory was unable to create the object, then create it here.
return new vtkActor2D;
}
// Creates an actor2D with the following defaults:
// position -1, -1 (view coordinates)
......
......@@ -67,7 +67,7 @@ public:
// Creates an actor2D with the following defaults:
// position -1, -1 (view coordinates)
// orientation 0, scale (1,1), layer 0, visibility on
static vtkActor2D* New() {return new vtkActor2D;};
static vtkActor2D* New();
// Description:
// Support the standard render methods.
......
......@@ -42,6 +42,25 @@ MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
#include "vtkCollection.h"
#include "vtkActor2D.h"
#include "vtkActor2DCollection.h"
#include "vtkObjectFactory.h"
//------------------------------------------------------------------------------
vtkActor2DCollection* vtkActor2DCollection::New()
{
// First try to create the object from the vtkObjectFactory
vtkObject* ret = vtkObjectFactory::CreateInstance("vtkActor2DCollection");
if(ret)
{
return (vtkActor2DCollection*)ret;
}
// If the factory was unable to create the object, then create it here.
return new vtkActor2DCollection;
}
// protected function to delete an element. Internal use only.
void vtkActor2DCollection::DeleteElement(vtkCollectionElement *e)
......
......@@ -61,7 +61,7 @@ class VTK_EXPORT vtkActor2DCollection : public vtkPropCollection
// Description:
// Desctructor for the vtkActor2DCollection class. This removes all
// objects from the collection.
static vtkActor2DCollection *New() {return new vtkActor2DCollection;};
static vtkActor2DCollection *New();
const char *GetClassName() {return "vtkActor2DCollection";};
// Description:
......
......@@ -39,6 +39,25 @@ MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
=========================================================================*/
#include "vtkBitArray.h"
#include "vtkObjectFactory.h"
//------------------------------------------------------------------------------
vtkBitArray* vtkBitArray::New()
{
// First try to create the object from the vtkObjectFactory
vtkObject* ret = vtkObjectFactory::CreateInstance("vtkBitArray");
if(ret)
{
return (vtkBitArray*)ret;
}
// If the factory was unable to create the object, then create it here.
return new vtkBitArray;
}
// Instantiate object.
vtkBitArray::vtkBitArray(int numComp)
......
......@@ -53,7 +53,7 @@ MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
class VTK_EXPORT vtkBitArray : public vtkDataArray
{
public:
static vtkBitArray *New() {return new vtkBitArray;};
static vtkBitArray *New();
virtual const char *GetClassName() {return "vtkBitArray";};
void PrintSelf(ostream& os, vtkIndent indent);
......
......@@ -40,6 +40,25 @@ MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
=========================================================================*/
#include "vtkByteSwap.h"
#include <memory.h>
#include "vtkObjectFactory.h"
//------------------------------------------------------------------------------
vtkByteSwap* vtkByteSwap::New()
{
// First try to create the object from the vtkObjectFactory
vtkObject* ret = vtkObjectFactory::CreateInstance("vtkByteSwap");
if(ret)
{
return (vtkByteSwap*)ret;
}
// If the factory was unable to create the object, then create it here.
return new vtkByteSwap;
}
// Swap four byte word.
#ifdef VTK_WORDS_BIGENDIAN
......
......@@ -54,7 +54,7 @@ MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
class VTK_EXPORT vtkByteSwap : public vtkObject
{
public:
static vtkByteSwap *New() {return new vtkByteSwap;};
static vtkByteSwap *New();
const char *GetClassName() {return "vtkByteSwap";};
// Description:
......
......@@ -39,6 +39,25 @@ MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
=========================================================================*/
#include "vtkCellArray.h"
#include "vtkObjectFactory.h"
//------------------------------------------------------------------------------
vtkCellArray* vtkCellArray::New()
{
// First try to create the object from the vtkObjectFactory
vtkObject* ret = vtkObjectFactory::CreateInstance("vtkCellArray");
if(ret)
{
return (vtkCellArray*)ret;
}
// If the factory was unable to create the object, then create it here.
return new vtkCellArray;
}
vtkCellArray::vtkCellArray()
{
......
......@@ -68,7 +68,7 @@ public:
// Description:
// Instantiate cell array (connectivity list).
static vtkCellArray *New() {return new vtkCellArray;};
static vtkCellArray *New();
// Description:
// Allocate memory and set the size to extend by.
......
......@@ -39,6 +39,25 @@ MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
=========================================================================*/
#include "vtkCellData.h"
#include "vtkObjectFactory.h"
//------------------------------------------------------------------------------
vtkCellData* vtkCellData::New()
{
// First try to create the object from the vtkObjectFactory
vtkObject* ret = vtkObjectFactory::CreateInstance("vtkCellData");
if(ret)
{
return (vtkCellData*)ret;
}
// If the factory was unable to create the object, then create it here.
return new vtkCellData;
}
void vtkCellData::NullCell (int ptId)
{
......
......@@ -54,7 +54,7 @@ MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
class VTK_EXPORT vtkCellData : public vtkDataSetAttributes
{
public:
static vtkCellData *New() {return new vtkCellData;};
static vtkCellData *New();
const char *GetClassName() {return "vtkCellData";};
void PrintSelf(ostream& os, vtkIndent indent);
......
......@@ -40,6 +40,25 @@ MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
=========================================================================*/
#include "vtkCellLinks.h"
#include "vtkDataSet.h"
#include "vtkObjectFactory.h"
//------------------------------------------------------------------------------
vtkCellLinks* vtkCellLinks::New()
{
// First try to create the object from the vtkObjectFactory
vtkObject* ret = vtkObjectFactory::CreateInstance("vtkCellLinks");
if(ret)
{
return (vtkCellLinks*)ret;
}
// If the factory was unable to create the object, then create it here.
return new vtkCellLinks;
}
void vtkCellLinks::Allocate(int sz, int ext)
{
......
......@@ -62,7 +62,7 @@ struct _vtkLink_s {
class VTK_EXPORT vtkCellLinks : public vtkObject
{
public:
static vtkCellLinks *New() {return new vtkCellLinks;};
static vtkCellLinks *New();
const char *GetClassName() {return "vtkCellLinks";};
// Description:
......
......@@ -39,6 +39,25 @@ MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
=========================================================================*/
#include "vtkCellTypes.h"
#include "vtkObjectFactory.h"
//------------------------------------------------------------------------------
vtkCellTypes* vtkCellTypes::New()
{
// First try to create the object from the vtkObjectFactory
vtkObject* ret = vtkObjectFactory::CreateInstance("vtkCellTypes");
if(ret)
{
return (vtkCellTypes*)ret;
}
// If the factory was unable to create the object, then create it here.
return new vtkCellTypes;
}
vtkCellTypes::~vtkCellTypes()
{
......
......@@ -70,7 +70,7 @@ struct _vtkCell_s {
class VTK_EXPORT vtkCellTypes : public vtkObject
{
public:
static vtkCellTypes *New() {return new vtkCellTypes;};
static vtkCellTypes *New();
const char *GetClassName() {return "vtkCellTypes";};
// Description:
......
......@@ -39,6 +39,25 @@ MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
=========================================================================*/
#include "vtkCharArray.h"
#include "vtkObjectFactory.h"
//------------------------------------------------------------------------------
vtkCharArray* vtkCharArray::New()
{
// First try to create the object from the vtkObjectFactory
vtkObject* ret = vtkObjectFactory::CreateInstance("vtkCharArray");
if(ret)
{
return (vtkCharArray*)ret;
}
// If the factory was unable to create the object, then create it here.
return new vtkCharArray;
}
// Instantiate object.
vtkCharArray::vtkCharArray(int numComp)
......
......@@ -52,7 +52,7 @@ MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
class VTK_EXPORT vtkCharArray : public vtkDataArray
{
public:
static vtkCharArray *New() {return new vtkCharArray;};
static vtkCharArray *New();
const char *GetClassName() {return "vtkCharArray";};
void PrintSelf(ostream& os, vtkIndent indent);
......
......@@ -42,6 +42,25 @@ MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
#include <math.h>
#include "vtkCollection.h"
#include "vtkObjectFactory.h"
//------------------------------------------------------------------------------
vtkCollection* vtkCollection::New()
{
// First try to create the object from the vtkObjectFactory
vtkObject* ret = vtkObjectFactory::CreateInstance("vtkCollection");
if(ret)
{
return (vtkCollection*)ret;
}
// If the factory was unable to create the object, then create it here.
return new vtkCollection;
}
// Construct with empty list.
vtkCollection::vtkCollection()
......
......@@ -74,7 +74,7 @@ public:
// Description:
// Construct with empty list.
static vtkCollection *New() {return new vtkCollection;};
static vtkCollection *New();
// Description:
// Add an object to the list. Does not prevent duplicate entries.
......
......@@ -40,6 +40,25 @@ MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
=========================================================================*/
#include "vtkContourValues.h"
#include "vtkFloatArray.h"
#include "vtkObjectFactory.h"
//------------------------------------------------------------------------------
vtkContourValues* vtkContourValues::New()
{
// First try to create the object from the vtkObjectFactory
vtkObject* ret = vtkObjectFactory::CreateInstance("vtkContourValues");
if(ret)
{
return (vtkContourValues*)ret;
}
// If the factory was unable to create the object, then create it here.
return new vtkContourValues;
}
// Construct object with a single contour value at 0.0.
vtkContourValues::vtkContourValues()
......
......@@ -60,7 +60,7 @@ class VTK_EXPORT vtkContourValues : public vtkObject
public:
// Description:
// Construct object with a single contour value at 0.0.
static vtkContourValues *New() {return new vtkContourValues;};
static vtkContourValues *New();
const char *GetClassName() {return "vtkContourValues";};
void PrintSelf(ostream& os, vtkIndent indent);
......
......@@ -40,6 +40,25 @@ MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
#include "vtkCoordinate.h"
#include "vtkViewport.h"
#include "vtkObjectFactory.h"
//------------------------------------------------------------------------------
vtkCoordinate* vtkCoordinate::New()
{
// First try to create the object from the vtkObjectFactory
vtkObject* ret = vtkObjectFactory::CreateInstance("vtkCoordinate");
if(ret)
{
return (vtkCoordinate*)ret;
}
// If the factory was unable to create the object, then create it here.
return new vtkCoordinate;
}
#define VTK_RINT(x) ((x > 0.0) ? (int)(x + 0.5) : (int)(x - 0.5))
......
......@@ -90,7 +90,7 @@ public:
// Description:
// Creates an instance of this class with the following defaults:
// value of (0,0,0) in world coordinates.
static vtkCoordinate* New() {return new vtkCoordinate;};
static vtkCoordinate* New();
// Description:
// Set/get the coordinate system which this coordinate
......
......@@ -39,6 +39,25 @@ MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
=========================================================================*/
#include "vtkDataInformation.h"
#include "vtkObjectFactory.h"
//------------------------------------------------------------------------------
vtkDataInformation* vtkDataInformation::New()
{
// First try to create the object from the vtkObjectFactory
vtkObject* ret = vtkObjectFactory::CreateInstance("vtkDataInformation");
if(ret)
{
return (vtkDataInformation*)ret;
}
// If the factory was unable to create the object, then create it here.
return new vtkDataInformation;
}
//----------------------------------------------------------------------------
// Construct a new vtkDataInformation
......
......@@ -54,7 +54,7 @@ MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
class VTK_EXPORT vtkDataInformation : public vtkObject
{
public:
static vtkDataInformation *New() {return new vtkDataInformation;};
static vtkDataInformation *New();
const char *GetClassName() {return "vtkDataInformation";}
void PrintSelf(ostream& os, vtkIndent indent);
......
......@@ -43,6 +43,25 @@ MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
#include "vtkSource.h"
#include "vtkExtent.h"
#include "vtkDataInformation.h"
#include "vtkObjectFactory.h"
//------------------------------------------------------------------------------
vtkDataObject* vtkDataObject::New()
{
// First try to create the object from the vtkObjectFactory
vtkObject* ret = vtkObjectFactory::CreateInstance("vtkDataObject");
if(ret)
{
return (vtkDataObject*)ret;
}
// If the factory was unable to create the object, then create it here.
return new vtkDataObject;
}