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 | // Class ArrayType inherits from DataType and provides wrappers for the |
---|
18 | // HDF5 C's Array Datatypes. |
---|
19 | |
---|
20 | #ifndef _H5ArrayType_H |
---|
21 | #define _H5ArrayType_H |
---|
22 | |
---|
23 | #ifndef H5_NO_NAMESPACE |
---|
24 | namespace H5 { |
---|
25 | #endif |
---|
26 | |
---|
27 | class H5_DLLCPP ArrayType : public DataType { |
---|
28 | public: |
---|
29 | // Constructor that creates a new array data type based on the |
---|
30 | // specified base type. |
---|
31 | ArrayType(const DataType& base_type, int ndims, const hsize_t* dims); |
---|
32 | |
---|
33 | // Returns the number of dimensions of this array datatype. |
---|
34 | int getArrayNDims(); |
---|
35 | |
---|
36 | // Returns the sizes of dimensions of this array datatype. |
---|
37 | int getArrayDims(hsize_t* dims); |
---|
38 | |
---|
39 | // Returns this class name |
---|
40 | virtual H5std_string fromClass () const { return("ArrayType"); } |
---|
41 | |
---|
42 | // Copy constructor: makes copy of the original object. |
---|
43 | ArrayType( const ArrayType& original ); |
---|
44 | |
---|
45 | // Constructor that takes an existing id |
---|
46 | ArrayType( const hid_t existing_id ); |
---|
47 | |
---|
48 | // Noop destructor |
---|
49 | virtual ~ArrayType(); |
---|
50 | |
---|
51 | protected: |
---|
52 | // Default constructor |
---|
53 | ArrayType(); |
---|
54 | |
---|
55 | private: |
---|
56 | int rank; // Rank of the array |
---|
57 | hsize_t* dimensions; // Sizes of the array dimensions |
---|
58 | }; |
---|
59 | #ifndef H5_NO_NAMESPACE |
---|
60 | } |
---|
61 | #endif |
---|
62 | #endif |
---|