HDF5 C++ API  1.8.18
 All Classes Namespaces Functions Variables Typedefs Friends Pages
H5AbstractDs.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 __AbstractDs_H
18 #define __AbstractDs_H
19 
20 namespace H5 {
21 
22 class ArrayType;
23 class CompType;
24 class EnumType;
25 class FloatType;
26 class IntType;
27 class StrType;
28 class VarLenType;
29 class DataSpace;
30 
38 class H5_DLLCPP AbstractDs {
39  public:
40  // Gets a copy the datatype of that this abstract dataset uses.
41  // Note that this datatype is a generic one and can only be accessed
42  // via generic member functions, i.e., member functions belong
43  // to DataType. To get specific datatype, i.e. EnumType, FloatType,
44  // etc..., use the specific functions, that follow, instead.
45  DataType getDataType() const;
46 
47  // Gets a copy of the specific datatype of this abstract dataset.
48  ArrayType getArrayType() const;
49  CompType getCompType() const;
50  EnumType getEnumType() const;
51  IntType getIntType() const;
52  FloatType getFloatType() const;
53  StrType getStrType() const;
54  VarLenType getVarLenType() const;
55 
57  virtual size_t getInMemDataSize() const = 0;
58 
60  virtual DataSpace getSpace() const = 0;
61 
62  // Gets the class of the datatype that is used by this abstract
63  // dataset.
64  H5T_class_t getTypeClass() const;
65 
67  virtual hsize_t getStorageSize() const = 0;
68 
69  // Returns this class name - pure virtual.
70  virtual H5std_string fromClass() const = 0;
71 
72  // Destructor
73  virtual ~AbstractDs();
74 
75  protected:
76  // Default constructor
77  AbstractDs();
78 
79  // *** Deprecation warning ***
80  // The following two constructors are no longer appropriate after the
81  // data member "id" had been moved to the sub-classes.
82  // The copy constructor is a noop and is removed in 1.8.15 and the
83  // other will be removed from 1.10 release, and then from 1.8 if its
84  // removal does not raise any problems in two 1.10 releases.
85 
86  // Mar 2016 -BMR, AbstractDs(const hid_t h5_id);
87 
88  // Copy constructor
89  // AbstractDs( const AbstractDs& original );
90 
91  private:
92  // This member function is implemented by DataSet and Attribute - pure virtual.
93  virtual hid_t p_get_type() const = 0;
94 };
95 }
96 #endif // __AbstractDs_H
Class EnumType operates on HDF5 enum datatypes.
Definition: H5EnumType.h:23
Class DataSpace operates on HDF5 dataspaces.
Definition: H5DataSpace.h:23
Class IntType operates on HDF5 integer datatype.
Definition: H5IntType.h:23
Class DataType provides generic operations on HDF5 datatypes.
Definition: H5DataType.h:32
VarLenType operates on the HDF5 C's Variable-length Datatypes.
Definition: H5VarLenType.h:26
AbstractDs is an abstract base class, inherited by Attribute and DataSet.
Definition: H5AbstractDs.h:38
Class ArrayType inherits from DataType and provides wrappers for the HDF5's Array Datatypes...
Definition: H5ArrayType.h:26
Class FloatType operates on HDF5 floating point datatype.
Definition: H5FloatType.h:23
Class StrType operates on HDF5 string datatypes.
Definition: H5StrType.h:23
CompType is a derivative of a DataType and operates on HDF5 compound datatypes.
Definition: H5CompType.h:26


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