VTK
|
00001 /*========================================================================= 00002 00003 Program: Visualization Toolkit 00004 Module: ObjectFactory.cxx 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 =========================================================================*/ 00015 00016 #ifndef __vtkDaxObjectFactory_h 00017 #define __vtkDaxObjectFactory_h 00018 00019 #include "vtkAcceleratorsDaxModule.h" //required for correct implementation 00020 00021 #include "vtkObjectFactory.h" 00022 #include "vtkObjectFactoryCollection.h" //required to make a factory 00023 #include "vtkOverrideInformation.h" //required to make a factory 00024 #include "vtkOverrideInformationCollection.h" //required to make a factory 00025 #include "vtkVersion.h" //required to make a factory 00026 00027 #include "vtkDaxThreshold.h" //required to overload Threshold 00028 VTK_CREATE_CREATE_FUNCTION(vtkDaxThreshold) 00029 00030 #include "vtkDaxMarchingCubes.h" //required to overload Marching Cubes 00031 VTK_CREATE_CREATE_FUNCTION(vtkDaxMarchingCubes) 00032 00033 class VTKACCELERATORSDAX_EXPORT vtkDaxObjectFactory : public vtkObjectFactory 00034 { 00035 public: 00036 static vtkDaxObjectFactory* New(); 00037 00038 virtual const char* GetVTKSourceVersion() { return VTK_SOURCE_VERSION; } 00039 const char* GetDescription() { return "Dax Object Factory"; } 00040 vtkTypeMacro(vtkDaxObjectFactory,vtkObjectFactory) 00041 00042 void PrintSelf(ostream& os, vtkIndent indent) 00043 { 00044 this->Superclass::PrintSelf(os,indent); 00045 } 00046 00047 protected: 00048 vtkDaxObjectFactory(); 00049 00050 private: 00051 vtkDaxObjectFactory(const vtkDaxObjectFactory&); // Not implemented 00052 void operator=(const vtkDaxObjectFactory&); // Not implemented 00053 }; 00054 00055 00056 vtkDaxObjectFactory::vtkDaxObjectFactory() 00057 { 00058 this->RegisterOverride("vtkThreshold", 00059 "vtkDaxThreshold", 00060 "Override threshold with Dax threshold version", 00061 1, 00062 vtkObjectFactoryCreatevtkDaxThreshold); 00063 00064 this->RegisterOverride("vtkMarchingCubes", 00065 "vtkDaxMarchingCubes", 00066 "Override marching cubes Dax threshold version", 00067 1, 00068 vtkObjectFactoryCreatevtkDaxThreshold); 00069 } 00070 00071 vtkStandardNewMacro(vtkDaxObjectFactory) 00072 #endif