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


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