Commit c6344b7a authored by Brad King's avatar Brad King

ENH: All unimplemented copy constructors and assignment operators made private...

ENH: All unimplemented copy constructors and assignment operators made private so that errors will show up at compile time instead of link time.  Since they are not implemented, they can never be called, so they should be private instead of protected.
parent 5e8cbe2f
......@@ -120,13 +120,14 @@ public:
protected:
vtkAbstractMapper();
~vtkAbstractMapper();
vtkAbstractMapper(const vtkAbstractMapper&);
void operator=(const vtkAbstractMapper&);
vtkTimerLog *Timer;
float TimeToDraw;
vtkWindow *LastWindow; // Window used for the previous render
vtkPlaneCollection *ClippingPlanes;
private:
vtkAbstractMapper(const vtkAbstractMapper&); // Not implemented.
void operator=(const vtkAbstractMapper&); // Not implemented.
};
#endif
......
......@@ -292,8 +292,6 @@ public:
protected:
vtkAbstractTransform();
~vtkAbstractTransform();
vtkAbstractTransform(const vtkAbstractTransform&);
void operator=(const vtkAbstractTransform&);
// Description:
// Perform any subclass-specific Update.
......@@ -327,6 +325,10 @@ private:
vtkAbstractTransform *MyInverse;
int InUnRegister;
private:
vtkAbstractTransform(const vtkAbstractTransform&); // Not implemented.
void operator=(const vtkAbstractTransform&); // Not implemented.
};
//BTX
......
......@@ -144,14 +144,15 @@ public:
protected:
vtkActor2D();
~vtkActor2D();
vtkActor2D(const vtkActor2D&);
void operator=(const vtkActor2D&);
vtkMapper2D *Mapper;
int LayerNumber;
vtkProperty2D *Property;
vtkCoordinate *PositionCoordinate;
vtkCoordinate *Position2Coordinate;
private:
vtkActor2D(const vtkActor2D&); // Not implemented.
void operator=(const vtkActor2D&); // Not implemented.
};
#endif
......
......@@ -98,8 +98,6 @@ class VTK_COMMON_EXPORT vtkActor2DCollection : public vtkPropCollection
protected:
vtkActor2DCollection() {};
~vtkActor2DCollection();
vtkActor2DCollection(const vtkActor2DCollection&);
void operator=(const vtkActor2DCollection&);
virtual void DeleteElement(vtkCollectionElement *);
......@@ -109,6 +107,9 @@ private:
void AddItem(vtkProp *o) { this->vtkPropCollection::AddItem(o); };
int IsItemPresent(vtkObject *o) { return this->vtkCollection::IsItemPresent(o); };
private:
vtkActor2DCollection(const vtkActor2DCollection&); // Not implemented.
void operator=(const vtkActor2DCollection&); // Not implemented.
};
inline int vtkActor2DCollection::IsItemPresent(vtkActor2D *a)
......
......@@ -105,13 +105,14 @@ public:
protected:
vtkAssemblyNode();
~vtkAssemblyNode();
vtkAssemblyNode(const vtkAssemblyNode &);
void operator=(const vtkAssemblyNode &);
vtkAssemblyNode(const vtkAssemblyNode&);
private:
vtkProp *Prop; //reference to vtkProp
vtkMatrix4x4 *Matrix; //associated matrix
private:
void operator=(const vtkAssemblyNode&); // Not implemented.
// Not implemented.
};
#endif
......@@ -116,8 +116,6 @@ public:
protected:
vtkAssemblyPath();
~vtkAssemblyPath();
vtkAssemblyPath(const vtkAssemblyPath &);
void operator=(const vtkAssemblyPath &);
void AddNode(vtkAssemblyNode *n); //Internal method adds assembly node
vtkTransform *Transform; //Used to perform matrix concatentation
......@@ -127,6 +125,9 @@ private:
// hide the standard AddItem from the user and the compiler.
void AddItem(vtkObject *o) { this->vtkCollection::AddItem(o); };
private:
vtkAssemblyPath(const vtkAssemblyPath&); // Not implemented.
void operator=(const vtkAssemblyPath&); // Not implemented.
};
#endif
......@@ -87,8 +87,6 @@ public:
protected:
vtkAssemblyPaths() {};
~vtkAssemblyPaths() {};
vtkAssemblyPaths(const vtkAssemblyPaths&);
void operator=(const vtkAssemblyPaths&);
private:
// hide the standard AddItem from the user and the compiler.
......@@ -97,6 +95,9 @@ private:
void RemoveItem(int i) { this->vtkCollection::RemoveItem(i); };
int IsItemPresent(vtkObject *o)
{ return this->vtkCollection::IsItemPresent(o);};
private:
vtkAssemblyPaths(const vtkAssemblyPaths&); // Not implemented.
void operator=(const vtkAssemblyPaths&); // Not implemented.
};
inline void vtkAssemblyPaths::AddItem(vtkAssemblyPath *p)
......
......@@ -138,11 +138,12 @@ protected:
vtkAttributeData();
vtkAttributeData(int dataType);
~vtkAttributeData();
vtkAttributeData(const vtkAttributeData&);
void operator=(const vtkAttributeData&);
vtkDataArray *Data; // Array which represents data
private:
vtkAttributeData(const vtkAttributeData&); // Not implemented.
void operator=(const vtkAttributeData&); // Not implemented.
};
......
......@@ -162,8 +162,6 @@ public:
protected:
vtkBitArray(vtkIdType numComp=1);
~vtkBitArray();
vtkBitArray(const vtkBitArray&);
void operator=(const vtkBitArray&);
unsigned char *Array; // pointer to data
unsigned char *ResizeAndExtend(const vtkIdType sz);
......@@ -178,6 +176,9 @@ private:
// hide superclass' DeepCopy() from the user and the compiler
void DeepCopy(vtkDataArray &da) {this->vtkDataArray::DeepCopy(&da);}
private:
vtkBitArray(const vtkBitArray&); // Not implemented.
void operator=(const vtkBitArray&); // Not implemented.
};
inline unsigned char *vtkBitArray::WritePointer(const vtkIdType id,
......
......@@ -211,8 +211,6 @@ public:
protected:
vtkByteSwap() {};
~vtkByteSwap() {};
vtkByteSwap(const vtkByteSwap&);
void operator=(const vtkByteSwap&);
private:
// Description:
......@@ -223,6 +221,9 @@ private:
static void Swap8Bytes(char* &data);
private:
vtkByteSwap(const vtkByteSwap&); // Not implemented.
void operator=(const vtkByteSwap&); // Not implemented.
};
......
......@@ -316,10 +316,11 @@ public:
protected:
vtkCell();
~vtkCell();
vtkCell(const vtkCell&);
void operator=(const vtkCell&);
float Bounds[6];
private:
vtkCell(const vtkCell&); // Not implemented.
void operator=(const vtkCell&); // Not implemented.
};
#endif
......
......@@ -111,11 +111,12 @@ public:
protected:
vtkCell3D():Triangulator(NULL) {}
~vtkCell3D();
vtkCell3D(const vtkCell3D&);
void operator=(const vtkCell3D&);
vtkOrderedTriangulator *Triangulator;
private:
vtkCell3D(const vtkCell3D&); // Not implemented.
void operator=(const vtkCell3D&); // Not implemented.
};
#endif
......
......@@ -240,13 +240,14 @@ protected:
vtkCellArray();
vtkCellArray (const vtkIdType sz, const int ext=1000);
~vtkCellArray();
vtkCellArray(const vtkCellArray&);
void operator=(const vtkCellArray&);
vtkIdType NumberOfCells;
vtkIdType InsertLocation; //keep track of current insertion point
vtkIdType TraversalLocation; //keep track of traversal position
vtkIdTypeArray *Ia;
private:
vtkCellArray(const vtkCellArray&); // Not implemented.
void operator=(const vtkCellArray&); // Not implemented.
};
......
......@@ -63,9 +63,10 @@ public:
protected:
vtkCellData() {}; //make sure constructor and desctructor are protected
~vtkCellData() {};
vtkCellData(const vtkCellData&);
void operator=(const vtkCellData&);
private:
vtkCellData(const vtkCellData&); // Not implemented.
void operator=(const vtkCellData&); // Not implemented.
};
#endif
......
......@@ -149,8 +149,6 @@ public:
protected:
vtkCellLinks():Array(NULL),Size(0),MaxId(-1),Extend(1000) {};
~vtkCellLinks();
vtkCellLinks(const vtkCellLinks&);
void operator=(const vtkCellLinks&);
// Description:
// Increment the count of the number of cells using the point.
......@@ -168,6 +166,9 @@ protected:
vtkIdType MaxId; // maximum index inserted thus far
vtkIdType Extend; // grow array by this point
_vtkLink_s *Resize(vtkIdType sz); // function to resize data
private:
vtkCellLinks(const vtkCellLinks&); // Not implemented.
void operator=(const vtkCellLinks&); // Not implemented.
};
......
......@@ -136,14 +136,15 @@ public:
protected:
vtkCellTypes();
~vtkCellTypes();
vtkCellTypes(const vtkCellTypes&);
void operator=(const vtkCellTypes&);
vtkUnsignedCharArray *TypeArray; // pointer to types array
vtkIntArray *LocationArray; // pointer to array of offsets
int Size; // allocated size of data
int MaxId; // maximum index inserted thus far
int Extend; // grow array by this point
private:
vtkCellTypes(const vtkCellTypes&); // Not implemented.
void operator=(const vtkCellTypes&); // Not implemented.
};
......
......@@ -187,8 +187,6 @@ public:
protected:
vtkCharArray(vtkIdType numComp=1);
~vtkCharArray();
vtkCharArray(const vtkCharArray&);
void operator=(const vtkCharArray&);
char *Array; // pointer to data
char *ResizeAndExtend(const vtkIdType sz); // function to resize data
......@@ -197,6 +195,9 @@ protected:
float *Tuple;
int SaveUserArray;
private:
vtkCharArray(const vtkCharArray&); // Not implemented.
void operator=(const vtkCharArray&); // Not implemented.
};
......
......@@ -130,8 +130,6 @@ public:
protected:
vtkCollection();
~vtkCollection();
vtkCollection(const vtkCollection&);
void operator=(const vtkCollection&);
virtual void DeleteElement(vtkCollectionElement *);
int NumberOfItems;
......@@ -139,6 +137,9 @@ protected:
vtkCollectionElement *Bottom;
vtkCollectionElement *Current;
private:
vtkCollection(const vtkCollection&);
void operator=(const vtkCollection&);
};
......
......@@ -109,11 +109,12 @@ public:
protected:
vtkContourValues();
~vtkContourValues();
vtkContourValues(const vtkContourValues&);
void operator=(const vtkContourValues&);
vtkFloatArray *Contours;
private:
vtkContourValues(const vtkContourValues&); // Not implemented.
void operator=(const vtkContourValues&); // Not implemented.
};
#endif
......@@ -163,8 +163,6 @@ public:
protected:
vtkCoordinate();
~vtkCoordinate();
vtkCoordinate(const vtkCoordinate&);
void operator=(const vtkCoordinate&);
float Value[3];
int CoordinateSystem;
......@@ -179,6 +177,9 @@ protected:
float ComputedFloatViewportValue[2];
float ComputedUserDefinedValue[3];
private:
vtkCoordinate(const vtkCoordinate&); // Not implemented.
void operator=(const vtkCoordinate&); // Not implemented.
};
#endif
......
......@@ -152,8 +152,9 @@ public:
protected:
vtkSimpleCriticalSection SimpleCriticalSection;
vtkCriticalSection() {};
vtkCriticalSection(const vtkCriticalSection&);
void operator=(const vtkCriticalSection&);
private:
vtkCriticalSection(const vtkCriticalSection&); // Not implemented.
void operator=(const vtkCriticalSection&); // Not implemented.
};
......
......@@ -371,8 +371,6 @@ protected:
// Construct object with default tuple dimension (number of components) of 1.
vtkDataArray(vtkIdType numComp=1);
~vtkDataArray();
vtkDataArray(const vtkDataArray&);
void operator=(const vtkDataArray&);
vtkLookupTable *LookupTable;
......@@ -389,6 +387,9 @@ private:
float* GetTupleN(const vtkIdType i, int n);
private:
vtkDataArray(const vtkDataArray&); // Not implemented.
void operator=(const vtkDataArray&); // Not implemented.
};
#endif
......@@ -338,8 +338,6 @@ protected:
vtkDataObject();
~vtkDataObject();
vtkDataObject(const vtkDataObject&);
void operator=(const vtkDataObject&);
// General field data associated with data object
vtkFieldData *FieldData;
......@@ -438,6 +436,9 @@ protected:
private:
// Helper method for the ShallowCopy and DeepCopy methods.
void InternalDataObjectCopy(vtkDataObject *src);
private:
vtkDataObject(const vtkDataObject&); // Not implemented.
void operator=(const vtkDataObject&); // Not implemented.
};
#endif
......