diff options
author | Binh-Minh Ribler <bmribler@hdfgroup.org> | 2017-05-08 03:45:06 (GMT) |
---|---|---|
committer | Binh-Minh Ribler <bmribler@hdfgroup.org> | 2017-05-08 03:45:06 (GMT) |
commit | 45c7e2607d48fb5d6f3f920d83f90bfbcbfaad6b (patch) | |
tree | 0471d19732edd71e62d0d64b3e027b4559ebf079 /c++/src | |
parent | 1a60beea6999013c8763f939655087e2da266225 (diff) | |
download | hdf5-45c7e2607d48fb5d6f3f920d83f90bfbcbfaad6b.zip hdf5-45c7e2607d48fb5d6f3f920d83f90bfbcbfaad6b.tar.gz hdf5-45c7e2607d48fb5d6f3f920d83f90bfbcbfaad6b.tar.bz2 |
Code improvement
Description:
- Moved class H5File to inherit from class Group because an HDF5 file is
a root group
- Cleanup header file inclusion and class forward declaration
- Revised comments
Platforms tested:
Linux/32 2.6 (jam)
Linux/64 (platypus)
Darwin (osx1010test)
Diffstat (limited to 'c++/src')
51 files changed, 140 insertions, 189 deletions
diff --git a/c++/src/H5AbstractDs.cpp b/c++/src/H5AbstractDs.cpp index 7642be6..4763bf2 100644 --- a/c++/src/H5AbstractDs.cpp +++ b/c++/src/H5AbstractDs.cpp @@ -19,13 +19,10 @@ #include "H5Exception.h" #include "H5IdComponent.h" #include "H5PropList.h" +#include "H5Location.h" #include "H5Object.h" -#include "H5AbstractDs.h" -#include "H5DataSpace.h" -#include "H5OcreatProp.h" -#include "H5DcreatProp.h" -#include "H5CommonFG.h" #include "H5Alltypes.h" +#include "H5AbstractDs.h" namespace H5 { diff --git a/c++/src/H5AbstractDs.h b/c++/src/H5AbstractDs.h index 516188a..893cd8f 100644 --- a/c++/src/H5AbstractDs.h +++ b/c++/src/H5AbstractDs.h @@ -19,15 +19,6 @@ namespace H5 { -class ArrayType; -class CompType; -class EnumType; -class FloatType; -class IntType; -class StrType; -class VarLenType; -class DataSpace; - /*! \class AbstractDs \brief AbstractDs is an abstract base class, inherited by Attribute and DataSet. @@ -35,6 +26,17 @@ class DataSpace; It provides a collection of services that are common to both Attribute and DataSet. */ + +class DataType; +class ArrayType; +class IntType; +class FloatType; +class StrType; +class CompType; +class EnumType; +class VarLenType; +class DataSpace; + class H5_DLLCPP AbstractDs { public: // Gets a copy the datatype of that this abstract dataset uses. diff --git a/c++/src/H5ArrayType.cpp b/c++/src/H5ArrayType.cpp index c99e880..4dc0a74 100644 --- a/c++/src/H5ArrayType.cpp +++ b/c++/src/H5ArrayType.cpp @@ -19,10 +19,8 @@ #include "H5Exception.h" #include "H5IdComponent.h" #include "H5PropList.h" +#include "H5Location.h" #include "H5Object.h" -#include "H5OcreatProp.h" -#include "H5DcreatProp.h" -#include "H5CommonFG.h" #include "H5DataType.h" #include "H5ArrayType.h" diff --git a/c++/src/H5ArrayType.h b/c++/src/H5ArrayType.h index d55a767..c9f3b3e 100644 --- a/c++/src/H5ArrayType.h +++ b/c++/src/H5ArrayType.h @@ -18,12 +18,12 @@ #define __H5ArrayType_H namespace H5 { + /*! \class ArrayType \brief Class ArrayType inherits from DataType and provides wrappers for the HDF5's Array Datatypes. - - Inheritance: DataType -> H5Object -> H5Location -> IdComponent */ +// Inheritance: DataType -> H5Object -> H5Location -> IdComponent class H5_DLLCPP ArrayType : public DataType { public: // Constructor that creates a new array data type based on the diff --git a/c++/src/H5AtomType.cpp b/c++/src/H5AtomType.cpp index 3b801ba..0e57676 100644 --- a/c++/src/H5AtomType.cpp +++ b/c++/src/H5AtomType.cpp @@ -19,10 +19,8 @@ #include "H5Exception.h" #include "H5IdComponent.h" #include "H5PropList.h" +#include "H5Location.h" #include "H5Object.h" -#include "H5OcreatProp.h" -#include "H5DcreatProp.h" -#include "H5CommonFG.h" #include "H5DataType.h" #include "H5AtomType.h" diff --git a/c++/src/H5AtomType.h b/c++/src/H5AtomType.h index c588f38..e9c0945 100644 --- a/c++/src/H5AtomType.h +++ b/c++/src/H5AtomType.h @@ -18,15 +18,15 @@ #define __H5AtomType_H namespace H5 { + /*! \class AtomType \brief AtomType is a base class, inherited by IntType, FloatType, StrType, and PredType. AtomType provides operations on HDF5 atomic datatypes. It also inherits from DataType. - - Inheritance: DataType -> H5Object -> H5Location -> IdComponent */ +// Inheritance: DataType -> H5Object -> H5Location -> IdComponent class H5_DLLCPP AtomType : public DataType { public: // Returns the byte order of an atomic datatype. diff --git a/c++/src/H5Attribute.cpp b/c++/src/H5Attribute.cpp index 00407bc..cb0186a 100644 --- a/c++/src/H5Attribute.cpp +++ b/c++/src/H5Attribute.cpp @@ -20,22 +20,21 @@ #endif #include <string> +#include "H5private.h" // for HDfree #include "H5Include.h" #include "H5Exception.h" #include "H5IdComponent.h" #include "H5PropList.h" -#include "H5Object.h" -#include "H5AbstractDs.h" #include "H5FaccProp.h" #include "H5FcreatProp.h" #include "H5OcreatProp.h" #include "H5DcreatProp.h" -#include "H5CommonFG.h" +#include "H5Location.h" +#include "H5Object.h" +#include "H5AbstractDs.h" #include "H5DataType.h" #include "H5DataSpace.h" -#include "H5File.h" #include "H5Attribute.h" -#include "H5private.h" // for HDfree namespace H5 { #ifndef H5_NO_STD @@ -43,7 +42,7 @@ namespace H5 { using std::endl; #endif // H5_NO_STD -class H5_DLLCPP H5Object; // forward declaration for UserData4Aiterate +//class H5_DLLCPP H5Object; // forward declaration for UserData4Aiterate //-------------------------------------------------------------------------- // Function: Attribute default constructor diff --git a/c++/src/H5Attribute.h b/c++/src/H5Attribute.h index e61da01..10f46ae 100644 --- a/c++/src/H5Attribute.h +++ b/c++/src/H5Attribute.h @@ -18,6 +18,7 @@ #define __H5Attribute_H namespace H5 { + /*! \class Attribute \brief Class Attribute operates on HDF5 attributes. @@ -25,9 +26,8 @@ namespace H5 { Attribute and DataSet are derivatives of AbstractDs. Attribute also inherits from IdComponent because an attribute is an HDF5 component that is identified by an identifier. - - Inheritance: multiple IdComponent/AbstractDs */ +// Inheritance: multiple IdComponent/AbstractDs class H5_DLLCPP Attribute : public AbstractDs, public IdComponent { public: diff --git a/c++/src/H5CommonFG.cpp b/c++/src/H5CommonFG.cpp index 10f6c58..d9a66e2 100644 --- a/c++/src/H5CommonFG.cpp +++ b/c++/src/H5CommonFG.cpp @@ -15,16 +15,18 @@ #include <string> +#include "H5private.h" // for HDmemset #include "H5Include.h" #include "H5Exception.h" #include "H5IdComponent.h" #include "H5PropList.h" -#include "H5Object.h" #include "H5FaccProp.h" #include "H5FcreatProp.h" #include "H5OcreatProp.h" #include "H5DxferProp.h" #include "H5DcreatProp.h" +#include "H5Location.h" +#include "H5Object.h" #include "H5CommonFG.h" #include "H5Group.h" #include "H5AbstractDs.h" @@ -32,7 +34,6 @@ #include "H5DataSet.h" #include "H5File.h" #include "H5Alltypes.h" -#include "H5private.h" // for HDstrcpy // There are a few comments that are common to most of the functions // defined in this file so they are listed here. diff --git a/c++/src/H5CommonFG.h b/c++/src/H5CommonFG.h index f1a8886..761125c 100644 --- a/c++/src/H5CommonFG.h +++ b/c++/src/H5CommonFG.h @@ -19,17 +19,15 @@ namespace H5 { -// Class forwarding -class Group; -class H5File; -class ArrayType; -class VarLenType; - /*! \class CommonFG \brief \a CommonFG is an abstract base class of H5File and H5Group. It provides common operations of H5File and H5Group. */ + +class ArrayType; +class VarLenType; + class H5_DLLCPP CommonFG { public: // Creates a new group at this location which can be a file diff --git a/c++/src/H5CompType.cpp b/c++/src/H5CompType.cpp index 136493a..96fabd4 100644 --- a/c++/src/H5CompType.cpp +++ b/c++/src/H5CompType.cpp @@ -19,16 +19,13 @@ #include "H5Exception.h" #include "H5IdComponent.h" #include "H5PropList.h" +#include "H5Location.h" #include "H5Object.h" -#include "H5OcreatProp.h" -#include "H5DcreatProp.h" -#include "H5CommonFG.h" #include "H5Alltypes.h" #include "H5AbstractDs.h" #include "H5DxferProp.h" #include "H5DataSpace.h" #include "H5DataSet.h" -#include "H5private.h" namespace H5 { diff --git a/c++/src/H5CompType.h b/c++/src/H5CompType.h index e56dbf3..75089e8 100644 --- a/c++/src/H5CompType.h +++ b/c++/src/H5CompType.h @@ -18,12 +18,16 @@ #define __H5CompType_H namespace H5 { + /*! \class CompType \brief CompType is a derivative of a DataType and operates on HDF5 compound datatypes. - - Inheritance: DataType -> H5Object -> H5Location -> IdComponent */ +// Inheritance: DataType -> H5Object -> H5Location -> IdComponent + +class ArrayType; +class VarLenType; + class H5_DLLCPP CompType : public DataType { public: // Default constructor diff --git a/c++/src/H5DataSet.cpp b/c++/src/H5DataSet.cpp index aba2fa3..75d45b4 100644 --- a/c++/src/H5DataSet.cpp +++ b/c++/src/H5DataSet.cpp @@ -20,25 +20,21 @@ #endif #include <string> +#include "H5private.h" // for HDfree and HDmemset #include "H5Include.h" #include "H5Exception.h" #include "H5IdComponent.h" #include "H5PropList.h" +#include "H5Location.h" #include "H5Object.h" -#include "H5PropList.h" #include "H5OcreatProp.h" #include "H5DxferProp.h" #include "H5DcreatProp.h" -#include "H5FaccProp.h" -#include "H5FcreatProp.h" -#include "H5CommonFG.h" #include "H5DataType.h" #include "H5DataSpace.h" #include "H5AbstractDs.h" -#include "H5File.h" #include "H5Attribute.h" #include "H5DataSet.h" -#include "H5private.h" // for HDfree namespace H5 { #ifndef H5_NO_STD diff --git a/c++/src/H5DataSet.h b/c++/src/H5DataSet.h index b646a7a..f7a344c 100644 --- a/c++/src/H5DataSet.h +++ b/c++/src/H5DataSet.h @@ -18,18 +18,17 @@ #define __H5DataSet_H namespace H5 { + /*! \class DataSet \brief Class DataSet operates on HDF5 datasets. An datasets has many characteristics similar to an attribute, thus both Attribute and DataSet are derivatives of AbstractDs. DataSet also inherits from H5Object because a dataset is an HDF5 object. - - Inheritance: multiple H5Object/AbstractDs -> H5Location -> IdComponent */ +// Inheritance: multiple H5Object/AbstractDs -> H5Location -> IdComponent class H5_DLLCPP DataSet : public H5Object, public AbstractDs { public: - // Close this dataset. virtual void close(); diff --git a/c++/src/H5DataSpace.h b/c++/src/H5DataSpace.h index 2168f4d..b490141 100644 --- a/c++/src/H5DataSpace.h +++ b/c++/src/H5DataSpace.h @@ -18,12 +18,12 @@ #define __H5DataSpace_H namespace H5 { + /*! \class DataSpace \brief Class DataSpace inherits from IdComponent and provides wrappers for the HDF5's dataspaces. - - Inheritance: IdComponent */ +// Inheritance: IdComponent class H5_DLLCPP DataSpace : public IdComponent { public: ///\brief Default DataSpace objects diff --git a/c++/src/H5DataType.cpp b/c++/src/H5DataType.cpp index f29978b..625feaf 100644 --- a/c++/src/H5DataType.cpp +++ b/c++/src/H5DataType.cpp @@ -24,21 +24,15 @@ #include "H5Exception.h" #include "H5IdComponent.h" #include "H5PropList.h" -#include "H5DataSpace.h" +#include "H5Location.h" #include "H5Object.h" -#include "H5FaccProp.h" -#include "H5FcreatProp.h" -#include "H5OcreatProp.h" -#include "H5DcreatProp.h" #include "H5DxferProp.h" -#include "H5CommonFG.h" #include "H5DataType.h" #include "H5AtomType.h" #include "H5PredType.h" -#include "H5private.h" #include "H5AbstractDs.h" +#include "H5DataSpace.h" #include "H5DataSet.h" -#include "H5File.h" #include "H5Attribute.h" namespace H5 { diff --git a/c++/src/H5DataType.h b/c++/src/H5DataType.h index 6f796b8..1118dcf 100644 --- a/c++/src/H5DataType.h +++ b/c++/src/H5DataType.h @@ -18,15 +18,15 @@ #define __H5DataType_H namespace H5 { + /*! \class DataType \brief Class DataType provides generic operations on HDF5 datatypes. DataType inherits from H5Object because a named datatype is an HDF5 object and is a base class of ArrayType, AtomType, CompType, EnumType, and VarLenType. - - Inheritance: DataType -> H5Object -> H5Location -> IdComponent */ +// Inheritance: DataType -> H5Object -> H5Location -> IdComponent class H5_DLLCPP DataType : public H5Object { public: // Creates a datatype given its class and size diff --git a/c++/src/H5DcreatProp.cpp b/c++/src/H5DcreatProp.cpp index 7f4bbf9..53a96d1 100644 --- a/c++/src/H5DcreatProp.cpp +++ b/c++/src/H5DcreatProp.cpp @@ -19,11 +19,11 @@ #include "H5Exception.h" #include "H5IdComponent.h" #include "H5PropList.h" -#include "H5OcreatProp.h" +#include "H5Location.h" #include "H5Object.h" -#include "H5DcreatProp.h" -#include "H5CommonFG.h" #include "H5DataType.h" +#include "H5OcreatProp.h" +#include "H5DcreatProp.h" namespace H5 { diff --git a/c++/src/H5DcreatProp.h b/c++/src/H5DcreatProp.h index 90b7ed7..1072ff4 100644 --- a/c++/src/H5DcreatProp.h +++ b/c++/src/H5DcreatProp.h @@ -18,12 +18,15 @@ #define __H5DSCreatPropList_H namespace H5 { + /*! \class DSetCreatPropList \brief Class DSetCreatPropList inherits from ObjCreatPropList and provides wrappers for the HDF5 dataset creation property functions. - - Inheritance: ObjCreatPropList -> PropList -> IdComponent */ +// Inheritance: ObjCreatPropList -> PropList -> IdComponent + +class DataType; + class H5_DLLCPP DSetCreatPropList : public ObjCreatPropList { public: ///\brief Default dataset creation property list. diff --git a/c++/src/H5DxferProp.cpp b/c++/src/H5DxferProp.cpp index e1c5964..fd2f36d 100644 --- a/c++/src/H5DxferProp.cpp +++ b/c++/src/H5DxferProp.cpp @@ -15,12 +15,12 @@ #include <string> +#include "H5private.h" // for HDmemset #include "H5Include.h" #include "H5Exception.h" #include "H5IdComponent.h" #include "H5PropList.h" #include "H5DxferProp.h" -#include "H5private.h" // for HDmemset namespace H5 { diff --git a/c++/src/H5DxferProp.h b/c++/src/H5DxferProp.h index 0429508..181aeeb 100644 --- a/c++/src/H5DxferProp.h +++ b/c++/src/H5DxferProp.h @@ -18,12 +18,12 @@ #define __H5DSetMemXferPropList_H namespace H5 { + /*! \class DSetMemXferPropList \brief Class DSetCreatPropList inherits from PropList and provides wrappers for the HDF5 dataset memory and transfer property list. - - Inheritance: ObjCreatPropList -> PropList -> IdComponent */ +// Inheritance: ObjCreatPropList -> PropList -> IdComponent class H5_DLLCPP DSetMemXferPropList : public PropList { public: ///\brief Default dataset memory and transfer property list. diff --git a/c++/src/H5EnumType.cpp b/c++/src/H5EnumType.cpp index 14a6f43..9403cb8 100644 --- a/c++/src/H5EnumType.cpp +++ b/c++/src/H5EnumType.cpp @@ -15,23 +15,21 @@ #include <string> +#include "H5private.h" // for HDmemset #include "H5Include.h" #include "H5Exception.h" #include "H5IdComponent.h" #include "H5PropList.h" +#include "H5Location.h" #include "H5Object.h" #include "H5AbstractDs.h" #include "H5DxferProp.h" #include "H5DataSpace.h" -#include "H5OcreatProp.h" -#include "H5DcreatProp.h" -#include "H5CommonFG.h" #include "H5DataType.h" #include "H5DataSet.h" #include "H5AtomType.h" #include "H5IntType.h" #include "H5EnumType.h" -#include "H5private.h" // for HDmemset namespace H5 { diff --git a/c++/src/H5EnumType.h b/c++/src/H5EnumType.h index 949c75d..af8d9c6 100644 --- a/c++/src/H5EnumType.h +++ b/c++/src/H5EnumType.h @@ -18,14 +18,13 @@ #define __H5EnumType_H namespace H5 { + /*! \class EnumType \brief EnumType is a derivative of a DataType and operates on HDF5 enum datatypes. - - Inheritance: DataType -> H5Object -> H5Location -> IdComponent */ +// Inheritance: DataType -> H5Object -> H5Location -> IdComponent class H5_DLLCPP EnumType : public DataType { - public: // Creates an empty enumeration datatype based on a native signed // integer type, whose size is given by size. diff --git a/c++/src/H5Exception.h b/c++/src/H5Exception.h index fd67118..b57ca64 100644 --- a/c++/src/H5Exception.h +++ b/c++/src/H5Exception.h @@ -20,6 +20,7 @@ #include <string> namespace H5 { + #ifdef H5_NO_STD #define H5std_string ::string #else diff --git a/c++/src/H5FaccProp.h b/c++/src/H5FaccProp.h index 237dd68..186cac1 100644 --- a/c++/src/H5FaccProp.h +++ b/c++/src/H5FaccProp.h @@ -18,12 +18,12 @@ #define __H5FileAccPropList_H namespace H5 { + /*! \class FileAccPropList \brief Class FileAccPropList inherits from PropList and provides wrappers for the HDF5 file access property list. - - Inheritance: PropList -> IdComponent */ +// Inheritance: PropList -> IdComponent class H5_DLLCPP FileAccPropList : public PropList { public: ///\brief Default file access property list. diff --git a/c++/src/H5FcreatProp.h b/c++/src/H5FcreatProp.h index f50b4c6..6bb4cc2 100644 --- a/c++/src/H5FcreatProp.h +++ b/c++/src/H5FcreatProp.h @@ -18,12 +18,12 @@ #define __H5FileCreatPropList_H namespace H5 { + /*! \class FileCreatPropList \brief Class FileCreatPropList inherits from PropList and provides wrappers for the HDF5 file create property list. - - Inheritance: PropList -> IdComponent */ +// Inheritance: PropList -> IdComponent class H5_DLLCPP FileCreatPropList : public PropList { public: ///\brief Default file creation property list. diff --git a/c++/src/H5File.cpp b/c++/src/H5File.cpp index c18431c..768ac5e 100644 --- a/c++/src/H5File.cpp +++ b/c++/src/H5File.cpp @@ -24,19 +24,15 @@ #include "H5Exception.h" #include "H5IdComponent.h" #include "H5PropList.h" -#include "H5Object.h" #include "H5FaccProp.h" #include "H5FcreatProp.h" #include "H5OcreatProp.h" -#include "H5DxferProp.h" #include "H5DcreatProp.h" +#include "H5Location.h" +#include "H5Object.h" #include "H5CommonFG.h" #include "H5Group.h" -#include "H5AbstractDs.h" -#include "H5DataSpace.h" -#include "H5DataSet.h" #include "H5File.h" -#include "H5Alltypes.h" namespace H5 { #ifndef H5_NO_STD @@ -49,7 +45,7 @@ namespace H5 { ///\brief Default constructor: creates a stub H5File object. // Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- -H5File::H5File() : H5Location(), CommonFG(), id(H5I_INVALID_HID) {} +H5File::H5File() : Group(), id(H5I_INVALID_HID) {} //-------------------------------------------------------------------------- // Function: H5File overloaded constructor @@ -82,7 +78,7 @@ H5File::H5File() : H5Location(), CommonFG(), id(H5I_INVALID_HID) {} // to catch then re-throw it. -BMR 2013/03/21 // Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- -H5File::H5File(const char* name, unsigned int flags, const FileCreatPropList& create_plist, const FileAccPropList& access_plist) : H5Location(), CommonFG(), id(H5I_INVALID_HID) +H5File::H5File(const char* name, unsigned int flags, const FileCreatPropList& create_plist, const FileAccPropList& access_plist) : Group(), id(H5I_INVALID_HID) { try { p_get_file(name, flags, create_plist, access_plist); @@ -107,7 +103,7 @@ H5File::H5File(const char* name, unsigned int flags, const FileCreatPropList& cr // to catch then re-throw it. -BMR 2013/03/21 // Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- -H5File::H5File(const H5std_string& name, unsigned int flags, const FileCreatPropList& create_plist, const FileAccPropList& access_plist) : H5Location(), CommonFG(), id(H5I_INVALID_HID) +H5File::H5File(const H5std_string& name, unsigned int flags, const FileCreatPropList& create_plist, const FileAccPropList& access_plist) : Group(), id(H5I_INVALID_HID) { try { p_get_file(name.c_str(), flags, create_plist, access_plist); @@ -164,7 +160,7 @@ void H5File::p_get_file(const char* name, unsigned int flags, const FileCreatPro // constructor is needed by the library in order to return // an object, H5File doesn't need it. -BMR (HDFFV-8766 partially) //-------------------------------------------------------------------------- -H5File::H5File(hid_t existing_id) : H5Location(), CommonFG() +H5File::H5File(hid_t existing_id) : Group() { id = existing_id; incRefCount(); // increment number of references to this id @@ -179,7 +175,7 @@ H5File::H5File(hid_t existing_id) : H5Location(), CommonFG() ///\param original - IN: H5File instance to copy // Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- -H5File::H5File(const H5File& original) : H5Location(), CommonFG() +H5File::H5File(const H5File& original) : Group() { id = original.getId(); incRefCount(); // increment number of references to this id diff --git a/c++/src/H5File.h b/c++/src/H5File.h index bf6e655..55ae73e 100644 --- a/c++/src/H5File.h +++ b/c++/src/H5File.h @@ -18,12 +18,18 @@ #define __H5File_H namespace H5 { + /*! \class H5File \brief Class H5File represents an HDF5 file. - Inheritance: CommonFG/H5Location -> IdComponent + Modification: + May 5, 2017: In the class rearrangement of 1.8.10, H5File should have + been moved to inherit from Group instead, because HDF5 file is + a root group. It is now done in 1.10 (Mar 30) and 1.8.19 + releases. -BMR */ -class H5_DLLCPP H5File : public H5Location, public CommonFG { +// Inheritance: CommonFG/H5Location -> IdComponent +class H5_DLLCPP H5File : public Group { public: // Creates or opens an HDF5 file. H5File(const char* name, unsigned int flags, diff --git a/c++/src/H5FloatType.cpp b/c++/src/H5FloatType.cpp index 0e3417b..9e64972 100644 --- a/c++/src/H5FloatType.cpp +++ b/c++/src/H5FloatType.cpp @@ -19,18 +19,15 @@ #include "H5Exception.h" #include "H5IdComponent.h" #include "H5PropList.h" +#include "H5Location.h" #include "H5Object.h" -#include "H5OcreatProp.h" -#include "H5DcreatProp.h" -#include "H5CommonFG.h" -#include "H5DataType.h" #include "H5AbstractDs.h" #include "H5DxferProp.h" #include "H5DataSpace.h" +#include "H5DataSet.h" +#include "H5DataType.h" #include "H5AtomType.h" #include "H5FloatType.h" -#include "H5DataSet.h" -#include "H5PredType.h" namespace H5 { diff --git a/c++/src/H5FloatType.h b/c++/src/H5FloatType.h index 67eee66..7954709 100644 --- a/c++/src/H5FloatType.h +++ b/c++/src/H5FloatType.h @@ -18,12 +18,12 @@ #define __H5FloatType_H namespace H5 { + /*! \class FloatType \brief FloatType is a derivative of a DataType and operates on HDF5 floating point datatype. - - Inheritance: AtomType -> DataType -> H5Object -> H5Location -> IdComponent */ +// Inheritance: AtomType -> DataType -> H5Object -> H5Location -> IdComponent class H5_DLLCPP FloatType : public AtomType { public: // Creates a floating-point type using a predefined type. diff --git a/c++/src/H5Group.cpp b/c++/src/H5Group.cpp index 1bcafe1..16a715c 100644 --- a/c++/src/H5Group.cpp +++ b/c++/src/H5Group.cpp @@ -24,20 +24,14 @@ #include "H5Exception.h" #include "H5IdComponent.h" #include "H5PropList.h" -#include "H5Object.h" -#include "H5AbstractDs.h" -#include "H5FaccProp.h" -#include "H5FcreatProp.h" #include "H5OcreatProp.h" #include "H5DcreatProp.h" -#include "H5DxferProp.h" -#include "H5DataSpace.h" -#include "H5DataSet.h" +#include "H5Location.h" +#include "H5Object.h" +#include "H5AbstractDs.h" #include "H5CommonFG.h" #include "H5Attribute.h" #include "H5Group.h" -#include "H5File.h" -#include "H5Alltypes.h" namespace H5 { #ifndef H5_NO_STD diff --git a/c++/src/H5Group.h b/c++/src/H5Group.h index 244f99e..0d26b27 100644 --- a/c++/src/H5Group.h +++ b/c++/src/H5Group.h @@ -18,11 +18,11 @@ #define __H5Group_H namespace H5 { + /*! \class Group \brief Class Group represents an HDF5 group. - - Inheritance: CommonFG/H5Object -> H5Location -> IdComponent */ +// Inheritance: CommonFG/H5Object -> H5Location -> IdComponent class H5_DLLCPP Group : public H5Object, public CommonFG { public: // Close this group. diff --git a/c++/src/H5IdComponent.cpp b/c++/src/H5IdComponent.cpp index 7b36d64..7054369 100644 --- a/c++/src/H5IdComponent.cpp +++ b/c++/src/H5IdComponent.cpp @@ -15,12 +15,11 @@ #include <string> +#include "H5private.h" // for HDmemset #include "H5Include.h" #include "H5Exception.h" #include "H5Library.h" #include "H5IdComponent.h" -#include "H5DataSpace.h" -#include "H5private.h" // for HDmemset namespace H5 { diff --git a/c++/src/H5IdComponent.h b/c++/src/H5IdComponent.h index 24d1d1b..0f83168 100644 --- a/c++/src/H5IdComponent.h +++ b/c++/src/H5IdComponent.h @@ -19,7 +19,8 @@ namespace H5 { -class DataSpace; +//class DataSpace; + /*! \class IdComponent \brief Class IdComponent provides wrappers of the C functions that operate on an HDF5 identifier. diff --git a/c++/src/H5IntType.cpp b/c++/src/H5IntType.cpp index cd87306..a9bb146 100644 --- a/c++/src/H5IntType.cpp +++ b/c++/src/H5IntType.cpp @@ -19,10 +19,8 @@ #include "H5Exception.h" #include "H5IdComponent.h" #include "H5PropList.h" +#include "H5Location.h" #include "H5Object.h" -#include "H5OcreatProp.h" -#include "H5DcreatProp.h" -#include "H5CommonFG.h" #include "H5DataType.h" #include "H5AbstractDs.h" #include "H5DxferProp.h" @@ -30,11 +28,9 @@ #include "H5AtomType.h" #include "H5IntType.h" #include "H5DataSet.h" -#include "H5PredType.h" namespace H5 { - //-------------------------------------------------------------------------- // Function: IntType default constructor ///\brief Default constructor: Creates a stub integer datatype diff --git a/c++/src/H5IntType.h b/c++/src/H5IntType.h index 628df12..1ddf2bd 100644 --- a/c++/src/H5IntType.h +++ b/c++/src/H5IntType.h @@ -18,12 +18,14 @@ #define __H5IntType_H namespace H5 { + +class PredType; + /*! \class IntType \brief IntType is a derivative of a DataType and operates on HDF5 integer datatype. - - Inheritance: AtomType -> DataType -> H5Object -> H5Location -> IdComponent */ +// Inheritance: AtomType -> DataType -> H5Object -> H5Location -> IdComponent class H5_DLLCPP IntType : public AtomType { public: // Creates an integer type using a predefined type diff --git a/c++/src/H5Library.cpp b/c++/src/H5Library.cpp index 62e21b8..b25dc90 100644 --- a/c++/src/H5Library.cpp +++ b/c++/src/H5Library.cpp @@ -24,10 +24,11 @@ #include "H5FaccProp.h" #include "H5FcreatProp.h" #include "H5OcreatProp.h" +#include "H5DcreatProp.h" #include "H5DxferProp.h" +#include "H5Location.h" #include "H5Object.h" #include "H5DataType.h" -#include "H5DcreatProp.h" #include "H5AtomType.h" #include "H5PredType.h" #include "H5DataSpace.h" diff --git a/c++/src/H5Library.h b/c++/src/H5Library.h index ff0cd20..ed13339 100644 --- a/c++/src/H5Library.h +++ b/c++/src/H5Library.h @@ -18,6 +18,7 @@ #define __H5Library_H namespace H5 { + /*! \class H5Library \brief Class H5Library operates the HDF5 library globably. diff --git a/c++/src/H5Location.cpp b/c++/src/H5Location.cpp index 709a94e..855e6d2 100644 --- a/c++/src/H5Location.cpp +++ b/c++/src/H5Location.cpp @@ -15,25 +15,17 @@ #include <string> +#include "H5private.h" // for HDmemset #include "H5Include.h" #include "H5Exception.h" #include "H5IdComponent.h" #include "H5PropList.h" #include "H5Location.h" #include "H5Object.h" -#include "H5OcreatProp.h" -#include "H5DcreatProp.h" -#include "H5DxferProp.h" -#include "H5FaccProp.h" -#include "H5FcreatProp.h" -#include "H5CommonFG.h" #include "H5DataType.h" #include "H5DataSpace.h" #include "H5AbstractDs.h" -#include "H5File.h" -#include "H5DataSet.h" #include "H5Attribute.h" -#include "H5private.h" // for HDmemset namespace H5 { diff --git a/c++/src/H5Location.h b/c++/src/H5Location.h index 9861118..c49b23b 100644 --- a/c++/src/H5Location.h +++ b/c++/src/H5Location.h @@ -20,17 +20,8 @@ #include "H5Classes.h" // constains forward class declarations namespace H5 { -/*! \class H5Location - \brief H5Location is an abstract base class, added in version 1.8.12. - It provides a collection of wrappers for the C functions that take a - location identifier to specify the HDF5 object. The location identifier - can be either file, group, dataset, attribute, or named datatype. - Wrappers for H5A functions stay in H5Object. - - Inheritance: IdComponent -*/ -class H5_DLLCPP H5Location; // forward declaration for UserData4Aiterate +class H5Location; // forward declaration for UserData4Aiterate // Define the operator function pointer for H5Aiterate(). typedef void (*attr_operator_t)(H5Location& loc/*in*/, @@ -49,10 +40,14 @@ class UserData4Aiterate { // user data for attribute iteration It provides a collection of wrappers for the C functions that take a location identifier to specify the HDF5 object. The location identifier - can be either file, group, dataset, or named datatype. + can be either file, group, dataset, attribute, or named datatype. */ +// Inheritance: IdComponent + // Most of these methods were in H5Object but are now moved here because // a location can be a file, group, dataset, or named datatype. -BMR, 2013-10-1 +// Wrappers for H5A functions that operate existing attributes are in H5Object. +// -BMR, 2017-05-04 class H5_DLLCPP H5Location : public IdComponent { public: // Creates an attribute for the specified object at this location diff --git a/c++/src/H5Object.cpp b/c++/src/H5Object.cpp index 3ac149a..60e7afb 100644 --- a/c++/src/H5Object.cpp +++ b/c++/src/H5Object.cpp @@ -15,24 +15,17 @@ #include <string> +#include "H5private.h" // for HDmemset #include "H5Include.h" #include "H5Exception.h" #include "H5IdComponent.h" #include "H5PropList.h" -#include "H5Object.h" -#include "H5OcreatProp.h" -#include "H5DcreatProp.h" -#include "H5DxferProp.h" -#include "H5FaccProp.h" -#include "H5FcreatProp.h" -#include "H5CommonFG.h" -#include "H5DataType.h" #include "H5DataSpace.h" #include "H5AbstractDs.h" -#include "H5File.h" -#include "H5DataSet.h" #include "H5Attribute.h" -#include "H5private.h" // for HDmemset +#include "H5Location.h" +#include "H5Object.h" +#include "H5DataType.h" namespace H5 { diff --git a/c++/src/H5Object.h b/c++/src/H5Object.h index 3fd29a4..fa9e8a9 100644 --- a/c++/src/H5Object.h +++ b/c++/src/H5Object.h @@ -17,10 +17,8 @@ #ifndef __H5Object_H #define __H5Object_H -#include "H5Location.h" -#include "H5Classes.h" // constains forward class declarations - namespace H5 { + /*! \class H5Object \brief Class H5Object is a bridge between H5Location and DataSet, DataType, and Group. @@ -33,21 +31,19 @@ namespace H5 { group, dataset, and named datatype. Note that the reason for adding H5Location instead of simply moving H5File to be under H5Object is H5File is not an HDF5 object, and renaming H5Object - to H5Location will risk breaking user applications. - -BMR - Apr 2, 2014: Added wrapper getObjName for H5Iget_name - - Inheritance: H5Location -> IdComponent + to H5Location will risk breaking user applications. -BMR + Apr 2, 2014: Added wrapper getObjName for H5Iget_name -BMR */ +// Inheritance: H5Location -> IdComponent class H5_DLLCPP H5Object : public H5Location { public: -#ifndef DOXYGEN_SHOULD_SKIP_THIS // Gets the name of this HDF5 object, i.e., Group, DataSet, or - // DataType. These should have const but are retiring anyway. + // DataType. ssize_t getObjName(char *obj_name, size_t buf_size = 0) const; ssize_t getObjName(H5std_string& obj_name, size_t len = 0) const; H5std_string getObjName() const; +#ifndef DOXYGEN_SHOULD_SKIP_THIS // Noop destructor. virtual ~H5Object(); diff --git a/c++/src/H5OcreatProp.h b/c++/src/H5OcreatProp.h index c4687f7..dcc07cc 100644 --- a/c++/src/H5OcreatProp.h +++ b/c++/src/H5OcreatProp.h @@ -18,12 +18,12 @@ #define __H5ObjCreatPropList_H namespace H5 { + /*! \class ObjCreatPropList \brief Class ObjCreatPropList inherits from PropList and provides wrappers for the HDF5 file create property list. - - Inheritance: PropList -> IdComponent */ +// Inheritance: PropList -> IdComponent class H5_DLLCPP ObjCreatPropList : public PropList { public: ///\brief Default object creation property list. diff --git a/c++/src/H5PredType.cpp b/c++/src/H5PredType.cpp index a640d32..52334ef 100644 --- a/c++/src/H5PredType.cpp +++ b/c++/src/H5PredType.cpp @@ -19,6 +19,7 @@ #include "H5Exception.h" #include "H5IdComponent.h" #include "H5PropList.h" +#include "H5Location.h" #include "H5Object.h" #include "H5DataType.h" #include "H5AtomType.h" diff --git a/c++/src/H5PredType.h b/c++/src/H5PredType.h index 1d95865..9581420 100644 --- a/c++/src/H5PredType.h +++ b/c++/src/H5PredType.h @@ -18,15 +18,15 @@ #define __H5PredType_H namespace H5 { + /*! \class PredType \brief Class PredType holds the definition of all the HDF5 predefined datatypes. These types can only be made copy of, not created by H5Tcreate or closed by H5Tclose. They are treated as constants. - - Inheritance: AtomType -> DataType -> H5Object -> H5Location -> IdComponent */ +// Inheritance: AtomType -> DataType -> H5Object -> H5Location -> IdComponent class H5_DLLCPP PredType : public AtomType { public: ///\brief Returns this class name. diff --git a/c++/src/H5PropList.cpp b/c++/src/H5PropList.cpp index d7083f8..c60b34e 100644 --- a/c++/src/H5PropList.cpp +++ b/c++/src/H5PropList.cpp @@ -21,11 +21,11 @@ #include <string> +#include "H5private.h" // for HDmemset #include "H5Include.h" #include "H5Exception.h" #include "H5IdComponent.h" #include "H5PropList.h" -#include "H5private.h" // for HDfree namespace H5{ diff --git a/c++/src/H5PropList.h b/c++/src/H5PropList.h index 4c50fb9..bd04194 100644 --- a/c++/src/H5PropList.h +++ b/c++/src/H5PropList.h @@ -18,13 +18,13 @@ #define __H5PropList_H namespace H5 { + //! Class PropList provides operations for generic property lists. /*! \class PropList \brief Class PropList inherits from IdComponent and provides wrappers for the HDF5 generic property list. - - Inheritance: IdComponent */ +// Inheritance: IdComponent class H5_DLLCPP PropList : public IdComponent { public: ///\brief Default property list diff --git a/c++/src/H5StrType.cpp b/c++/src/H5StrType.cpp index ed60c6b..4335ea7 100644 --- a/c++/src/H5StrType.cpp +++ b/c++/src/H5StrType.cpp @@ -19,18 +19,17 @@ #include "H5Exception.h" #include "H5IdComponent.h" #include "H5PropList.h" +#include "H5Location.h" #include "H5Object.h" -#include "H5OcreatProp.h" -#include "H5DcreatProp.h" -#include "H5CommonFG.h" #include "H5DataType.h" -#include "H5AtomType.h" #include "H5AbstractDs.h" #include "H5DxferProp.h" #include "H5DataSpace.h" -#include "H5StrType.h" #include "H5DataSet.h" +#include "H5AtomType.h" #include "H5PredType.h" +#include "H5StrType.h" + namespace H5 { diff --git a/c++/src/H5StrType.h b/c++/src/H5StrType.h index 4479223..d78240a 100644 --- a/c++/src/H5StrType.h +++ b/c++/src/H5StrType.h @@ -18,12 +18,12 @@ #define __H5StrType_H namespace H5 { + /*! \class StrType \brief StrType is a derivative of a DataType and operates on HDF5 string datatype. - - Inheritance: AtomType -> DataType -> H5Object -> H5Location -> IdComponent */ +// Inheritance: AtomType -> DataType -> H5Object -> H5Location -> IdComponent class H5_DLLCPP StrType : public AtomType { public: // Creates a string type using a predefined type diff --git a/c++/src/H5VarLenType.cpp b/c++/src/H5VarLenType.cpp index 07508e4..32a5bd8 100644 --- a/c++/src/H5VarLenType.cpp +++ b/c++/src/H5VarLenType.cpp @@ -19,10 +19,8 @@ #include "H5Exception.h" #include "H5IdComponent.h" #include "H5PropList.h" +#include "H5Location.h" #include "H5Object.h" -#include "H5OcreatProp.h" -#include "H5DcreatProp.h" -#include "H5CommonFG.h" #include "H5DataType.h" #include "H5VarLenType.h" diff --git a/c++/src/H5VarLenType.h b/c++/src/H5VarLenType.h index 2676fb3..70a2ab8 100644 --- a/c++/src/H5VarLenType.h +++ b/c++/src/H5VarLenType.h @@ -18,12 +18,12 @@ #define __H5VarLenType_H namespace H5 { + /*! \class VarLenType \brief VarLenType is a derivative of a DataType and operates on HDF5 C's Variable-length Datatypes. - - Inheritance: DataType -> H5Object -> H5Location -> IdComponent */ +// Inheritance: DataType -> H5Object -> H5Location -> IdComponent class H5_DLLCPP VarLenType : public DataType { public: // Constructor that creates a variable-length datatype based |