HDF5 C++ API  1.8.12
 All Classes Namespaces Files Functions Variables Typedefs Macros Pages
H5AbstractDs.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 __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 
39 class H5_DLLCPP AbstractDs {
40  public:
41  // Gets a copy the datatype of that this abstract dataset uses.
42  // Note that this datatype is a generic one and can only be accessed
43  // via generic member functions, i.e., member functions belong
44  // to DataType. To get specific datatype, i.e. EnumType, FloatType,
45  // etc..., use the specific functions, that follow, instead.
46  DataType getDataType() const;
47 
48  // Gets a copy of the specific datatype of this abstract dataset.
49  ArrayType getArrayType() const;
50  CompType getCompType() const;
51  EnumType getEnumType() const;
52  IntType getIntType() const;
53  FloatType getFloatType() const;
54  StrType getStrType() const;
55  VarLenType getVarLenType() const;
56 
58  virtual size_t getInMemDataSize() const = 0;
59 
61  virtual DataSpace getSpace() const = 0;
62 
63  // Gets the class of the datatype that is used by this abstract
64  // dataset.
65  H5T_class_t getTypeClass() const;
66 
68  virtual hsize_t getStorageSize() const = 0;
69 
70  // Returns this class name - pure virtual.
71  virtual H5std_string fromClass() const = 0;
72 
73  // Copy constructor
74  AbstractDs( const AbstractDs& original );
75 
76  // Destructor
77  virtual ~AbstractDs();
78 
79  protected:
80  // Default constructor
81  AbstractDs();
82 
83  // Constructor that takes an attribute id or a dataset id.
84  AbstractDs( const hid_t ds_id );
85 
86  private:
87  // This member function is implemented by DataSet and Attribute - pure virtual.
88  virtual hid_t p_get_type() const = 0;
89 };
90 #ifndef H5_NO_NAMESPACE
91 }
92 #endif
93 #endif // __AbstractDs_H
Class DataSpace operates on HDF5 dataspaces.
Definition: H5DataSpace.h:25
CompType is a derivative of a DataType and operates on HDF5 compound datatypes.
Definition: H5CompType.h:28
Class EnumType operates on HDF5 enum datatypes.
Definition: H5EnumType.h:25
Class IntType operates on HDF5 integer datatype.
Definition: H5IntType.h:25
Class FloatType operates on HDF5 floating point datatype.
Definition: H5FloatType.h:25
#define H5std_string
Definition: H5Exception.h:29
Class StrType operates on HDF5 string datatypes.
Definition: H5StrType.h:25
VarLenType operates on the HDF5 C's Variable-length Datatypes.
Definition: H5VarLenType.h:28
Class DataType provides generic operations on HDF5 datatypes.
Definition: H5DataType.h:34
Class ArrayType inherits from DataType and provides wrappers for the HDF5's Array Datatypes...
Definition: H5ArrayType.h:28
Class AbstractDs is an abstract base class, inherited by Attribute and DataSet.
Definition: H5AbstractDs.h:39