diff options
Diffstat (limited to 'c++')
-rw-r--r-- | c++/src/H5CommonFG.cpp | 2 | ||||
-rw-r--r-- | c++/src/H5CommonFG.h | 14 | ||||
-rw-r--r-- | c++/test/tattr.cpp | 16 |
3 files changed, 25 insertions, 7 deletions
diff --git a/c++/src/H5CommonFG.cpp b/c++/src/H5CommonFG.cpp index 0ea3923..b76d8b0 100644 --- a/c++/src/H5CommonFG.cpp +++ b/c++/src/H5CommonFG.cpp @@ -341,6 +341,7 @@ void CommonFG::move( const H5std_string& src, const H5std_string& dst ) const move( src.c_str(), dst.c_str() ); } +#ifndef H5_NO_DEPRECATED_SYMBOLS //-------------------------------------------------------------------------- // Function: CommonFG::getObjinfo ///\brief Returns information about an object. @@ -402,6 +403,7 @@ void CommonFG::getObjinfo( const H5std_string& name, H5G_stat_t& statbuf ) const { getObjinfo( name.c_str(), statbuf ); } +#endif /* H5_NO_DEPRECATED_SYMBOLS */ //-------------------------------------------------------------------------- // Function: CommonFG::getLinkval diff --git a/c++/src/H5CommonFG.h b/c++/src/H5CommonFG.h index ed1c132..2a2e6cd 100644 --- a/c++/src/H5CommonFG.h +++ b/c++/src/H5CommonFG.h @@ -69,13 +69,6 @@ class H5_DLLCPP CommonFG { // Returns the number of objects in this group. hsize_t getNumObjs() const; - // Returns information about an HDF5 object, given by its name, - // at this location. - void getObjinfo(const char* name, hbool_t follow_link, H5G_stat_t& statbuf) const; - void getObjinfo(const H5std_string& name, hbool_t follow_link, H5G_stat_t& statbuf) const; - void getObjinfo(const char* name, H5G_stat_t& statbuf) const; - void getObjinfo(const H5std_string& name, H5G_stat_t& statbuf) const; - // Retrieves the name of an object in this group, given the // object's index. ssize_t getObjnameByIdx(hsize_t idx, H5std_string& name, size_t size) const; @@ -87,6 +80,13 @@ class H5_DLLCPP CommonFG { H5G_obj_t getObjTypeByIdx(hsize_t idx, H5std_string& type_name) const; #ifndef H5_NO_DEPRECATED_SYMBOLS + // Returns information about an HDF5 object, given by its name, + // at this location. + void getObjinfo(const char* name, hbool_t follow_link, H5G_stat_t& statbuf) const; + void getObjinfo(const H5std_string& name, hbool_t follow_link, H5G_stat_t& statbuf) const; + void getObjinfo(const char* name, H5G_stat_t& statbuf) const; + void getObjinfo(const H5std_string& name, H5G_stat_t& statbuf) const; + // Iterates over the elements of this group - not implemented in // C++ style yet. int iterateElems(const char* name, int *idx, H5G_iterate_t op, void *op_data); diff --git a/c++/test/tattr.cpp b/c++/test/tattr.cpp index ca0516a..0d545d7 100644 --- a/c++/test/tattr.cpp +++ b/c++/test/tattr.cpp @@ -1026,7 +1026,9 @@ static void test_attr_dtype_shared() { int data=8; /* Data to write */ int rdata=0; /* Read read in */ +#ifndef H5_NO_DEPRECATED_SYMBOLS H5G_stat_t statbuf; /* Object's information */ +#endif /* H5_NO_DEPRECATED_SYMBOLS */ h5_stat_size_t filesize; /* Size of file after modifications */ // Output message about test being performed @@ -1054,9 +1056,11 @@ static void test_attr_dtype_shared() // Commit datatype to file dtype.commit(fid1, TYPE1_NAME); +#ifndef H5_NO_DEPRECATED_SYMBOLS // Check reference count on named datatype fid1.getObjinfo(TYPE1_NAME, statbuf); verify_val((int)statbuf.nlink, 1, "DataType::getObjinfo", __LINE__, __FILE__); +#endif /* H5_NO_DEPRECATED_SYMBOLS */ // Create dataspace for dataset DataSpace dspace; @@ -1070,16 +1074,20 @@ static void test_attr_dtype_shared() // Create dataset DataSet dset = fid1.createDataSet(DSET1_NAME, dtype, dspace); +#ifndef H5_NO_DEPRECATED_SYMBOLS // Check reference count on named datatype fid1.getObjinfo(TYPE1_NAME, statbuf); verify_val((int)statbuf.nlink, 2, "H5File::getObjinfo", __LINE__, __FILE__); +#endif /* H5_NO_DEPRECATED_SYMBOLS */ // Create attribute on dataset Attribute attr = dset.createAttribute(ATTR1_NAME,dtype,dspace); +#ifndef H5_NO_DEPRECATED_SYMBOLS // Check reference count on named datatype fid1.getObjinfo(TYPE1_NAME, statbuf); verify_val((int)statbuf.nlink, 3, "DataSet::getObjinfo", __LINE__, __FILE__); +#endif /* H5_NO_DEPRECATED_SYMBOLS */ // Close attribute attr.close(); @@ -1087,16 +1095,20 @@ static void test_attr_dtype_shared() // Delete attribute dset.removeAttr(ATTR1_NAME); +#ifndef H5_NO_DEPRECATED_SYMBOLS // Check reference count on named datatype fid1.getObjinfo(TYPE1_NAME, statbuf); verify_val((int)statbuf.nlink, 2, "DataSet::getObjinfo after DataSet::removeAttr", __LINE__, __FILE__); +#endif /* H5_NO_DEPRECATED_SYMBOLS */ // Create attribute on dataset attr = dset.createAttribute(ATTR1_NAME,dtype,dspace); +#ifndef H5_NO_DEPRECATED_SYMBOLS // Check reference count on named datatype fid1.getObjinfo(TYPE1_NAME, statbuf); verify_val((int)statbuf.nlink, 3, "DataSet::createAttribute", __LINE__, __FILE__); +#endif /* H5_NO_DEPRECATED_SYMBOLS */ // Write data into the attribute attr.write(PredType::NATIVE_INT,&data); @@ -1125,18 +1137,22 @@ static void test_attr_dtype_shared() delete attr2; delete dset2; +#ifndef H5_NO_DEPRECATED_SYMBOLS // Check reference count on named datatype fid1.getObjinfo(TYPE1_NAME, statbuf); verify_val((int)statbuf.nlink, 3, "DataSet::openAttribute", __LINE__, __FILE__); +#endif /* H5_NO_DEPRECATED_SYMBOLS */ // Unlink the dataset fid1.unlink(DSET1_NAME); } // end of enclosing to test reference counts +#ifndef H5_NO_DEPRECATED_SYMBOLS // Check reference count on named datatype fid1.getObjinfo(TYPE1_NAME, statbuf); verify_val((int)statbuf.nlink, 1, "H5File::unlink", __LINE__, __FILE__); +#endif /* H5_NO_DEPRECATED_SYMBOLS */ // Unlink the named datatype fid1.unlink(TYPE1_NAME); |