VTK
|
00001 /*========================================================================= 00002 00003 Program: Visualization Toolkit 00004 Module: vtkPistonReference.h 00005 00006 Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen 00007 All rights reserved. 00008 See Copyright.txt or http://www.kitware.com/Copyright.htm for details. 00009 00010 This software is distributed WITHOUT ANY WARRANTY; without even 00011 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 00012 PURPOSE. See the above copyright notice for more information. 00013 00014 =========================================================================*/ 00030 #ifndef VTKPistonReference_H_ 00031 #define VTKPistonReference_H_ 00032 00033 namespace vtkpiston { 00034 void DeleteData(vtkPistonReference *tr); 00035 void DeepCopy(vtkPistonReference *self, vtkPistonReference *other); 00036 } 00037 00038 class vtkPistonReference { 00039 public: 00040 00041 vtkPistonReference() : mtime(0), type(-1), data(NULL) 00042 { 00043 //cerr << "TR(" << this << ") CREATE" << endl; 00044 } 00045 00046 ~vtkPistonReference() 00047 { 00048 //cerr << "TR(" << this << ") DELETE" << endl; 00049 vtkpiston::DeleteData(this); 00050 } 00051 00052 vtkPistonReference(vtkPistonReference *other) 00053 { 00054 //cerr << "TR(" << this << ") DEEP COPY" << endl; 00055 vtkpiston::DeepCopy(this, other); 00056 } 00057 00058 unsigned long int mtime; //creation time of the data 00059 int type; //description of what data holds 00060 void *data; //the payload on GPU 00061 }; 00062 00063 #endif /* VTKPistonReference_H_ */ 00064 // VTK-HeaderTest-Exclude: vtkPistonReference.h