Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
VTK
VTK
Commits
d4f4b96f
Commit
d4f4b96f
authored
Oct 11, 1999
by
Bill Hoffman
Browse files
ENH: changed all static New methods to use the vtkObjectFactory
parent
de79eb27
Changes
1000
Hide whitespace changes
Inline
Side-by-side
Too many changes to show.
To preserve performance only
20 of 1000+
files are displayed.
Plain diff
Email patch
common/Makefile.in
View file @
d4f4b96f
...
...
@@ -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
\
...
...
common/vtkAbstractMapper.cxx
View file @
d4f4b96f
...
...
@@ -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
()
...
...
common/vtkAbstractMapper.h
View file @
d4f4b96f
...
...
@@ -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.
...
...
common/vtkActor2D.cxx
View file @
d4f4b96f
...
...
@@ -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)
...
...
common/vtkActor2D.h
View file @
d4f4b96f
...
...
@@ -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.
...
...
common/vtkActor2DCollection.cxx
View file @
d4f4b96f
...
...
@@ -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
)
...
...
common/vtkActor2DCollection.h
View file @
d4f4b96f
...
...
@@ -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:
...
...
common/vtkBitArray.cxx
View file @
d4f4b96f
...
...
@@ -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
)
...
...
common/vtkBitArray.h
View file @
d4f4b96f
...
...
@@ -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
);
...
...
common/vtkByteSwap.cxx
View file @
d4f4b96f
...
...
@@ -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
...
...
common/vtkByteSwap.h
View file @
d4f4b96f
...
...
@@ -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:
...
...
common/vtkCellArray.cxx
View file @
d4f4b96f
...
...
@@ -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
()
{
...
...
common/vtkCellArray.h
View file @
d4f4b96f
...
...
@@ -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.
...
...
common/vtkCellData.cxx
View file @
d4f4b96f
...
...
@@ -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
)
{
...
...
common/vtkCellData.h
View file @
d4f4b96f
...
...
@@ -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
);
...
...
common/vtkCellLinks.cxx
View file @
d4f4b96f
...
...
@@ -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
)
{
...
...
common/vtkCellLinks.h
View file @
d4f4b96f
...
...
@@ -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:
...
...
common/vtkCellTypes.cxx
View file @
d4f4b96f
...
...
@@ -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
()
{
...
...
common/vtkCellTypes.h
View file @
d4f4b96f
...
...
@@ -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:
...
...
common/vtkCharArray.cxx
View file @
d4f4b96f
...
...
@@ -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
)
...
...
Prev
1
2
3
4
5
…
50
Next
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment