My Project  1.12.2
H5PredType.h
1 // C++ informative line for the emacs editor: -*- C++ -*-
2 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
3  * Copyright by The HDF Group. *
4  * Copyright by the Board of Trustees of the University of Illinois. *
5  * All rights reserved. *
6  * *
7  * This file is part of HDF5. The full HDF5 copyright notice, including *
8  * terms governing use, modification, and redistribution, is contained in *
9  * the COPYING file, which can be found at the root of the source code *
10  * distribution tree, or in https://www.hdfgroup.org/licenses. *
11  * If you do not have access to either file, you may request a copy from *
12  * help@hdfgroup.org. *
13  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
14 
15 #ifndef H5PredType_H
16 #define H5PredType_H
17 
18 namespace H5 {
19 
27 // Inheritance: AtomType -> DataType -> H5Object -> H5Location -> IdComponent
28 class H5_DLLCPP PredType : public AtomType {
29  public:
31  virtual H5std_string
32  fromClass() const H5_OVERRIDE
33  {
34  return ("PredType");
35  }
36 
37  // Makes a copy of the predefined type and stores the new
38  // id in the left hand side object.
39  PredType &operator=(const PredType &rhs);
40 
41  // Copy constructor: same as the original PredType.
42  PredType(const PredType &original);
43 
44  // Noop destructor
45  virtual ~PredType() H5_OVERRIDE;
46 
50  void commit(H5Location &loc, const H5std_string &name);
54  void commit(H5Location &loc, const char *name);
58  bool committed();
59 
61  static const PredType &STD_I8BE;
62  static const PredType &STD_I8LE;
63  static const PredType &STD_I16BE;
64  static const PredType &STD_I16LE;
65  static const PredType &STD_I32BE;
66  static const PredType &STD_I32LE;
67  static const PredType &STD_I64BE;
68  static const PredType &STD_I64LE;
69  static const PredType &STD_U8BE;
70  static const PredType &STD_U8LE;
71  static const PredType &STD_U16BE;
72  static const PredType &STD_U16LE;
73  static const PredType &STD_U32BE;
74  static const PredType &STD_U32LE;
75  static const PredType &STD_U64BE;
76  static const PredType &STD_U64LE;
77  static const PredType &STD_B8BE;
78  static const PredType &STD_B8LE;
79  static const PredType &STD_B16BE;
80  static const PredType &STD_B16LE;
81  static const PredType &STD_B32BE;
82  static const PredType &STD_B32LE;
83  static const PredType &STD_B64BE;
84  static const PredType &STD_B64LE;
85  static const PredType &STD_REF_OBJ;
86  static const PredType &STD_REF_DSETREG;
87 
88  static const PredType &C_S1;
89  static const PredType &FORTRAN_S1;
90 
91  static const PredType &IEEE_F32BE;
92  static const PredType &IEEE_F32LE;
93  static const PredType &IEEE_F64BE;
94  static const PredType &IEEE_F64LE;
95 
96  static const PredType &UNIX_D32BE;
97  static const PredType &UNIX_D32LE;
98  static const PredType &UNIX_D64BE;
99  static const PredType &UNIX_D64LE;
100 
101  static const PredType &INTEL_I8;
102  static const PredType &INTEL_I16;
103  static const PredType &INTEL_I32;
104  static const PredType &INTEL_I64;
105  static const PredType &INTEL_U8;
106  static const PredType &INTEL_U16;
107  static const PredType &INTEL_U32;
108  static const PredType &INTEL_U64;
109  static const PredType &INTEL_B8;
110  static const PredType &INTEL_B16;
111  static const PredType &INTEL_B32;
112  static const PredType &INTEL_B64;
113  static const PredType &INTEL_F32;
114  static const PredType &INTEL_F64;
115 
116  static const PredType &ALPHA_I8;
117  static const PredType &ALPHA_I16;
118  static const PredType &ALPHA_I32;
119  static const PredType &ALPHA_I64;
120  static const PredType &ALPHA_U8;
121  static const PredType &ALPHA_U16;
122  static const PredType &ALPHA_U32;
123  static const PredType &ALPHA_U64;
124  static const PredType &ALPHA_B8;
125  static const PredType &ALPHA_B16;
126  static const PredType &ALPHA_B32;
127  static const PredType &ALPHA_B64;
128  static const PredType &ALPHA_F32;
129  static const PredType &ALPHA_F64;
130 
131  static const PredType &MIPS_I8;
132  static const PredType &MIPS_I16;
133  static const PredType &MIPS_I32;
134  static const PredType &MIPS_I64;
135  static const PredType &MIPS_U8;
136  static const PredType &MIPS_U16;
137  static const PredType &MIPS_U32;
138  static const PredType &MIPS_U64;
139  static const PredType &MIPS_B8;
140  static const PredType &MIPS_B16;
141  static const PredType &MIPS_B32;
142  static const PredType &MIPS_B64;
143  static const PredType &MIPS_F32;
144  static const PredType &MIPS_F64;
145 
146  static const PredType &NATIVE_CHAR;
147  static const PredType &NATIVE_SCHAR;
148  static const PredType &NATIVE_UCHAR;
149  static const PredType &NATIVE_SHORT;
150  static const PredType &NATIVE_USHORT;
151  static const PredType &NATIVE_INT;
152  static const PredType &NATIVE_UINT;
153  static const PredType &NATIVE_LONG;
154  static const PredType &NATIVE_ULONG;
155  static const PredType &NATIVE_LLONG;
156  static const PredType &NATIVE_ULLONG;
157  static const PredType &NATIVE_FLOAT;
158  static const PredType &NATIVE_DOUBLE;
159  static const PredType &NATIVE_LDOUBLE;
160  static const PredType &NATIVE_B8;
161  static const PredType &NATIVE_B16;
162  static const PredType &NATIVE_B32;
163  static const PredType &NATIVE_B64;
164  static const PredType &NATIVE_OPAQUE;
165  static const PredType &NATIVE_HSIZE;
166  static const PredType &NATIVE_HSSIZE;
167  static const PredType &NATIVE_HERR;
168  static const PredType &NATIVE_HBOOL;
169 
170  static const PredType &NATIVE_INT8;
171  static const PredType &NATIVE_UINT8;
172  static const PredType &NATIVE_INT16;
173  static const PredType &NATIVE_UINT16;
174  static const PredType &NATIVE_INT32;
175  static const PredType &NATIVE_UINT32;
176  static const PredType &NATIVE_INT64;
177  static const PredType &NATIVE_UINT64;
178 
179  // LEAST types
180  static const PredType &NATIVE_INT_LEAST8;
181  static const PredType &NATIVE_UINT_LEAST8;
182 
183  static const PredType &NATIVE_INT_LEAST16;
184  static const PredType &NATIVE_UINT_LEAST16;
185 
186  static const PredType &NATIVE_INT_LEAST32;
187  static const PredType &NATIVE_UINT_LEAST32;
188 
189  static const PredType &NATIVE_INT_LEAST64;
190  static const PredType &NATIVE_UINT_LEAST64;
191 
192  // FAST types
193  static const PredType &NATIVE_INT_FAST8;
194  static const PredType &NATIVE_UINT_FAST8;
195 
196  static const PredType &NATIVE_INT_FAST16;
197  static const PredType &NATIVE_UINT_FAST16;
198 
199  static const PredType &NATIVE_INT_FAST32;
200  static const PredType &NATIVE_UINT_FAST32;
201 
202  static const PredType &NATIVE_INT_FAST64;
203  static const PredType &NATIVE_UINT_FAST64;
204 
205 #ifndef DOXYGEN_SHOULD_SKIP_THIS
206 
207  // Deletes the PredType global constants
208  static void deleteConstants();
209 
210  // Dummy constant
211  static const PredType &PREDTYPE_CONST; // dummy constant
212 
213  protected:
214  // Default constructor
215  PredType();
216 
217  // Creates a pre-defined type using an HDF5 pre-defined constant
218  PredType(const hid_t predtype_id); // used by the library only
219 
220  private:
221  // Activates the creation of the PredType global constants
222  static PredType *getPredTypes();
223 
224  // Dynamically allocates PredType global constants
225  static void makePredTypes();
226 
227  // Dummy constant
228  static PredType *PREDTYPE_CONST_;
229 
230  // Declaration of pointers to constants
231  static PredType *STD_I8BE_;
232  static PredType *STD_I8LE_;
233  static PredType *STD_I16BE_;
234  static PredType *STD_I16LE_;
235  static PredType *STD_I32BE_;
236  static PredType *STD_I32LE_;
237  static PredType *STD_I64BE_;
238  static PredType *STD_I64LE_;
239  static PredType *STD_U8BE_;
240  static PredType *STD_U8LE_;
241  static PredType *STD_U16BE_;
242  static PredType *STD_U16LE_;
243  static PredType *STD_U32BE_;
244  static PredType *STD_U32LE_;
245  static PredType *STD_U64BE_;
246  static PredType *STD_U64LE_;
247  static PredType *STD_B8BE_;
248  static PredType *STD_B8LE_;
249  static PredType *STD_B16BE_;
250  static PredType *STD_B16LE_;
251  static PredType *STD_B32BE_;
252  static PredType *STD_B32LE_;
253  static PredType *STD_B64BE_;
254  static PredType *STD_B64LE_;
255  static PredType *STD_REF_OBJ_;
256  static PredType *STD_REF_DSETREG_;
257 
258  static PredType *C_S1_;
259  static PredType *FORTRAN_S1_;
260 
261  static PredType *IEEE_F32BE_;
262  static PredType *IEEE_F32LE_;
263  static PredType *IEEE_F64BE_;
264  static PredType *IEEE_F64LE_;
265 
266  static PredType *UNIX_D32BE_;
267  static PredType *UNIX_D32LE_;
268  static PredType *UNIX_D64BE_;
269  static PredType *UNIX_D64LE_;
270 
271  static PredType *INTEL_I8_;
272  static PredType *INTEL_I16_;
273  static PredType *INTEL_I32_;
274  static PredType *INTEL_I64_;
275  static PredType *INTEL_U8_;
276  static PredType *INTEL_U16_;
277  static PredType *INTEL_U32_;
278  static PredType *INTEL_U64_;
279  static PredType *INTEL_B8_;
280  static PredType *INTEL_B16_;
281  static PredType *INTEL_B32_;
282  static PredType *INTEL_B64_;
283  static PredType *INTEL_F32_;
284  static PredType *INTEL_F64_;
285 
286  static PredType *ALPHA_I8_;
287  static PredType *ALPHA_I16_;
288  static PredType *ALPHA_I32_;
289  static PredType *ALPHA_I64_;
290  static PredType *ALPHA_U8_;
291  static PredType *ALPHA_U16_;
292  static PredType *ALPHA_U32_;
293  static PredType *ALPHA_U64_;
294  static PredType *ALPHA_B8_;
295  static PredType *ALPHA_B16_;
296  static PredType *ALPHA_B32_;
297  static PredType *ALPHA_B64_;
298  static PredType *ALPHA_F32_;
299  static PredType *ALPHA_F64_;
300 
301  static PredType *MIPS_I8_;
302  static PredType *MIPS_I16_;
303  static PredType *MIPS_I32_;
304  static PredType *MIPS_I64_;
305  static PredType *MIPS_U8_;
306  static PredType *MIPS_U16_;
307  static PredType *MIPS_U32_;
308  static PredType *MIPS_U64_;
309  static PredType *MIPS_B8_;
310  static PredType *MIPS_B16_;
311  static PredType *MIPS_B32_;
312  static PredType *MIPS_B64_;
313  static PredType *MIPS_F32_;
314  static PredType *MIPS_F64_;
315 
316  static PredType *NATIVE_CHAR_;
317  static PredType *NATIVE_SCHAR_;
318  static PredType *NATIVE_UCHAR_;
319  static PredType *NATIVE_SHORT_;
320  static PredType *NATIVE_USHORT_;
321  static PredType *NATIVE_INT_;
322  static PredType *NATIVE_UINT_;
323  static PredType *NATIVE_LONG_;
324  static PredType *NATIVE_ULONG_;
325  static PredType *NATIVE_LLONG_;
326  static PredType *NATIVE_ULLONG_;
327  static PredType *NATIVE_FLOAT_;
328  static PredType *NATIVE_DOUBLE_;
329  static PredType *NATIVE_LDOUBLE_;
330  static PredType *NATIVE_B8_;
331  static PredType *NATIVE_B16_;
332  static PredType *NATIVE_B32_;
333  static PredType *NATIVE_B64_;
334  static PredType *NATIVE_OPAQUE_;
335  static PredType *NATIVE_HSIZE_;
336  static PredType *NATIVE_HSSIZE_;
337  static PredType *NATIVE_HERR_;
338  static PredType *NATIVE_HBOOL_;
339 
340  static PredType *NATIVE_INT8_;
341  static PredType *NATIVE_UINT8_;
342  static PredType *NATIVE_INT16_;
343  static PredType *NATIVE_UINT16_;
344  static PredType *NATIVE_INT32_;
345  static PredType *NATIVE_UINT32_;
346  static PredType *NATIVE_INT64_;
347  static PredType *NATIVE_UINT64_;
348 
349  // LEAST types
350  static PredType *NATIVE_INT_LEAST8_;
351  static PredType *NATIVE_UINT_LEAST8_;
352 
353  static PredType *NATIVE_INT_LEAST16_;
354  static PredType *NATIVE_UINT_LEAST16_;
355 
356  static PredType *NATIVE_INT_LEAST32_;
357  static PredType *NATIVE_UINT_LEAST32_;
358 
359  static PredType *NATIVE_INT_LEAST64_;
360  static PredType *NATIVE_UINT_LEAST64_;
361 
362  // FAST types
363  static PredType *NATIVE_INT_FAST8_;
364  static PredType *NATIVE_UINT_FAST8_;
365 
366  static PredType *NATIVE_INT_FAST16_;
367  static PredType *NATIVE_UINT_FAST16_;
368 
369  static PredType *NATIVE_INT_FAST32_;
370  static PredType *NATIVE_UINT_FAST32_;
371 
372  static PredType *NATIVE_INT_FAST64_;
373  static PredType *NATIVE_UINT_FAST64_;
374 
375 #endif // DOXYGEN_SHOULD_SKIP_THIS
376 
377 }; // end of PredType
378 } // namespace H5
379 
380 #endif // H5PredType_H
AtomType is a base class, inherited by IntType, FloatType, StrType, and PredType.
Definition: H5AtomType.h:28
H5Location is an abstract base class, added in version 1.8.12.
Definition: H5Location.h:31
Class PredType holds the definition of all the HDF5 predefined datatypes.
Definition: H5PredType.h:28
virtual H5std_string fromClass() const H5_OVERRIDE
Returns this class name.
Definition: H5PredType.h:32
Definition: H5AbstractDs.cpp:34


The HDF Group Help Desk:
  Copyright by The HDF Group
and the Board of Trustees of the University of Illinois