foam to Tecplot360 converter
[OpenFOAM-1.6.x.git] / applications / utilities / postProcessing / dataConversion / foamToTecplot360 / tecio / tecsrc / DATAIO4.h
blob7e97dc98f646954e43808fccab76f31488ee2db0
1 /*
2 * NOTICE and LICENSE for Tecplot Input/Output Library (TecIO) - OpenFOAM
4 * Copyright (C) 1988-2009 Tecplot, Inc. All rights reserved worldwide.
6 * Tecplot hereby grants OpenCFD limited authority to distribute without
7 * alteration the source code to the Tecplot Input/Output library, known
8 * as TecIO, as part of its distribution of OpenFOAM and the
9 * OpenFOAM_to_Tecplot converter. Users of this converter are also hereby
10 * granted access to the TecIO source code, and may redistribute it for the
11 * purpose of maintaining the converter. However, no authority is granted
12 * to alter the TecIO source code in any form or manner.
14 * This limited grant of distribution does not supersede Tecplot, Inc.'s
15 * copyright in TecIO. Contact Tecplot, Inc. for further information.
17 * Tecplot, Inc.
18 * 3535 Factoria Blvd, Ste. 550
19 * Bellevue, WA 98006, USA
20 * Phone: +1 425 653 1200
21 * http://www.tecplot.com/
24 #ifndef DATAIO4_H
25 #define DATAIO4_H
27 ******************************************************************
28 ******************************************************************
29 ******* ********
30 ****** (C) 1988-2008 Tecplot, Inc. *******
31 ******* ********
32 ******************************************************************
33 ******************************************************************
36 #include <set>
38 #if defined EXTERN
39 #undef EXTERN
40 #endif
41 #if defined DATAIO4MODULE
42 #define EXTERN
43 #else
44 #define EXTERN extern
45 #endif
47 EXTERN double GetNextValue(FileStream_s *FileStream,
48 FieldDataType_e FieldDataType,
49 double Min,
50 double Max,
51 Boolean_t *IsOk);
52 EXTERN LgIndex_t GetNextI(FileStream_s *FileStream,
53 Boolean_t *IsOk);
54 EXTERN LgIndex_t GetIoFileInt(FileStream_s *FileStream,
55 short Version,
56 LgIndex_t Min,
57 LgIndex_t Max,
58 Boolean_t *IsOk);
59 EXTERN Boolean_t ReadInString(FileStream_s *FileStream,
60 short IVersion,
61 int MaxCharacters,
62 char **S,
63 Boolean_t ProcessData);
64 EXTERN void ReadByteBlock(FileStream_s *FileStream,
65 Boolean_t DoRead,
66 Byte_t *Buffer,
67 HgIndex_t StartIndex,
68 HgIndex_t NumValues,
69 Boolean_t *IsOk);
70 EXTERN void ReadInt16Block(FileStream_s *FileStream,
71 Boolean_t DoRead,
72 Int16_t *Buffer,
73 HgIndex_t StartIndex,
74 HgIndex_t NumValues,
75 Boolean_t *IsOk);
76 EXTERN void ReadInt16BlockToInt32(FileStream_s *FileStream,
77 Boolean_t DoRead,
78 Int32_t *Buffer,
79 HgIndex_t StartIndex,
80 HgIndex_t NumValues,
81 Boolean_t *IsOk);
82 EXTERN void ReadInt32Block(FileStream_s *FileStream,
83 Boolean_t DoRead,
84 Int32_t *Buffer,
85 HgIndex_t StartIndex,
86 HgIndex_t NumValues,
87 Boolean_t *IsOk);
88 EXTERN void ReadPureBlock(FileStream_s *FileStream,
89 Boolean_t DoRead,
90 void *Buffer,
91 FieldDataType_e FieldDataType,
92 HgIndex_t StartIndex,
93 HgIndex_t NumValues,
94 Boolean_t *IsOk);
95 EXTERN void ReadBlock(FileStream_s *FileStream,
96 FieldData_pa FieldData,
97 Boolean_t DoRead,
98 FieldDataType_e FieldDataTypeInFile,
99 HgIndex_t StartIndex,
100 HgIndex_t EndIndex,
101 Boolean_t *IsOk);
102 EXTERN void ReadClassicOrderedCCBlock(FileStream_s *DataFileStream,
103 FieldData_pa FieldData,
104 FieldDataType_e FieldDataTypeInFile,
105 LgIndex_t NumIPtsInFile,
106 LgIndex_t NumJPtsInFile,
107 LgIndex_t NumKPtsInFile,
108 Boolean_t *IsOk);
109 EXTERN Boolean_t ReadInDataFileTypeTitleAndVarNames(FileStream_s *FileStream,
110 short IVersion,
111 char **DataSetTitle,
112 DataFileType_e *FileType,
113 int *NumVars,
114 StringList_pa *VarNames);
115 EXTERN Boolean_t ReadInZoneHeader(FileStream_s *FileStream,
116 short IVersion,
117 ZoneSpec_s *ZoneSpec,
118 Set_pa IsVarCellCentered,
119 EntIndex_t NumVars,
120 Boolean_t *IsRawFNAvailable,
121 LgIndex_t *FNNumBndryConns);
122 EXTERN Boolean_t ReadInCustomLabels(FileStream_s *FileStream,
123 short IVersion,
124 Boolean_t OkToLoad,
125 StringList_pa *CustomLabelBase);
126 EXTERN Boolean_t ReadInUserRec(FileStream_s *FileStream,
127 short IVersion,
128 int MaxCharactersAllowed,
129 char **UserRec);
130 EXTERN Boolean_t ReadInAuxData(FileStream_s *FileStream,
131 short IVersion,
132 AuxData_pa AuxData);
133 EXTERN Boolean_t ReadInGeometry(FileStream_s *FileStream,
134 short IVersion,
135 Boolean_t OkToLoad,
136 Geom_s *G,
137 LgIndex_t MaxDataPts);
138 EXTERN Boolean_t ReadInText(FileStream_s *FileStream,
139 short IVersion,
140 Boolean_t OkToLoad,
141 Text_s *T,
142 LgIndex_t MaxTextLen);
144 * STDCALL since PreplotAsciiDatafile is sent to RegisterDataSetReader
145 * which can also be used by addons.
147 EXTERN Boolean_t STDCALL PreplotAsciiDatafile(char *CurFName,
148 char *BinaryFName,
149 char **MessageString);
150 EXTERN short GetInputVersion(FileStream_s *FileStream);
152 EXTERN Boolean_t WriteBinaryInt16BlockUnaligned(FileStream_s *FileStream,
153 Byte_t *Int16Values,
154 HgIndex_t NumValues,
155 Boolean_t ValuesInNativeOrdering);
156 EXTERN Boolean_t WriteBinaryInt32BlockUnaligned(FileStream_s *FileStream,
157 Byte_t *Int32Values,
158 HgIndex_t NumValues,
159 Boolean_t ValuesInNativeOrdering);
160 EXTERN Boolean_t WriteBinaryByteBlock(FileStream_s *FileStream,
161 const Byte_t *ByteValues,
162 const HgIndex_t NumValues);
163 EXTERN Boolean_t WriteBinaryInt16(FileStream_s *FileStream,
164 Int16_t Value);
165 EXTERN Boolean_t WriteBinaryInt32(FileStream_s *FileStream,
166 Int32_t Value);
167 EXTERN Boolean_t WriteBinaryReal(FileStream_s *FileStream,
168 double RR,
169 FieldDataType_e FieldDataType);
170 EXTERN Boolean_t WriteFieldDataType(FileStream_s *FileStream,
171 FieldDataType_e FDT,
172 Boolean_t WriteBinary);
173 EXTERN Boolean_t WriteBinaryFieldDataBlock(FileStream_s *FileStream,
174 FieldData_pa D,
175 LgIndex_t StartI,
176 LgIndex_t NumValues);
177 EXTERN Boolean_t WriteCCFieldDataBlock(FileStream_s *FileStream,
178 FieldData_pa FieldData,
179 Boolean_t IsOrderedData,
180 LgIndex_t NumIPts,
181 LgIndex_t NumJPts,
182 LgIndex_t NumKPts,
183 Boolean_t WriteBinary,
184 SmInteger_t AsciiPrecision);
185 EXTERN Boolean_t DumpDatafileString(FileStream_s *FileStream,
186 const char *S,
187 Boolean_t WriteBinary);
188 bool DumpGeometry(FileStream_s* FileStream,
189 Geom_s const* Geom,
190 Boolean_t WriteBinary,
191 Boolean_t WriteGridDataAsPolar);
192 bool DumpText(FileStream_s* FileStream,
193 Text_s const* Text,
194 Boolean_t WriteBinary,
195 Boolean_t WriteGridDataAsPolar);
196 EXTERN Boolean_t DumpCustomAxisLabels(FileStream_s *FileStream,
197 Boolean_t WriteBinary,
198 StringList_pa LabelBase);
200 #if defined TECPLOTKERNEL
201 /* CORE SOURCE CODE REMOVED */
202 #endif
204 #if defined TECPLOTKERNEL
205 /* CORE SOURCE CODE REMOVED */
206 #endif
208 EXTERN Boolean_t WriteBinaryMagic(FileStream_s *FileStream);
210 bool writeBinaryVersionNumber(FileStream_s& fileStream,
211 int versionNumber);
213 #endif //DATAIO4_H