HDF5 C++ API Reference Manual

- Main Page
- Namespaces
- Classes
- Files
- Examples

- File List
- File Members

# H5AtomType.h

Go to the documentation of this file.

    00001 // C++ informative line for the emacs editor: -*- C++ -*-
    00002 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
    00003  * Copyright by The HDF Group.                                               *
    00004  * Copyright by the Board of Trustees of the University of Illinois.         *
    00005  * All rights reserved.                                                      *
    00006  *                                                                           *
    00007  * This file is part of HDF5.  The full HDF5 copyright notice, including     *
    00008  * terms governing use, modification, and redistribution, is contained in    *
    00009  * the files COPYING and Copyright.html.  COPYING can be found at the root   *
    00010  * of the source code distribution tree; Copyright.html can be found at the  *
    00011  * root level of an installed copy of the electronic HDF5 document set and   *
    00012  * is linked from the top-level documents page.  It can also be found at     *
    00013  * http://hdfgroup.org/HDF5/doc/Copyright.html.  If you do not have          *
    00014  * access to either file, you may request a copy from help@hdfgroup.org.     *
    00015  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
    00016
    00017 // Class AtomType is a base class, from which IntType, FloatType, StrType,
    00018 // and PredType inherit.  It provides the services that are common to these
    00019 // subclasses.  It also inherits from DataType and passes down the
    00020 // services that are common to all the datatypes.
    00021
    00022 #ifndef _H5AtomType_H
    00023 #define _H5AtomType_H
    00024
    00025 #ifndef H5_NO_NAMESPACE
    00026 namespace H5 {
    00027 #endif
    00028
    00029 class H5_DLLCPP AtomType : public DataType {
    00030    public:
    00031         // Returns the byte order of an atomic datatype.
    00032         H5T_order_t getOrder() const;
    00033         H5T_order_t getOrder( H5std_string& order_string ) const;
    00034
    00035         // Sets the byte ordering of an atomic datatype.
    00036         void setOrder( H5T_order_t order ) const;
    00037
    00038         // Retrieves the bit offset of the first significant bit.
    00039         // 12/05/00 - changed return type to int from size_t - C API
    00040         int getOffset() const;
    00041
    00042         // Sets the bit offset of the first significant bit.
    00043         void setOffset( size_t offset ) const;
    00044
    00045         // Retrieves the padding type of the least and most-significant bit padding.
    00046         void getPad( H5T_pad_t& lsb, H5T_pad_t& msb ) const;
    00047
    00048         // Sets the least and most-significant bits padding types
    00049         void setPad( H5T_pad_t lsb, H5T_pad_t msb ) const;
    00050
    00051         // Returns the precision of an atomic datatype.
    00052         size_t getPrecision() const;
    00053
    00054         // Sets the precision of an atomic datatype.
    00055         void setPrecision( size_t precision ) const;
    00056
    00057         // Sets the total size for an atomic datatype.
    00058         void setSize( size_t size ) const;
    00059
    00060         // Returns this class name
    00061         virtual H5std_string fromClass () const { return("AtomType"); }
    00062
    00063         // Copy constructor - makes copy of the original object
    00064         AtomType( const AtomType& original );
    00065
    00066         // Noop destructor
    00067         virtual ~AtomType();
    00068
    00069    protected:
    00070 #ifndef DOXYGEN_SHOULD_SKIP_THIS
    00071         // Default constructor
    00072         AtomType();
    00073
    00074         // Constructor that takes an existing id
    00075         AtomType( const hid_t existing_id );
    00076 #endif // DOXYGEN_SHOULD_SKIP_THIS
    00077 };
    00078 #ifndef H5_NO_NAMESPACE
    00079 }
    00080 #endif
    00081 #endif