summaryrefslogtreecommitdiffstats
path: root/c++/src
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2007-08-28 19:47:00 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2007-08-28 19:47:00 (GMT)
commita84811bfb889762150014188680fad0ce05877ba (patch)
treee2dac8f7d6d8a7c0e306d3706e4433bd31e70f0c /c++/src
parent2785c61b8daddefe90c38f7e57d75957d906e8b8 (diff)
downloadhdf5-a84811bfb889762150014188680fad0ce05877ba.zip
hdf5-a84811bfb889762150014188680fad0ce05877ba.tar.gz
hdf5-a84811bfb889762150014188680fad0ce05877ba.tar.bz2
[svn-r14117] Description:
Move H5Glink() into "deprecated routines" section, replacing internal usage with H5Lcreate_hard/H5Lcreate_soft. Tested on: FreeBSD/32 6.2 (duty) FreeBSD/64 6.2 (liberty) Solaris/32 5.10 (linew)
Diffstat (limited to 'c++/src')
-rw-r--r--c++/src/H5CommonFG.cpp19
1 files changed, 17 insertions, 2 deletions
diff --git a/c++/src/H5CommonFG.cpp b/c++/src/H5CommonFG.cpp
index 2b20541..f8b0c05 100644
--- a/c++/src/H5CommonFG.cpp
+++ b/c++/src/H5CommonFG.cpp
@@ -245,10 +245,25 @@ DataSet CommonFG::openDataSet( const H5std_string& name ) const
//--------------------------------------------------------------------------
void CommonFG::link( H5G_link_t link_type, const char* curr_name, const char* new_name ) const
{
- herr_t ret_value = H5Glink( getLocId(), link_type, curr_name, new_name );
+ herr_t ret_value;
+
+ switch(link_type) {
+ case H5L_TYPE_HARD:
+ ret_value = H5Lcreate_hard( getLocId(), curr_name, H5L_SAME_LOC, new_name, H5P_DEFAULT, H5P_DEFAULT );
+ break;
+
+ case H5L_TYPE_SOFT:
+ ret_value = H5Lcreate_soft( curr_name, getLocId(), new_name, H5P_DEFAULT, H5P_DEFAULT );
+ break;
+
+ default:
+ throwException("link", "unknown link type");
+ break;
+ } /* end switch */
+
if( ret_value < 0 )
{
- throwException("link", "H5Glink failed");
+ throwException("link", "creating link failed");
}
}