HDF5 C++ API  1.8.12
 All Classes Namespaces Files Functions Variables Typedefs Macros Pages
H5AtomType.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 __H5AtomType_H
18 #define __H5AtomType_H
19 
20 #ifndef H5_NO_NAMESPACE
21 namespace H5 {
22 #endif
23 
31 class H5_DLLCPP AtomType : public DataType {
32  public:
33  // Returns the byte order of an atomic datatype.
34  H5T_order_t getOrder() const;
35  H5T_order_t getOrder( H5std_string& order_string ) const;
36 
37  // Sets the byte ordering of an atomic datatype.
38  void setOrder( H5T_order_t order ) const;
39 
40  // Retrieves the bit offset of the first significant bit.
41  // 12/05/00 - changed return type to int from size_t - C API
42  int getOffset() const;
43 
44  // Sets the bit offset of the first significant bit.
45  void setOffset( size_t offset ) const;
46 
47  // Retrieves the padding type of the least and most-significant bit padding.
48  void getPad( H5T_pad_t& lsb, H5T_pad_t& msb ) const;
49 
50  // Sets the least and most-significant bits padding types
51  void setPad( H5T_pad_t lsb, H5T_pad_t msb ) const;
52 
53  // Returns the precision of an atomic datatype.
54  size_t getPrecision() const;
55 
56  // Sets the precision of an atomic datatype.
57  void setPrecision( size_t precision ) const;
58 
59  // Sets the total size for an atomic datatype.
60  void setSize( size_t size ) const;
61 
63  virtual H5std_string fromClass () const { return("AtomType"); }
64 
65 #ifndef DOXYGEN_SHOULD_SKIP_THIS
66  // Copy constructor - makes copy of the original object
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 #ifndef H5_NO_NAMESPACE
83 }
84 #endif
85 #endif // __H5AtomType_H
#define H5std_string
Definition: H5Exception.h:29
virtual H5std_string fromClass() const
Returns this class name.
Definition: H5AtomType.h:63
Class DataType provides generic operations on HDF5 datatypes.
Definition: H5DataType.h:34
Class AtomType is a base class, inherited by IntType, FloatType, StrType, and PredType.
Definition: H5AtomType.h:31