VTK
|
00001 /*========================================================================= 00002 00003 Program: Visualization Toolkit 00004 Module: vtkBlueObeliskData.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 =========================================================================*/ 00035 #ifndef __vtkBlueObeliskData_h 00036 #define __vtkBlueObeliskData_h 00037 00038 #include "vtkObject.h" 00039 #include "vtkNew.h" // For vtkNew 00040 00041 class vtkAbstractArray; 00042 class vtkFloatArray; 00043 class vtkStringArray; 00044 class vtkSimpleMutexLock; 00045 class vtkUnsignedShortArray; 00046 00047 // Hidden STL reference: vtkstd::vector<vtkAbstractArray*> 00048 class MyStdVectorOfVtkAbstractArrays; 00049 00050 class VTK_CHEMISTRY_EXPORT vtkBlueObeliskData : public vtkObject 00051 { 00052 public: 00053 vtkTypeMacro(vtkBlueObeliskData,vtkObject); 00054 void PrintSelf(ostream& os, vtkIndent indent); 00055 static vtkBlueObeliskData *New(); 00056 00061 void Initialize(); 00062 00064 bool IsInitialized() { return this->Initialized;} 00065 00067 00069 vtkGetObjectMacro(WriteMutex, vtkSimpleMutexLock); 00071 00073 00075 vtkGetMacro(NumberOfElements, unsigned short); 00077 00079 00080 vtkGetNewMacro(Symbols, vtkStringArray); 00081 vtkGetNewMacro(LowerSymbols, vtkStringArray); 00082 vtkGetNewMacro(Names, vtkStringArray); 00083 vtkGetNewMacro(LowerNames, vtkStringArray); 00084 vtkGetNewMacro(PeriodicTableBlocks, vtkStringArray); 00085 vtkGetNewMacro(ElectronicConfigurations, vtkStringArray); 00086 vtkGetNewMacro(Families, vtkStringArray); 00088 00089 vtkGetNewMacro(Masses, vtkFloatArray); 00090 vtkGetNewMacro(ExactMasses, vtkFloatArray); 00091 vtkGetNewMacro(IonizationEnergies, vtkFloatArray); 00092 vtkGetNewMacro(ElectronAffinities, vtkFloatArray); 00093 vtkGetNewMacro(PaulingElectronegativities, vtkFloatArray); 00094 vtkGetNewMacro(CovalentRadii, vtkFloatArray); 00095 vtkGetNewMacro(VDWRadii, vtkFloatArray); 00096 vtkGetNewMacro(DefaultColors, vtkFloatArray); 00097 vtkGetNewMacro(BoilingPoints, vtkFloatArray); 00098 vtkGetNewMacro(MeltingPoints, vtkFloatArray); 00099 00100 vtkGetNewMacro(Periods, vtkUnsignedShortArray); 00101 vtkGetNewMacro(Groups, vtkUnsignedShortArray); 00102 00103 protected: 00104 friend class vtkBlueObeliskDataParser; 00105 00106 vtkBlueObeliskData(); 00107 ~vtkBlueObeliskData(); 00108 00109 vtkSimpleMutexLock *WriteMutex; 00110 bool Initialized; 00111 00114 virtual int Allocate(vtkIdType sz, vtkIdType ext=1000); 00115 00117 virtual void Reset(); 00118 00120 virtual void Squeeze(); 00121 00122 unsigned short NumberOfElements; 00123 00124 // Lists all arrays 00125 MyStdVectorOfVtkAbstractArrays *Arrays; 00126 00127 // Atomic Symbols 00128 vtkNew<vtkStringArray> Symbols; 00129 vtkNew<vtkStringArray> LowerSymbols; 00130 00131 // Element Names 00132 vtkNew<vtkStringArray> Names; 00133 vtkNew<vtkStringArray> LowerNames; 00134 00135 // Misc Strings 00136 vtkNew<vtkStringArray> PeriodicTableBlocks; 00137 vtkNew<vtkStringArray> ElectronicConfigurations; 00138 vtkNew<vtkStringArray> Families; // Non-Metal, Noblegas, Metalloids, etc 00139 00140 // Misc Data 00141 vtkNew<vtkFloatArray> Masses; // amu 00142 vtkNew<vtkFloatArray> ExactMasses; // amu 00143 vtkNew<vtkFloatArray> IonizationEnergies; // eV 00144 vtkNew<vtkFloatArray> ElectronAffinities; // eV 00145 vtkNew<vtkFloatArray> PaulingElectronegativities; // eV 00146 vtkNew<vtkFloatArray> CovalentRadii; // Angstrom 00147 vtkNew<vtkFloatArray> VDWRadii; // Angstom 00148 vtkNew<vtkFloatArray> DefaultColors; // rgb 3-tuples, [0.0,1.0] 00149 vtkNew<vtkFloatArray> BoilingPoints; // K 00150 vtkNew<vtkFloatArray> MeltingPoints; // K 00151 vtkNew<vtkUnsignedShortArray> Periods; // Row of periodic table 00152 vtkNew<vtkUnsignedShortArray> Groups; // Column of periodic table 00153 00154 void PrintSelfIfExists(const char *, vtkObject *, ostream&, vtkIndent); 00155 00156 private: 00157 vtkBlueObeliskData(const vtkBlueObeliskData&); // Not implemented. 00158 void operator=(const vtkBlueObeliskData&); // Not implemented. 00159 }; 00160 00161 #endif