15 #ifndef vtkMultiBlockPLOT3DReaderInternals_h
16 #define vtkMultiBlockPLOT3DReaderInternals_h
19 #include "vtkIOParallelModule.h"
31 # define vtk_fseek _fseeki64
32 # define vtk_ftell _ftelli64
33 # define vtk_off_t __int64
35 # define vtk_fseek fseek
36 # define vtk_ftell ftell
37 # define vtk_off_t long
47 memset(this->
Values, 0, 3*
sizeof(
int));
54 std::vector<vtkSmartPointer<vtkStructuredGrid> >
Blocks;
85 int ReadInts(FILE* fp,
int n,
int* val);
109 vtkIdType nPtsInPlane = static_cast<vtkIdType>(wextent[1]+1)*(wextent[3]+1);
110 preskip = nPtsInPlane *
extent[4];
111 postskip = nPtsInPlane * (wextent[5] -
extent[5]);
117 class Plot3DException :
public std::exception
134 vtkTypeUInt64 HeaderOffset;
135 vtkTypeUInt64 FooterOffset;
138 typedef std::vector<vtkSubRecord> VectorOfSubRecords;
139 VectorOfSubRecords SubRecords;
151 static const int SubRecordSeparatorWidth =
sizeof(
int) * 2;
162 bool Initialize(FILE* fp, vtkTypeUInt64
offset,
172 return (this->SubRecords.size()==0 || this->SubRecords.front().HeaderOffset ==
offset);
181 return (this->SubRecords.size()==0 ||
182 (this->SubRecords.back().FooterOffset +
sizeof(
int) ==
offset));
188 SubRecordSeparators GetSubRecordSeparators(vtkTypeUInt64 startOffset, vtkTypeUInt64
length)
const;
195 static std::vector<std::pair<vtkTypeUInt64, vtkTypeUInt64> > GetChunksToRead(
196 vtkTypeUInt64 start, vtkTypeUInt64
length,
const std::vector<vtkTypeUInt64> &markers);
203 vtkTypeUInt64 GetLengthWithSeparators(vtkTypeUInt64 start, vtkTypeUInt64
length)
const;
206 vtkTypeUInt64 start, vtkTypeUInt64
length)
const
208 return this->GetChunksToRead(start,
length, this->GetSubRecordSeparators(start,
length));