HDF5 C++ API  1.8.12
 All Classes Namespaces Files Functions Variables Typedefs Macros Pages
H5FloatType.h
Go to the documentation of this file.
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 files COPYING and Copyright.html. COPYING can be found at the root *
10  * of the source code distribution tree; Copyright.html can be found at the *
11  * root level of an installed copy of the electronic HDF5 document set and *
12  * is linked from the top-level documents page. It can also be found at *
13  * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have *
14  * access to either file, you may request a copy from help@hdfgroup.org. *
15  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
16 
17 #ifndef __H5FloatType_H
18 #define __H5FloatType_H
19 
20 #ifndef H5_NO_NAMESPACE
21 namespace H5 {
22 #endif
23 
25 class H5_DLLCPP FloatType : public AtomType {
26  public:
27  // Creates a floating-point type using a predefined type.
28  FloatType( const PredType& pred_type );
29 
30  // Gets the floating-point datatype of the specified dataset.
31  FloatType( const DataSet& dataset );
32 
33  // Retrieves the exponent bias of a floating-point type.
34  size_t getEbias() const;
35 
36  // Sets the exponent bias of a floating-point type.
37  void setEbias( size_t ebias ) const;
38 
39  // Retrieves floating point datatype bit field information.
40  void getFields( size_t& spos, size_t& epos, size_t& esize, size_t& mpos, size_t& msize ) const;
41 
42  // Sets locations and sizes of floating point bit fields.
43  void setFields( size_t spos, size_t epos, size_t esize, size_t mpos, size_t msize ) const;
44 
45  // Retrieves the internal padding type for unused bits in floating-point datatypes.
46  H5T_pad_t getInpad( H5std_string& pad_string ) const;
47 
48  // Fills unused internal floating point bits.
49  void setInpad( H5T_pad_t inpad ) const;
50 
51  // Retrieves mantissa normalization of a floating-point datatype.
52  H5T_norm_t getNorm( H5std_string& norm_string ) const;
53 
54  // Sets the mantissa normalization of a floating-point datatype.
55  void setNorm( H5T_norm_t norm ) const;
56 
58  virtual H5std_string fromClass () const { return("FloatType"); }
59 
60  // Default constructor
61  FloatType();
62 
63  // Creates a floating-point datatype using an existing id.
64  FloatType( const hid_t existing_id );
65 
66  // Copy constructor: makes a copy of the original FloatType object.
67  FloatType( const FloatType& original );
68 
69  // Noop destructor.
70  virtual ~FloatType();
71 };
72 #ifndef H5_NO_NAMESPACE
73 }
74 #endif
75 #endif // __H5FloatType_H
Class DataSet operates on HDF5 datasets.
Definition: H5DataSet.h:31
virtual H5std_string fromClass() const
Returns this class name.
Definition: H5FloatType.h:58
Class PredType holds the definition of all the HDF5 predefined datatypes.
Definition: H5PredType.h:41
Class FloatType operates on HDF5 floating point datatype.
Definition: H5FloatType.h:25
#define H5std_string
Definition: H5Exception.h:29
Class AtomType is a base class, inherited by IntType, FloatType, StrType, and PredType.
Definition: H5AtomType.h:31