summaryrefslogtreecommitdiffstats
path: root/c++/examples
diff options
context:
space:
mode:
Diffstat (limited to 'c++/examples')
-rw-r--r--c++/examples/chunks.cpp5
-rw-r--r--c++/examples/compound.cpp13
-rw-r--r--c++/examples/create.cpp5
-rw-r--r--c++/examples/extend_ds.cpp5
-rw-r--r--c++/examples/h5group.cpp3
-rw-r--r--c++/examples/readdata.cpp7
-rw-r--r--c++/examples/writedata.cpp5
7 files changed, 18 insertions, 25 deletions
diff --git a/c++/examples/chunks.cpp b/c++/examples/chunks.cpp
index 2955820..783fffa 100644
--- a/c++/examples/chunks.cpp
+++ b/c++/examples/chunks.cpp
@@ -35,11 +35,10 @@
#ifndef H5_NO_NAMESPACE
using namespace H5;
- using H5_std::string;
#endif
-const string FILE_NAME( "SDSextendible.h5" );
-const string DATASET_NAME( "ExtendibleArray" );
+const H5std_string FILE_NAME( "SDSextendible.h5" );
+const H5std_string DATASET_NAME( "ExtendibleArray" );
const int NX = 10;
const int NY = 5;
const int RANK = 2;
diff --git a/c++/examples/compound.cpp b/c++/examples/compound.cpp
index 994a036..de48590 100644
--- a/c++/examples/compound.cpp
+++ b/c++/examples/compound.cpp
@@ -36,14 +36,13 @@
#ifndef H5_NO_NAMESPACE
using namespace H5;
- using H5_std::string;
#endif
-const string FILE_NAME( "SDScompound.h5" );
-const string DATASET_NAME( "ArrayOfStructures" );
-const string MEMBER1( "a_name" );
-const string MEMBER2( "b_name" );
-const string MEMBER3( "c_name" );
+const H5std_string FILE_NAME( "SDScompound.h5" );
+const H5std_string DATASET_NAME( "ArrayOfStructures" );
+const H5std_string MEMBER1( "a_name" );
+const H5std_string MEMBER2( "b_name" );
+const H5std_string MEMBER3( "c_name" );
const int LENGTH = 10;
const int RANK = 1;
@@ -124,7 +123,7 @@ int main(void)
if( member1_class == H5T_FLOAT )
{
FloatType member2 = mtype1.getMemberFloatType( 2 );
- string norm_string;
+ H5std_string norm_string;
H5T_norm_t norm = member2.getNorm( norm_string );
cout << "Normalization type is " << norm_string << endl;
}
diff --git a/c++/examples/create.cpp b/c++/examples/create.cpp
index 03cbb51..27305a9 100644
--- a/c++/examples/create.cpp
+++ b/c++/examples/create.cpp
@@ -27,11 +27,10 @@
#ifndef H5_NO_NAMESPACE
using namespace H5;
- using H5_std::string;
#endif
-const string FILE_NAME( "SDS.h5" );
-const string DATASET_NAME( "IntArray" );
+const H5std_string FILE_NAME( "SDS.h5" );
+const H5std_string DATASET_NAME( "IntArray" );
const int NX = 5; // dataset dimensions
const int NY = 6;
const int RANK = 2;
diff --git a/c++/examples/extend_ds.cpp b/c++/examples/extend_ds.cpp
index 81fb515..433d19c 100644
--- a/c++/examples/extend_ds.cpp
+++ b/c++/examples/extend_ds.cpp
@@ -37,11 +37,10 @@
#ifndef H5_NO_NAMESPACE
using namespace H5;
- using H5_std::string;
#endif
-const string FILE_NAME( "SDSextendible.h5" );
-const string DATASET_NAME( "ExtendibleArray" );
+const H5std_string FILE_NAME( "SDSextendible.h5" );
+const H5std_string DATASET_NAME( "ExtendibleArray" );
const int NX = 10;
const int NY = 5;
const int RANK = 2;
diff --git a/c++/examples/h5group.cpp b/c++/examples/h5group.cpp
index cd0eeb0..02e3961 100644
--- a/c++/examples/h5group.cpp
+++ b/c++/examples/h5group.cpp
@@ -39,10 +39,9 @@
#ifndef H5_NO_NAMESPACE
using namespace H5;
- using H5_std::string;
#endif
-const string FILE_NAME( "Group.h5" );
+const H5std_string FILE_NAME( "Group.h5" );
const int RANK = 2;
// Operator function
diff --git a/c++/examples/readdata.cpp b/c++/examples/readdata.cpp
index 7e10a55..5cc28ce 100644
--- a/c++/examples/readdata.cpp
+++ b/c++/examples/readdata.cpp
@@ -36,11 +36,10 @@
#ifndef H5_NO_NAMESPACE
using namespace H5;
- using H5_std::string;
#endif
-const string FILE_NAME( "SDS.h5" );
-const string DATASET_NAME( "IntArray" );
+const H5std_string FILE_NAME( "SDS.h5" );
+const H5std_string DATASET_NAME( "IntArray" );
const int NX_SUB = 3; // hyperslab dimensions
const int NY_SUB = 4;
const int NX = 7; // output buffer dimensions
@@ -101,7 +100,7 @@ int main (void)
/*
* Get order of datatype and print message if it's a little endian.
*/
- string order_string;
+ H5std_string order_string;
H5T_order_t order = intype.getOrder( order_string );
cout << order_string << endl;
diff --git a/c++/examples/writedata.cpp b/c++/examples/writedata.cpp
index 24e4768..3691f0b 100644
--- a/c++/examples/writedata.cpp
+++ b/c++/examples/writedata.cpp
@@ -39,11 +39,10 @@
#ifndef H5_NO_NAMESPACE
using namespace H5;
- using H5_std::string;
#endif
-const string FILE_NAME( "Select.h5" );
-const string DATASET_NAME( "Matrix in file" );
+const H5std_string FILE_NAME( "Select.h5" );
+const H5std_string DATASET_NAME( "Matrix in file" );
const int MSPACE1_RANK = 1; // Rank of the first dataset in memory
const int MSPACE1_DIM = 50; // Dataset size in memory
const int MSPACE2_RANK = 1; // Rank of the second dataset in memory