From 98fdd752a4fe4ab3519c4d6f4823d44fc61197fc Mon Sep 17 00:00:00 2001 From: Binh-Minh Ribler Date: Thu, 24 Jul 2008 23:10:07 -0500 Subject: [svn-r15404] Purpose: Code correction Description: Accidentally left p_setId in public section in the previous checkin. Moved it to "protected:" section. Platforms tested: Linux 2.6 (kagiso) SunOS 5.10 (linew) FreeBSD (duty) --- c++/src/H5Attribute.h | 7 +++++-- c++/src/H5DataSet.h | 5 ++++- c++/src/H5DataSpace.h | 5 ++++- c++/src/H5DataType.h | 5 ++++- c++/src/H5File.h | 7 +++++-- c++/src/H5Group.h | 5 ++++- c++/src/H5IdComponent.h | 6 +++--- c++/src/H5PropList.h | 4 +++- 8 files changed, 32 insertions(+), 12 deletions(-) diff --git a/c++/src/H5Attribute.h b/c++/src/H5Attribute.h index 7da4798..7d7ca8d 100644 --- a/c++/src/H5Attribute.h +++ b/c++/src/H5Attribute.h @@ -64,13 +64,16 @@ class H5_DLLCPP Attribute : public AbstractDs, public IdComponent { // Default constructor Attribute(); - // Gets/Sets the attribute id. + // Gets the attribute id. virtual hid_t getId() const; - virtual void p_setId(const hid_t new_id); // Destructor: properly terminates access to this attribute. virtual ~Attribute(); + protected: + // Sets the attribute id. + virtual void p_setId(const hid_t new_id); + private: hid_t id; // HDF5 attribute id diff --git a/c++/src/H5DataSet.h b/c++/src/H5DataSet.h index 6194cd8..f5d13d0 100644 --- a/c++/src/H5DataSet.h +++ b/c++/src/H5DataSet.h @@ -99,7 +99,6 @@ class H5_DLLCPP DataSet : public H5Object, public AbstractDs { // Gets the dataset id. virtual hid_t getId() const; - virtual void p_setId(const hid_t new_id); // Destructor: properly terminates access to this dataset. virtual ~DataSet(); @@ -112,6 +111,10 @@ class H5_DLLCPP DataSet : public H5Object, public AbstractDs { // defined in AbstractDs for generic datatype and specific // sub-types virtual hid_t p_get_type() const; + + protected: + // Sets the dataset id. + virtual void p_setId(const hid_t new_id); }; #ifndef H5_NO_NAMESPACE } diff --git a/c++/src/H5DataSpace.h b/c++/src/H5DataSpace.h index 3e5776d..80842f7 100644 --- a/c++/src/H5DataSpace.h +++ b/c++/src/H5DataSpace.h @@ -114,13 +114,16 @@ class H5_DLLCPP DataSpace : public IdComponent { // Gets the dataspace id. virtual hid_t getId() const; - virtual void p_setId(const hid_t new_id); // Destructor: properly terminates access to this dataspace. virtual ~DataSpace(); private: hid_t id; // HDF5 dataspace id + + protected: + // Sets the dataspace id. + virtual void p_setId(const hid_t new_id); }; #ifndef H5_NO_NAMESPACE } diff --git a/c++/src/H5DataType.h b/c++/src/H5DataType.h index d00b807..4e7ca03 100644 --- a/c++/src/H5DataType.h +++ b/c++/src/H5DataType.h @@ -119,13 +119,16 @@ class H5_DLLCPP DataType : public H5Object { // Gets the datatype id. virtual hid_t getId() const; - virtual void p_setId(const hid_t new_id); // Destructor: properly terminates access to this datatype. virtual ~DataType(); protected: hid_t id; // HDF5 datatype id + + // Sets the datatype id. + virtual void p_setId(const hid_t new_id); + private: void p_commit(hid_t loc_id, const char* name); }; diff --git a/c++/src/H5File.h b/c++/src/H5File.h index 060a121..b49118e 100644 --- a/c++/src/H5File.h +++ b/c++/src/H5File.h @@ -109,9 +109,8 @@ class H5_DLLCPP H5File : public IdComponent, public CommonFG { // Copy constructor: makes a copy of the original H5File object. H5File(const H5File& original); - // Gets/Sets the HDF5 file id. + // Gets the HDF5 file id. virtual hid_t getId() const; - virtual void p_setId(const hid_t new_id); // H5File destructor. virtual ~H5File(); @@ -136,6 +135,10 @@ class H5_DLLCPP H5File : public IdComponent, public CommonFG { // Retrieves a dataspace with the region pointed to selected. hid_t p_get_region(void *ref, H5R_type_t ref_type) const; + protected: + // Sets the HDF5 file id. + virtual void p_setId(const hid_t new_id); + #endif // DOXYGEN_SHOULD_SKIP_THIS }; diff --git a/c++/src/H5Group.h b/c++/src/H5Group.h index 7fa7522..d296b84 100644 --- a/c++/src/H5Group.h +++ b/c++/src/H5Group.h @@ -55,7 +55,6 @@ class H5_DLLCPP Group : public H5Object, public CommonFG { // Gets the group id. virtual hid_t getId() const; - virtual void p_setId(const hid_t new_id); // Destructor virtual ~Group(); @@ -65,6 +64,10 @@ class H5_DLLCPP Group : public H5Object, public CommonFG { private: hid_t id; // HDF5 group id + + protected: + // Sets the group id. + virtual void p_setId(const hid_t new_id); }; #ifndef H5_NO_NAMESPACE } diff --git a/c++/src/H5IdComponent.h b/c++/src/H5IdComponent.h index 5bbfb71..7f573a1 100644 --- a/c++/src/H5IdComponent.h +++ b/c++/src/H5IdComponent.h @@ -85,13 +85,13 @@ class H5_DLLCPP IdComponent { // Gets the name of the file, in which an HDF5 object belongs. H5std_string p_get_file_name() const; + // Verifies that the given id is valid. + static bool p_valid_id(const hid_t obj_id); + // Sets the identifier of this object to a new value. - this one // doesn't increment reference count virtual void p_setId(const hid_t new_id) = 0; - // Verifies that the given id is valid. - static bool p_valid_id(const hid_t obj_id); - #endif // DOXYGEN_SHOULD_SKIP_THIS }; // end class IdComponent diff --git a/c++/src/H5PropList.h b/c++/src/H5PropList.h index e25a8ab..5dfa538 100644 --- a/c++/src/H5PropList.h +++ b/c++/src/H5PropList.h @@ -105,13 +105,15 @@ class H5_DLLCPP PropList : public IdComponent { // Gets the property list id. virtual hid_t getId() const; - virtual void p_setId(const hid_t new_id); // Destructor: properly terminates access to this property list. virtual ~PropList(); protected: hid_t id; // HDF5 property list id + + // Sets the property list id. + virtual void p_setId(const hid_t new_id); }; #ifndef H5_NO_NAMESPACE -- cgit v0.12