summaryrefslogtreecommitdiffstats
path: root/c++/src/H5IdComponent.h
diff options
context:
space:
mode:
authorBinh-Minh Ribler <bmribler@hdfgroup.org>2004-08-20 04:29:58 (GMT)
committerBinh-Minh Ribler <bmribler@hdfgroup.org>2004-08-20 04:29:58 (GMT)
commit4a04b0c05c608de05c69c33a6dced509d04cde09 (patch)
tree55484a35e37d81d1128a05c8c004d17a7ac2826a /c++/src/H5IdComponent.h
parent226df4069427644a4a53087e8303a5685a07533c (diff)
downloadhdf5-4a04b0c05c608de05c69c33a6dced509d04cde09.zip
hdf5-4a04b0c05c608de05c69c33a6dced509d04cde09.tar.gz
hdf5-4a04b0c05c608de05c69c33a6dced509d04cde09.tar.bz2
[svn-r9127] Purpose: Adding wrapper for new C API and other updates
Description: Added wrappers for H5Fget_name: H5File::getFileName H5Object::getFileName Moved some functions from Group into the base class CommonFG for H5File too. Platforms tested: SunOS 5.7 (arabica) Linux 2.4 (eirene)
Diffstat (limited to 'c++/src/H5IdComponent.h')
-rw-r--r--c++/src/H5IdComponent.h66
1 files changed, 36 insertions, 30 deletions
diff --git a/c++/src/H5IdComponent.h b/c++/src/H5IdComponent.h
index 1f6a7be..45dc2a5 100644
--- a/c++/src/H5IdComponent.h
+++ b/c++/src/H5IdComponent.h
@@ -16,8 +16,7 @@
#ifndef _IdComponent_H
#define _IdComponent_H
-// IdComponent provides a mechanism to handle
-// reference counting for an identifier of any HDF5 object.
+// IdComponent represents an HDF5 object that has an identifier.
#ifndef H5_NO_NAMESPACE
namespace H5 {
@@ -25,54 +24,61 @@ namespace H5 {
class H5_DLLCPP IdComponent {
public:
- // Parent classes must reset the current IdComponent copy
- // before setting new id to control reference count
- void setId( hid_t new_id );
-
- // Creates an object to hold an HDF5 identifier
- IdComponent( const hid_t h5_id );
-
- // Copy constructor: makes copy of the original IdComponent object.
- IdComponent( const IdComponent& original );
-
- // Gets the value of IdComponent's data member
- virtual hid_t getId () const;
-
- // Increment reference counter
+ // Increment reference counter.
void incRefCount();
- // Decrement reference counter
+ // Decrement reference counter.
void decRefCount();
- // Get the reference counter to this identifier
+ // Get the reference counter to this identifier.
int getCounter();
- // Assignment operator
+ // Assignment operator.
IdComponent& operator=( const IdComponent& rhs );
void reset();
- void resetId();
+
+ // Sets the identifier of this object to a new value.
+ void setId( hid_t new_id );
+
+ // Creates an object to hold an HDF5 identifier.
+ IdComponent( const hid_t h5_id );
+
+ // Copy constructor: makes copy of the original IdComponent object.
+ IdComponent( const IdComponent& original );
+
+ // Gets the value of IdComponent's data member.
+ virtual hid_t getId () const;
// Destructor
virtual ~IdComponent();
protected:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
hid_t id; // HDF5 object id
- // Default constructor
+ // Default constructor.
IdComponent();
- // Gets the id of the H5 file in which the given object is located.
- hid_t p_get_file_id();
+ // Gets the name of the file, in which an HDF5 object belongs.
+#ifdef H5_NO_STD
+ string p_get_file_name() const;
+#else
+ std::string p_get_file_name() const;
+#endif // H5_NO_STD
+
+ // Gets the id of the H5 file in which the given object is located.
+ hid_t p_get_file_id();
+
+ // Creates a reference to an HDF5 object or a dataset region.
+ void* p_reference(const char* name, hid_t space_id, H5R_type_t ref_type) const;
- // Creates a reference to an HDF5 object or a dataset region.
- void* p_reference(const char* name, hid_t space_id, H5R_type_t ref_type) const;
-
- // Retrieves the type of object that an object reference points to.
- H5G_obj_t p_get_obj_type(void *ref, H5R_type_t ref_type) const;
+ // Retrieves the type of object that an object reference points to.
+ H5G_obj_t p_get_obj_type(void *ref, H5R_type_t ref_type) const;
- // Retrieves a dataspace with the region pointed to selected.
- hid_t p_get_region(void *ref, H5R_type_t ref_type) const;
+ // Retrieves a dataspace with the region pointed to selected.
+ hid_t p_get_region(void *ref, H5R_type_t ref_type) const;
+#endif // DOXYGEN_SHOULD_SKIP_THIS
}; // end class IdComponent