1 /*=========================================================================
2 
3   Program:   Visualization Toolkit
4   Module:    vtkCPExodusIIElementBlockCellIterator.h
5 
6   Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7   All rights reserved.
8   See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9 
10      This software is distributed WITHOUT ANY WARRANTY; without even
11      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12      PURPOSE.  See the above copyright notice for more information.
13 
14 =========================================================================*/
15 // .NAME vtkCPExodusIIElementBlockCellIterator - vtkCellIterator subclass
16 // specialized for vtkCPExodusIIElementBlock.
17 
18 #ifndef vtkCPExodusIIElementBlockCellIterator_h
19 #define vtkCPExodusIIElementBlockCellIterator_h
20 
21 #include "vtkCellIterator.h"
22 #include "vtkIOExodusModule.h" // For export macro
23 
24 #include "vtkSmartPointer.h" // For smart pointer
25 
26 class vtkCPExodusIIElementBlock;
27 class vtkCPExodusIIElementBlockPrivate;
28 
29 class VTKIOEXODUS_EXPORT vtkCPExodusIIElementBlockCellIterator
30     : public vtkCellIterator
31 {
32 public:
33   typedef vtkCPExodusIIElementBlockPrivate StorageType;
34 
35   static vtkCPExodusIIElementBlockCellIterator *New();
36   vtkTypeMacro(vtkCPExodusIIElementBlockCellIterator, vtkCellIterator)
37   void PrintSelf(ostream &os, vtkIndent indent);
38 
39   bool IsValid();
40   vtkIdType GetCellId();
41 
42 protected:
43   vtkCPExodusIIElementBlockCellIterator();
44   ~vtkCPExodusIIElementBlockCellIterator();
45 
46   void ResetToFirstCell();
47   void IncrementToNextCell();
48   void FetchCellType();
49   void FetchPointIds();
50   void FetchPoints();
51 
52   friend class ::vtkCPExodusIIElementBlock;
53   void SetStorage(vtkCPExodusIIElementBlock *eb);
54 
55 private:
56   vtkCPExodusIIElementBlockCellIterator(const vtkCPExodusIIElementBlockCellIterator &); // Not implemented.
57   void operator=(const vtkCPExodusIIElementBlockCellIterator &);   // Not implemented.
58 
59   vtkSmartPointer<StorageType> Storage;
60   vtkSmartPointer<vtkPoints> DataSetPoints;
61   vtkIdType CellId;
62 };
63 
64 #endif //vtkCPExodusIIElementBlockCellIterator_h
65