MISR Toolkit  1.5.1
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 COPYING file, which can be found at the root of the source code *
10  * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
11  * If you do not have access to either file, you may request a copy from *
12  * help@hdfgroup.org. *
13  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
14 
15 #ifndef __H5FloatType_H
16 #define __H5FloatType_H
17 
18 namespace H5 {
19 
24 // Inheritance: AtomType -> DataType -> H5Object -> H5Location -> IdComponent
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  // Constructors that open an HDF5 float datatype, given a location.
34  FloatType(const H5Location& loc, const char* name);
35  FloatType(const H5Location& loc, const H5std_string& name);
36 
37  // Returns an FloatType object via DataType* by decoding the
38  // binary object description of this type.
39  virtual DataType* decode() const;
40 
41  // Retrieves the exponent bias of a floating-point type.
42  size_t getEbias() const;
43 
44  // Sets the exponent bias of a floating-point type.
45  void setEbias(size_t ebias) const;
46 
47  // Retrieves floating point datatype bit field information.
48  void getFields(size_t& spos, size_t& epos, size_t& esize, size_t& mpos, size_t& msize) const;
49 
50  // Sets locations and sizes of floating point bit fields.
51  void setFields(size_t spos, size_t epos, size_t esize, size_t mpos, size_t msize) const;
52 
53  // Retrieves the internal padding type for unused bits in floating-point datatypes.
54  H5T_pad_t getInpad(H5std_string& pad_string) const;
55 
56  // Fills unused internal floating point bits.
57  void setInpad(H5T_pad_t inpad) const;
58 
59  // Retrieves mantissa normalization of a floating-point datatype.
60  H5T_norm_t getNorm(H5std_string& norm_string) const;
61 
62  // Sets the mantissa normalization of a floating-point datatype.
63  void setNorm(H5T_norm_t norm) const;
64 
66  virtual H5std_string fromClass () const { return("FloatType"); }
67 
68  // Default constructor
69  FloatType();
70 
71  // Creates a floating-point datatype using an existing id.
72  FloatType(const hid_t existing_id);
73 
74  // Copy constructor: makes a copy of the original FloatType object.
75  FloatType(const FloatType& original);
76 
77  // Noop destructor.
78  virtual ~FloatType();
79 
80 }; // end of FloatType
81 } // namespace H5
82 
83 #endif // __H5FloatType_H
H5T_pad_t
Definition: H5Tpublic.h:125
#define H5_DLLCPP
Definition: H5api_adpt.h:262
Class PredType holds the definition of all the HDF5 predefined datatypes.
Definition: H5PredType.h:28
H5T_norm_t
Definition: H5Tpublic.h:66
Class DataType provides generic operations on HDF5 datatypes.
Definition: H5DataType.h:28
AtomType is a base class, inherited by IntType, FloatType, StrType, and PredType. ...
Definition: H5AtomType.h:28
H5Location is an abstract base class, providing a collection of wrappers of the C functions that take...
Definition: H5Location.h:42
Class DataSet operates on HDF5 datasets.
Definition: H5DataSet.h:28
HDFFCLIBAPI _fcd name
#define H5std_string
Definition: H5Exception.h:25
virtual H5std_string fromClass() const
Returns this class name.
Definition: H5FloatType.h:66
int hid_t
Definition: H5Ipublic.h:54
FloatType is a derivative of a DataType and operates on HDF5 floating point datatype.
Definition: H5FloatType.h:25

MISR Toolkit - Copyright © 2005 - 2020 Jet Propulsion Laboratory
Generated on Fri Jun 19 2020 22:49:52