My Project  1.10.11
H5AtomType.h
1 // C++ informative line for the emacs editor: -*- C++ -*-
2 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
3  * Copyright by The HDF Group. *
4  * All rights reserved. *
5  * *
6  * This file is part of HDF5. The full HDF5 copyright notice, including *
7  * terms governing use, modification, and redistribution, is contained in *
8  * the COPYING file, which can be found at the root of the source code *
9  * distribution tree, or in https://www.hdfgroup.org/licenses. *
10  * If you do not have access to either file, you may request a copy from *
11  * help@hdfgroup.org. *
12  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
13 
14 #ifndef H5AtomType_H
15 #define H5AtomType_H
16 
17 namespace H5 {
18 
26 // Inheritance: DataType -> H5Object -> H5Location -> IdComponent
27 class H5_DLLCPP AtomType : public DataType {
28  public:
29  // Returns the byte order of an atomic datatype.
30  H5T_order_t getOrder() const;
31  H5T_order_t getOrder(H5std_string &order_string) const;
32 
33  // Sets the byte ordering of an atomic datatype.
34  void setOrder(H5T_order_t order) const;
35 
36  // Retrieves the bit offset of the first significant bit.
37  // 12/05/00 - changed return type to int from size_t - C API
38  int getOffset() const;
39 
40  // Sets the bit offset of the first significant bit.
41  void setOffset(size_t offset) const;
42 
43  // Retrieves the padding type of the least and most-significant bit padding.
44  void getPad(H5T_pad_t &lsb, H5T_pad_t &msb) const;
45 
46  // Sets the least and most-significant bits padding types
47  void setPad(H5T_pad_t lsb, H5T_pad_t msb) const;
48 
49  // Returns the precision of an atomic datatype.
50  size_t getPrecision() const;
51 
52  // Sets the precision of an atomic datatype.
53  void setPrecision(size_t precision) const;
54 
55  // Sets the total size for an atomic datatype.
56  void setSize(size_t size) const;
57 
59  virtual H5std_string
60  fromClass() const
61  {
62  return ("AtomType");
63  }
64 
65 #ifndef DOXYGEN_SHOULD_SKIP_THIS
66  // Copy constructor: same as the original AtomType.
67  AtomType(const AtomType &original);
68 
69  // Noop destructor
70  virtual ~AtomType();
71 #endif // DOXYGEN_SHOULD_SKIP_THIS
72 
73  protected:
74 #ifndef DOXYGEN_SHOULD_SKIP_THIS
75  // Default constructor
76  AtomType();
77 
78  // Constructor that takes an existing id
79  AtomType(const hid_t existing_id);
80 #endif // DOXYGEN_SHOULD_SKIP_THIS
81 
82 }; // end of AtomType
83 } // namespace H5
84 
85 #endif // H5AtomType_H
H5::AtomType
AtomType is a base class, inherited by IntType, FloatType, StrType, and PredType.
Definition: H5AtomType.h:27
H5::AtomType::setPrecision
void setPrecision(size_t precision) const
Sets the precision of an atomic datatype.
Definition: H5AtomType.cpp:190
H5::DataTypeIException
Definition: H5Exception.h:109
H5::AtomType::setOffset
void setOffset(size_t offset) const
Sets the bit offset of the first significant bit.
Definition: H5AtomType.cpp:236
H5::AtomType::getOffset
int getOffset() const
Retrieves the bit offset of the first significant bit.
Definition: H5AtomType.cpp:214
H5::AtomType::setSize
void setSize(size_t size) const
Sets the total size for an atomic datatype.
Definition: H5AtomType.cpp:70
H5::AtomType::getOrder
H5T_order_t getOrder() const
Returns the byte order of an atomic datatype.
Definition: H5AtomType.cpp:90
H5::AtomType::fromClass
virtual H5std_string fromClass() const
Returns this class name.
Definition: H5AtomType.h:60
H5::AtomType::setOrder
void setOrder(H5T_order_t order) const
Sets the byte ordering of an atomic datatype.
Definition: H5AtomType.cpp:146
H5
Definition: H5AbstractDs.cpp:33
H5::AtomType::setPad
void setPad(H5T_pad_t lsb, H5T_pad_t msb) const
Sets the least and most-significant bits padding types.
Definition: H5AtomType.cpp:283
H5::AtomType::getPad
void getPad(H5T_pad_t &lsb, H5T_pad_t &msb) const
Retrieves the padding type of the least and most-significant bit padding.
Definition: H5AtomType.cpp:260
H5::DataType
Class DataType provides generic operations on HDF5 datatypes.
Definition: H5DataType.h:27
H5::AtomType::getPrecision
size_t getPrecision() const
Returns the precision of an atomic datatype.
Definition: H5AtomType.cpp:167


The HDF Group Help Desk:
  Copyright by The HDF Group