From d5e8cfbe74c36a64df68152bb2f59fa5a4056fd5 Mon Sep 17 00:00:00 2001 From: Binh-Minh Ribler Date: Mon, 30 Sep 2013 21:58:27 -0500 Subject: [svn-r24236] Description: - Appended h5tutr_ to names of data files to avoid name clashing with existing examples. - Added example dependencies to Makefile.* (pointed out by Allen) Platforms tested: SunOS 5.11 (emu) with gmake Linux/ppc64 (ostrich) Linux/32 2.6 (jam) Linux/64 2.6 (koala)/PGI compilers --- c++/examples/Makefile.am | 3 +++ c++/examples/Makefile.in | 3 +++ c++/examples/h5tutr_cmprss.cpp | 2 +- c++/examples/h5tutr_crtatt.cpp | 2 +- c++/examples/h5tutr_crtdat.cpp | 2 +- c++/examples/h5tutr_crtgrp.cpp | 2 +- c++/examples/h5tutr_crtgrpar.cpp | 2 +- c++/examples/h5tutr_crtgrpd.cpp | 2 +- c++/examples/h5tutr_extend.cpp | 2 +- c++/examples/h5tutr_rdwt.cpp | 14 +++++++------- c++/examples/h5tutr_subset.cpp | 2 +- c++/src/H5Location.cpp | 2 +- 12 files changed, 22 insertions(+), 16 deletions(-) diff --git a/c++/examples/Makefile.am b/c++/examples/Makefile.am index f479776..df68447 100644 --- a/c++/examples/Makefile.am +++ b/c++/examples/Makefile.am @@ -40,6 +40,9 @@ INSTALL_SCRIPT_FILES = run-c++-ex.sh # Some of the examples depend on files created by running other examples readdata.chkexe_: create.chkexe_ chunks.chkexe_: extend_ds.chkexe_ +h5tutr_rdwt.chkexe_: h5tutr_crtdat.chkexe +h5tutrcrtatt.chkexe_: h5tutr_crtdat.chkexe +h5tutr_crtgrpd.chkexe_: h5tutr_crtgrpar.chkexe # Tell conclude.am that these are C++ tests. CXX_API=yes diff --git a/c++/examples/Makefile.in b/c++/examples/Makefile.in index 43894ca..738a053 100644 --- a/c++/examples/Makefile.in +++ b/c++/examples/Makefile.in @@ -658,6 +658,9 @@ help: # Some of the examples depend on files created by running other examples readdata.chkexe_: create.chkexe_ chunks.chkexe_: extend_ds.chkexe_ +h5tutr_rdwt.chkexe_: h5tutr_crtdat.chkexe_ +h5tutrcrtatt.chkexe_: h5tutr_crtdat.chkexe_ +h5tutr_crtgrpd.chkexe_: h5tutr_crtgrpar.chkexe_ # How to build programs using h5c++ $(EXTRA_PROG): $(H5CPP) diff --git a/c++/examples/h5tutr_cmprss.cpp b/c++/examples/h5tutr_cmprss.cpp index 7db73c4..e9c87f1 100644 --- a/c++/examples/h5tutr_cmprss.cpp +++ b/c++/examples/h5tutr_cmprss.cpp @@ -31,7 +31,7 @@ #endif // H5_NO_STD #endif -const H5std_string FILE_NAME("cmprss.h5"); +const H5std_string FILE_NAME("h5tutr_cmprss.h5"); const H5std_string DATASET_NAME("Compressed_Data"); const int DIM0 = 100; const int DIM1 = 20; diff --git a/c++/examples/h5tutr_crtatt.cpp b/c++/examples/h5tutr_crtatt.cpp index 651dc69..df8ca5a 100644 --- a/c++/examples/h5tutr_crtatt.cpp +++ b/c++/examples/h5tutr_crtatt.cpp @@ -27,7 +27,7 @@ using namespace H5; #endif -const H5std_string FILE_NAME( "dset.h5" ); +const H5std_string FILE_NAME( "h5tutr_dset.h5" ); const H5std_string DATASET_NAME( "dset" ); const H5std_string ATTR_NAME( "Units" ); diff --git a/c++/examples/h5tutr_crtdat.cpp b/c++/examples/h5tutr_crtdat.cpp index d7f887e..c767f72 100644 --- a/c++/examples/h5tutr_crtdat.cpp +++ b/c++/examples/h5tutr_crtdat.cpp @@ -27,7 +27,7 @@ using namespace H5; #endif -const H5std_string FILE_NAME("dset.h5"); +const H5std_string FILE_NAME("h5tutr_dset.h5"); const H5std_string DATASET_NAME("dset"); const int NX = 4; // dataset dimensions const int NY = 6; diff --git a/c++/examples/h5tutr_crtgrp.cpp b/c++/examples/h5tutr_crtgrp.cpp index bbafd10..3db4e72 100644 --- a/c++/examples/h5tutr_crtgrp.cpp +++ b/c++/examples/h5tutr_crtgrp.cpp @@ -31,7 +31,7 @@ #endif // H5_NO_STD #endif -const H5std_string FILE_NAME("group.h5"); +const H5std_string FILE_NAME("h5tutr_group.h5"); int main(void) { diff --git a/c++/examples/h5tutr_crtgrpar.cpp b/c++/examples/h5tutr_crtgrpar.cpp index d58dff6..f6e031f 100644 --- a/c++/examples/h5tutr_crtgrpar.cpp +++ b/c++/examples/h5tutr_crtgrpar.cpp @@ -31,7 +31,7 @@ #endif // H5_NO_STD #endif -const H5std_string FILE_NAME("groups.h5"); +const H5std_string FILE_NAME("h5tutr_groups.h5"); int main(void) { diff --git a/c++/examples/h5tutr_crtgrpd.cpp b/c++/examples/h5tutr_crtgrpd.cpp index fdb9108..f0bde52 100644 --- a/c++/examples/h5tutr_crtgrpd.cpp +++ b/c++/examples/h5tutr_crtgrpd.cpp @@ -31,7 +31,7 @@ #endif // H5_NO_STD #endif -const H5std_string FILE_NAME("groups.h5"); +const H5std_string FILE_NAME("h5tutr_groups.h5"); const H5std_string DATASET_NAME1("/MyGroup/dset1"); const H5std_string DATASET_NAME2("dset2"); const int RANK = 2; diff --git a/c++/examples/h5tutr_extend.cpp b/c++/examples/h5tutr_extend.cpp index 33de923..432ca5e 100644 --- a/c++/examples/h5tutr_extend.cpp +++ b/c++/examples/h5tutr_extend.cpp @@ -31,7 +31,7 @@ #endif // H5_NO_STD #endif -const H5std_string FILE_NAME("extend.h5"); +const H5std_string FILE_NAME("h5tutr_extend.h5"); const H5std_string DATASETNAME("ExtendibleArray"); int main (void) diff --git a/c++/examples/h5tutr_rdwt.cpp b/c++/examples/h5tutr_rdwt.cpp index e6e45b7..68c28ca 100644 --- a/c++/examples/h5tutr_rdwt.cpp +++ b/c++/examples/h5tutr_rdwt.cpp @@ -27,8 +27,8 @@ using namespace H5; #endif -const H5std_string FILE_NAME( "dset.h5" ); -const H5std_string DATASET_NAME( "dset" ); +const H5std_string FILE_NAME("h5tutr_dset.h5"); +const H5std_string DATASET_NAME("dset"); const int DIM0 = 4; // dataset dimensions const int DIM1 = 6; @@ -52,24 +52,24 @@ int main (void) Exception::dontPrint(); // Open an existing file and dataset. - H5File file( FILE_NAME, H5F_ACC_RDWR ); - DataSet dataset = file.openDataSet( DATASET_NAME ); + H5File file(FILE_NAME, H5F_ACC_RDWR); + DataSet dataset = file.openDataSet(DATASET_NAME); // Write the data to the dataset using default memory space, file // space, and transfer properties. - dataset.write( data, PredType::NATIVE_INT ); + dataset.write(data, PredType::NATIVE_INT); } // end of try block // catch failure caused by the H5File operations - catch( FileIException error ) + catch(FileIException error) { error.printError(); return -1; } // catch failure caused by the DataSet operations - catch( DataSetIException error ) + catch(DataSetIException error) { error.printError(); return -1; diff --git a/c++/examples/h5tutr_subset.cpp b/c++/examples/h5tutr_subset.cpp index 77174ab..ad52747 100644 --- a/c++/examples/h5tutr_subset.cpp +++ b/c++/examples/h5tutr_subset.cpp @@ -31,7 +31,7 @@ #endif // H5_NO_STD #endif -const H5std_string FILE_NAME("subset.h5"); +const H5std_string FILE_NAME("h5tutr_subset.h5"); const H5std_string DATASET_NAME("IntArray"); const int RANK = 2; diff --git a/c++/src/H5Location.cpp b/c++/src/H5Location.cpp index 1307740..19e9e04 100644 --- a/c++/src/H5Location.cpp +++ b/c++/src/H5Location.cpp @@ -279,7 +279,7 @@ bool H5Location::attrExists(const char* name) const //-------------------------------------------------------------------------- bool H5Location::attrExists(const H5std_string& name) const { - attrExists(name.c_str()); + return(attrExists(name.c_str())); } //-------------------------------------------------------------------------- -- cgit v0.12