Commit a7400317 authored by Will Schroeder's avatar Will Schroeder

ENH:Added vtkTypeMacro to all classes

parent f834fd6a
......@@ -57,7 +57,7 @@ class vtkWindow;
class VTK_EXPORT vtkAbstractMapper : public vtkProcessObject
{
public:
const char *GetClassName() {return "vtkAbstractMapper";};
vtkTypeMacro(vtkAbstractMapper,vtkProcessObject);
void PrintSelf(ostream& os, vtkIndent indent);
// Description:
......
......@@ -61,7 +61,7 @@ class VTK_EXPORT vtkActor2D : public vtkProp
{
public:
void PrintSelf(ostream& os, vtkIndent indent);
const char *GetClassName() {return "vtkActor2D";};
vtkTypeMacro(vtkActor2D,vtkProp);
// Description:
// Creates an actor2D with the following defaults:
......
......@@ -62,7 +62,8 @@ class VTK_EXPORT vtkActor2DCollection : public vtkPropCollection
// Desctructor for the vtkActor2DCollection class. This removes all
// objects from the collection.
static vtkActor2DCollection *New();
const char *GetClassName() {return "vtkActor2DCollection";};
vtkTypeMacro(vtkActor2DCollection,vtkPropCollection);
// Description:
// Sorts the vtkActor2DCollection by layer number. Smaller layer
......
......@@ -57,7 +57,7 @@ MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
class VTK_EXPORT vtkAttributeData : public vtkObject
{
public:
const char *GetClassName() {return "vtkAttributeData";};
vtkTypeMacro(vtkAttributeData,vtkObject);
void PrintSelf(ostream& os, vtkIndent indent);
// Description:
......
......@@ -54,7 +54,7 @@ class VTK_EXPORT vtkBitArray : public vtkDataArray
{
public:
static vtkBitArray *New();
virtual const char *GetClassName() {return "vtkBitArray";};
vtkTypeMacro(vtkBitArray,vtkDataArray);
void PrintSelf(ostream& os, vtkIndent indent);
// Description:
......
......@@ -55,7 +55,7 @@ class VTK_EXPORT vtkByteSwap : public vtkObject
{
public:
static vtkByteSwap *New();
const char *GetClassName() {return "vtkByteSwap";};
vtkTypeMacro(vtkByteSwap,vtkObject);
// Description:
// Swap 2 byte word to be LE.
......
......@@ -79,7 +79,7 @@ class vtkCellData;
class VTK_EXPORT vtkCell : public vtkObject
{
public:
const char *GetClassName() {return "vtkCell";};
vtkTypeMacro(vtkCell,vtkObject);
void PrintSelf(ostream& os, vtkIndent indent);
// Description:
......
......@@ -64,7 +64,7 @@ MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
class VTK_EXPORT vtkCellArray : public vtkObject
{
public:
const char *GetClassName() {return "vtkCellArray";};
vtkTypeMacro(vtkCellArray,vtkObject);
// Description:
// Instantiate cell array (connectivity list).
......
......@@ -56,7 +56,7 @@ class VTK_EXPORT vtkCellData : public vtkDataSetAttributes
public:
static vtkCellData *New();
const char *GetClassName() {return "vtkCellData";};
vtkTypeMacro(vtkCellData,vtkDataSetAttributes);
void PrintSelf(ostream& os, vtkIndent indent);
// Description:
......
......@@ -64,7 +64,7 @@ class VTK_EXPORT vtkCellLinks : public vtkObject
{
public:
static vtkCellLinks *New();
const char *GetClassName() {return "vtkCellLinks";};
vtkTypeMacro(vtkCellLinks,vtkObject);
// Description:
// Allocate the specified number of links (i.e., number of points) that
......
......@@ -71,7 +71,7 @@ class VTK_EXPORT vtkCellTypes : public vtkObject
{
public:
static vtkCellTypes *New();
const char *GetClassName() {return "vtkCellTypes";};
vtkTypeMacro(vtkCellTypes,vtkObject);
// Description:
// Allocate memory for this array. Delete old storage only if necessary.
......
......@@ -54,7 +54,7 @@ class VTK_EXPORT vtkCharArray : public vtkDataArray
public:
static vtkCharArray *New();
const char *GetClassName() {return "vtkCharArray";};
vtkTypeMacro(vtkCharArray,vtkDataArray);
void PrintSelf(ostream& os, vtkIndent indent);
// Description:
......
......@@ -69,7 +69,7 @@ class vtkCollectionElement //;prevents pick-up by man page generator
class VTK_EXPORT vtkCollection : public vtkObject
{
public:
const char *GetClassName() {return "vtkCollection";};
vtkTypeMacro(vtkCollection,vtkObject);
void PrintSelf(ostream& os, vtkIndent indent);
// Description:
......
......@@ -62,7 +62,7 @@ public:
// Construct object with a single contour value at 0.0.
static vtkContourValues *New();
const char *GetClassName() {return "vtkContourValues";};
vtkTypeMacro(vtkContourValues,vtkObject);
void PrintSelf(ostream& os, vtkIndent indent);
// Description:
......
......@@ -84,7 +84,7 @@ class vtkViewport;
class VTK_EXPORT vtkCoordinate : public vtkObject
{
public:
const char *GetClassName() {return "vtkCoordinate";};
vtkTypeMacro(vtkCoordinate,vtkObject);
void PrintSelf(ostream& os, vtkIndent indent);
// Description:
......
......@@ -70,7 +70,7 @@ class vtkFloatArray;
class VTK_EXPORT vtkDataArray : public vtkObject
{
public:
const char *GetClassName() {return "vtkDataArray";};
vtkTypeMacro(vtkDataArray,vtkObject);
void PrintSelf(ostream& os, vtkIndent indent);
virtual int Allocate(const int sz, const int ext=1000) = 0;
......
/*=========================================================================
Program: Visualization Toolkit
Module: vtkDataInformation.h
Language: C++
Date: $Date$
Version: $Revision$
Copyright (c) 1993-1998 Ken Martin, Will Schroeder, Bill Lorensen.
This software is copyrighted by Ken Martin, Will Schroeder and Bill Lorensen.
The following terms apply to all files associated with the software unless
explicitly disclaimed in individual files. This copyright specifically does
not apply to the related textbook "The Visualization Toolkit" ISBN
013199837-4 published by Prentice Hall which is covered by its own copyright.
The authors hereby grant permission to use, copy, and distribute this
software and its documentation for any purpose, provided that existing
copyright notices are retained in all copies and that this notice is included
verbatim in any distributions. Additionally, the authors grant permission to
modify this software and its documentation for any purpose, provided that
such modifications are not distributed without the explicit consent of the
authors and that existing copyright notices are retained in all copies. Some
of the algorithms implemented by this software are patented, observe all
applicable patent law.
IN NO EVENT SHALL THE AUTHORS OR DISTRIBUTORS BE LIABLE TO ANY PARTY FOR
DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT
OF THE USE OF THIS SOFTWARE, ITS DOCUMENTATION, OR ANY DERIVATIVES THEREOF,
EVEN IF THE AUTHORS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
THE AUTHORS AND DISTRIBUTORS SPECIFICALLY DISCLAIM ANY WARRANTIES, INCLUDING,
BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
PARTICULAR PURPOSE, AND NON-INFRINGEMENT. THIS SOFTWARE IS PROVIDED ON AN
"AS IS" BASIS, AND THE AUTHORS AND DISTRIBUTORS HAVE NO OBLIGATION TO PROVIDE
MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
=========================================================================*/
// .NAME vtkDataInformation - Superclass of information objects.
// .SECTION Description
// Note: This object is under development an might change in the future.
// This class and its sublcasses encapsulate the information associated
// with vtkData objects into there own objects. The primary motivation
// for this division is for pipeline ports between mutiple processes.
#ifndef __vtkDataInformation_h
#define __vtkDataInformation_h
#include "vtkObject.h"
class VTK_EXPORT vtkDataInformation : public vtkObject
{
public:
static vtkDataInformation *New();
vtkTypeMacro(vtkDataInformation,vtkObject);
void PrintSelf(ostream& os, vtkIndent indent);
// Description:
// Makes an empty similar type object.
virtual vtkDataInformation *MakeObject() {return vtkDataInformation::New();}
// Description:
// Subclasses override this method, and try to be smart
// if the types are different.
virtual void Copy(vtkDataInformation *in);
// Description:
// This is a special value that may not be considered "DataInformation".
// it is just convenient to compute this value in the UpdateInformation
// calls. This value represents the mamimum MTimes of all upstream
// pipeline objects (not including this data object itself).
void SetPipelineMTime(unsigned long time) {this->PipelineMTime = time; }
vtkGetMacro(PipelineMTime, unsigned long);
// Description:
// This is set to the estimated size of the data object (in Kb)
// if the whole extent were updated.
// Setting this value does not change MTime because this value
// is automatically computed in
// vtkImageData::ComputeEstimatedWholeMemorySize.
void SetEstimatedWholeMemorySize(unsigned long size)
{this->EstimatedWholeMemorySize = size;};
vtkGetMacro(EstimatedWholeMemorySize, unsigned long);
// Description:
// Locality is a measure of how many filters (in this same process)
// are upstream of this filter. Alternatively, it is a crude measure
// of how long the processing should take to update our data.
// It is used to sort Update requests in multiple input filters to
// get the best possible parallel perfomance.
void SetLocality(float l) {this->Locality = l;};
vtkGetMacro(Locality, float);
// Description:
// Sources that can generate a series of data objects can communicate
// this down stream using this ivar.
vtkSetMacro(SeriesLength, int);
vtkGetMacro(SeriesLength, int);
// Description:
// This method is passed a ClassName and returns 1 if the object is
// a subclass of the class arg. It is an attempt at making a smarter copy.
virtual int GetClassCheck(char *className);
// Description:
// Serialization provided for the multi-process ports.
virtual void ReadSelf(istream& is);
virtual void WriteSelf(ostream& os);
protected:
vtkDataInformation();
~vtkDataInformation() {};
vtkDataInformation(vtkDataInformation&) {};
void operator=(vtkDataInformation&) {};
// A guess at how much memory would be consumed by the data object
// if the WholeExtent were updated.
unsigned long EstimatedWholeMemorySize;
// The Maximum MTime of all upstreamg filters and data objects.
// This does not include the MTime of this data object.
unsigned long PipelineMTime;
// How many upstream filters are local to the process.
// This will have to change to a float for Kens definition of locality.
float Locality;
// Support for processing series of data sets.
int SeriesLength;
};
#endif
......@@ -71,7 +71,7 @@ class VTK_EXPORT vtkDataObject : public vtkObject
public:
static vtkDataObject *New();
const char *GetClassName() {return "vtkDataObject";};
vtkTypeMacro(vtkDataObject,vtkObject);
void PrintSelf(ostream& os, vtkIndent indent);
// Description:
......
......@@ -72,7 +72,7 @@ MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
class VTK_EXPORT vtkDataSet : public vtkDataObject
{
public:
const char *GetClassName() {return "vtkDataSet";};
vtkTypeMacro(vtkDataSet,vtkDataObject);
void PrintSelf(ostream& os, vtkIndent indent);
// Description:
......
......@@ -65,7 +65,7 @@ public:
// Construct object with copying turned on for all data.
static vtkDataSetAttributes *New();
const char *GetClassName() {return "vtkDataSetAttributes";};
vtkTypeMacro(vtkDataSetAttributes,vtkObject);
void PrintSelf(ostream& os, vtkIndent indent);
// Description:
......
......@@ -53,7 +53,7 @@ class VTK_EXPORT vtkDataSetCollection : public vtkCollection
{
public:
static vtkDataSetCollection *New();
const char *GetClassName() {return "vtkDataSetCollection";};
vtkTypeMacro(vtkDataSetCollection,vtkCollection);
// Description:
// Add a dataset to the list.
......
......@@ -59,7 +59,7 @@ class VTK_EXPORT vtkDirectory : public vtkObject
public:
// Description:
// Return the class name as a string.
virtual const char *GetClassName() {return "vtkDirectory";};
vtkTypeMacro(vtkDirectory,vtkObject);
// Description:
// Create a new vtkDirectory object.
......
......@@ -54,7 +54,7 @@ class VTK_EXPORT vtkDoubleArray : public vtkDataArray
public:
static vtkDoubleArray *New();
const char *GetClassName() {return "vtkDoubleArray";};
vtkTypeMacro(vtkDoubleArray,vtkDataArray);
void PrintSelf(ostream& os, vtkIndent indent);
// Description:
......
......@@ -71,7 +71,7 @@ class VTK_EXPORT vtkDynamicLoader : public vtkObject
{
public:
static vtkDynamicLoader *New() {return new vtkDynamicLoader;};
const char *GetClassName() {return "vtkDynamicLoader";};
vtkTypeMacro(vtkDynamicLoader,vtkObject);
//BTX
// Description:
......
......@@ -60,7 +60,7 @@ public:
// Instantiate object assuming that 1000 edges are to be inserted.
static vtkEdgeTable *New();
const char *GetClassName() {return "vtkEdgeTable";};
vtkTypeMacro(vtkEdgeTable,vtkObject);
void PrintSelf(ostream& os, vtkIndent indent);
// Description:
......
......@@ -52,7 +52,7 @@ class VTK_EXPORT vtkEmptyCell : public vtkCell
{
public:
static vtkEmptyCell *New();
const char *GetClassName() {return "vtkEmptyCell";};
vtkTypeMacro(vtkEmptyCell,vtkCell);
// Description:
// See the vtkCell API for descriptions of these methods.
......
/*=========================================================================
Program: Visualization Toolkit
Module: vtkExtent.h
Language: C++
Date: $Date$
Version: $Revision$
Copyright (c) 1993-1998 Ken Martin, Will Schroeder, Bill Lorensen.
This software is copyrighted by Ken Martin, Will Schroeder and Bill Lorensen.
The following terms apply to all files associated with the software unless
explicitly disclaimed in individual files. This copyright specifically does
not apply to the related textbook "The Visualization Toolkit" ISBN
013199837-4 published by Prentice Hall which is covered by its own copyright.
The authors hereby grant permission to use, copy, and distribute this
software and its documentation for any purpose, provided that existing
copyright notices are retained in all copies and that this notice is included
verbatim in any distributions. Additionally, the authors grant permission to
modify this software and its documentation for any purpose, provided that
such modifications are not distributed without the explicit consent of the
authors and that existing copyright notices are retained in all copies. Some
of the algorithms implemented by this software are patented, observe all
applicable patent law.
IN NO EVENT SHALL THE AUTHORS OR DISTRIBUTORS BE LIABLE TO ANY PARTY FOR
DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT
OF THE USE OF THIS SOFTWARE, ITS DOCUMENTATION, OR ANY DERIVATIVES THEREOF,
EVEN IF THE AUTHORS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
THE AUTHORS AND DISTRIBUTORS SPECIFICALLY DISCLAIM ANY WARRANTIES, INCLUDING,
BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
PARTICULAR PURPOSE, AND NON-INFRINGEMENT. THIS SOFTWARE IS PROVIDED ON AN
"AS IS" BASIS, AND THE AUTHORS AND DISTRIBUTORS HAVE NO OBLIGATION TO PROVIDE
MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
=========================================================================*/
// .NAME vtkExtent - Generalizes imaging extents into graphics.
// .SECTION Description
// Note: This object is under development an might change in the future.
// vtkExtent contains information to specify update extents of vtkDataSets.
// This is a superclass. Two subclasses exist. One for structured data,
// and one for unstructured data. The extent object will also indicate
// whether the request is for points or cells.
#ifndef __vtkExtent_h
#define __vtkExtent_h
#include "vtkObject.h"
class vtkStructuredExtent;
class vtkUnstructuredExtent;
class VTK_EXPORT vtkExtent : public vtkObject
{
public:
static vtkExtent *New();
vtkTypeMacro(vtkExtent,vtkObject);
void PrintSelf(ostream& os, vtkIndent indent);
// Description:
// Copy information from one extent into another.
// Subclasses override this method, and try to be smart
// if the types are different.
virtual void Copy(vtkExtent *in);
// Description:
// We can use streaming to processes series of data sets one at a time.
vtkSetMacro(SeriesIndex, int);
vtkGetMacro(SeriesIndex, int);
// Description:
// Serialization provided for the multi-process ports.