summaryrefslogtreecommitdiffstats
path: root/c++/src
diff options
context:
space:
mode:
Diffstat (limited to 'c++/src')
-rw-r--r--c++/src/C2Cppfunction_map.htm36
-rw-r--r--c++/src/H5File.cpp21
-rw-r--r--c++/src/H5File.h3
3 files changed, 60 insertions, 0 deletions
diff --git a/c++/src/C2Cppfunction_map.htm b/c++/src/C2Cppfunction_map.htm
index b53ea15..2d779a3 100644
--- a/c++/src/C2Cppfunction_map.htm
+++ b/c++/src/C2Cppfunction_map.htm
@@ -7666,6 +7666,42 @@ normal'><span style='font-size:14.0pt;mso-bidi-font-size:11.0pt;line-height:
normal'><o:p>&nbsp;</o:p></p>
</td>
</tr>
+ <tr style='mso-yfti-irow:180'>
+ <td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
+ none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+ padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>H5Fget_fileno</p>
+ </td>
+ <td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'>unsigned long H5File::getFileNum()</p>
+ </td>
+ <td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=42 valign=top style='width:31.45pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt;
+ text-align:center;line-height:normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ <td width=169 valign=top style='width:126.65pt;border-top:none;border-left:
+ none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+ mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+ mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
+ <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
+ normal'><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
<tr style='mso-yfti-irow:181'>
<td width=263 style='width:197.2pt;border:solid windowtext 1.0pt;border-top:
none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
diff --git a/c++/src/H5File.cpp b/c++/src/H5File.cpp
index 719c1ba..b9ecded 100644
--- a/c++/src/H5File.cpp
+++ b/c++/src/H5File.cpp
@@ -580,6 +580,27 @@ hsize_t H5File::getFileSize() const
}
//--------------------------------------------------------------------------
+// Function: H5File::getFileNum
+///\brief Returns the file number of the HDF5 file.
+///\return File number
+///\exception H5::FileIException
+///\par Description
+/// This function is called after an existing file is opened in
+/// order to retrieve the unique 'file number' for the file.
+// Programmer Quincey Koziol - April 13, 2019
+//--------------------------------------------------------------------------
+unsigned long H5File::getFileNum() const
+{
+ unsigned long fileno = 0;
+ herr_t ret_value = H5Fget_fileno(id, &fileno);
+ if (ret_value < 0)
+ {
+ throw FileIException("H5File::getFileNum", "H5Fget_fileno failed");
+ }
+ return (fileno);
+}
+
+//--------------------------------------------------------------------------
// Function: H5File::getId
///\brief Get the id of this file
///\return File identifier
diff --git a/c++/src/H5File.h b/c++/src/H5File.h
index 332685e..1b1227f 100644
--- a/c++/src/H5File.h
+++ b/c++/src/H5File.h
@@ -69,6 +69,9 @@ class H5_DLLCPP H5File : public Group {
// Returns the file size of the HDF5 file.
hsize_t getFileSize() const;
+ // Returns the 'file number' of the HDF5 file.
+ unsigned long getFileNum() const;
+
// Determines if a file, specified by its name, is in HDF5 format
static bool isHdf5(const char* name);
static bool isHdf5(const H5std_string& name);