cgma
|
00001 //- Class: TDCellIndex 00002 //- Owner: Ray Ostensen 00003 //- Description: This tool data contains the cellIndex used for sorting 00004 //- nodes in GridSearch 00005 //- Checked By: 00006 //- Version: 00007 00008 #ifndef TD_CELLINDEX_HPP 00009 #define TD_CELLINDEX_HPP 00010 00011 #include "ToolData.hpp" 00012 #include "MemoryManager.hpp" 00013 #include "CastTo.hpp" 00014 #include "CGMUtilConfigure.h" 00015 00016 class CUBIT_UTIL_EXPORT TDCellIndex : public virtual ToolData 00017 { 00018 private: 00019 00020 static MemoryManager memoryManager; 00021 //- memory management object 00022 00023 int cellIndex; 00024 00025 00026 public: 00027 00028 TDCellIndex(int cell_index = -1 ); 00029 virtual ~TDCellIndex() {} 00030 //-constructor and destructor 00031 00032 static int is_cell_index(const ToolData* td) 00033 {return (CAST_TO(const_cast<ToolData*>(td), TDCellIndex) != NULL);} 00034 00035 void cell_index ( int cell_index ) { cellIndex = cell_index; } 00036 int cell_index () { return cellIndex; } 00037 //- Heading: get/set member data 00038 00039 SetDynamicMemoryAllocation(memoryManager) 00040 //- class specific new and delete operators 00041 00042 static void set_memory_allocation_increment(int increment = 0) 00043 {memoryManager.set_memory_allocation_increment(increment);} 00044 //- set block memory size increment 00045 00046 static void destroy_memory() 00047 {memoryManager.destroy_memory();} 00048 //- destroy all memory allocted to this object 00049 00050 }; 00051 00052 inline TDCellIndex::TDCellIndex(int cell_index) : ToolData(), cellIndex(cell_index) 00053 {} 00054 00055 00056 00057 #endif // TD_CellIndex_HPP 00058 00059 00060 00061