HDF5 C++ API  1.8.18
 All Classes Namespaces Functions Variables Typedefs Friends Pages
H5AtomType.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 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 __H5AtomType_H
18 #define __H5AtomType_H
19 
20 namespace H5 {
21 
29 class H5_DLLCPP AtomType : public DataType {
30  public:
31  // Returns the byte order of an atomic datatype.
32  H5T_order_t getOrder() const;
33  H5T_order_t getOrder( H5std_string& order_string ) const;
34 
35  // Sets the byte ordering of an atomic datatype.
36  void setOrder( H5T_order_t order ) const;
37 
38  // Retrieves the bit offset of the first significant bit.
39  // 12/05/00 - changed return type to int from size_t - C API
40  int getOffset() const;
41 
42  // Sets the bit offset of the first significant bit.
43  void setOffset( size_t offset ) const;
44 
45  // Retrieves the padding type of the least and most-significant bit padding.
46  void getPad( H5T_pad_t& lsb, H5T_pad_t& msb ) const;
47 
48  // Sets the least and most-significant bits padding types
49  void setPad( H5T_pad_t lsb, H5T_pad_t msb ) const;
50 
51  // Returns the precision of an atomic datatype.
52  size_t getPrecision() const;
53 
54  // Sets the precision of an atomic datatype.
55  void setPrecision( size_t precision ) const;
56 
57  // Sets the total size for an atomic datatype.
58  void setSize( size_t size ) const;
59 
61  virtual H5std_string fromClass () const { return("AtomType"); }
62 
63 #ifndef DOXYGEN_SHOULD_SKIP_THIS
64  // Copy constructor - makes copy of the original object
65  AtomType( const AtomType& original );
66 
67  // Noop destructor
68  virtual ~AtomType();
69 #endif // DOXYGEN_SHOULD_SKIP_THIS
70 
71  protected:
72 #ifndef DOXYGEN_SHOULD_SKIP_THIS
73  // Default constructor
74  AtomType();
75 
76  // Constructor that takes an existing id
77  AtomType( const hid_t existing_id );
78 #endif // DOXYGEN_SHOULD_SKIP_THIS
79 };
80 }
81 #endif // __H5AtomType_H
Class DataType provides generic operations on HDF5 datatypes.
Definition: H5DataType.h:32
AtomType is a base class, inherited by IntType, FloatType, StrType, and PredType. ...
Definition: H5AtomType.h:29
virtual H5std_string fromClass() const
Returns this class name.
Definition: H5AtomType.h:61


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