HDF5 C++ API Reference Manual

 

 

 

Main Page | Namespace List | Class Hierarchy | Class List | File List | Class Members | Examples

H5IdComponent.h

Go to the documentation of this file.
00001 // C++ informative line for the emacs editor: -*- C++ -*- 00002 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 00003 * Copyright by the Board of Trustees of the University of Illinois. * 00004 * All rights reserved. * 00005 * * 00006 * This file is part of HDF5. The full HDF5 copyright notice, including * 00007 * terms governing use, modification, and redistribution, is contained in * 00008 * the files COPYING and Copyright.html. COPYING can be found at the root * 00009 * of the source code distribution tree; Copyright.html can be found at the * 00010 * root level of an installed copy of the electronic HDF5 document set and * 00011 * is linked from the top-level documents page. It can also be found at * 00012 * http://hdf.ncsa.uiuc.edu/HDF5/doc/Copyright.html. If you do not have * 00013 * access to either file, you may request a copy from hdfhelp@ncsa.uiuc.edu. * 00014 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ 00015 00016 #ifndef _IdComponent_H 00017 #define _IdComponent_H 00018 00019 // IdComponent represents an HDF5 object that has an identifier. 00020 00021 #ifndef H5_NO_NAMESPACE 00022 namespace H5 { 00023 #endif 00024 00025 class H5_DLLCPP IdComponent { 00026 public: 00027 // Increment reference counter. 00028 void incRefCount(); 00029 00030 // Decrement reference counter. 00031 void decRefCount(); 00032 00033 // Get the reference counter to this identifier. 00034 int getCounter(); 00035 00036 // Assignment operator. 00037 IdComponent& operator=( const IdComponent& rhs ); 00038 00039 void reset(); 00040 00041 // Sets the identifier of this object to a new value. 00042 void setId( hid_t new_id ); 00043 00044 // Creates an object to hold an HDF5 identifier. 00045 IdComponent( const hid_t h5_id ); 00046 00047 // Copy constructor: makes copy of the original IdComponent object. 00048 IdComponent( const IdComponent& original ); 00049 00050 // Gets the value of IdComponent's data member. 00051 virtual hid_t getId () const; 00052 00053 // Destructor 00054 virtual ~IdComponent(); 00055 00056 protected: 00057 #ifndef DOXYGEN_SHOULD_SKIP_THIS 00058 hid_t id; // HDF5 object id 00059 00060 // Default constructor. 00061 IdComponent(); 00062 00063 // Gets the name of the file, in which an HDF5 object belongs. 00064 #ifdef H5_NO_STD 00065 string p_get_file_name() const; 00066 #else 00067 std::string p_get_file_name() const; 00068 #endif // H5_NO_STD 00069 00070 // Gets the id of the H5 file in which the given object is located. 00071 hid_t p_get_file_id(); 00072 00073 // Creates a reference to an HDF5 object or a dataset region. 00074 void* p_reference(const char* name, hid_t space_id, H5R_type_t ref_type) const; 00075 00076 // Retrieves the type of object that an object reference points to. 00077 H5G_obj_t p_get_obj_type(void *ref, H5R_type_t ref_type) const; 00078 00079 // Retrieves a dataspace with the region pointed to selected. 00080 hid_t p_get_region(void *ref, H5R_type_t ref_type) const; 00081 #endif // DOXYGEN_SHOULD_SKIP_THIS 00082 00083 }; // end class IdComponent 00084 00085 #ifndef H5_NO_NAMESPACE 00086 } 00087 #endif 00088 #endif

Generated on Sat Aug 21 16:36:47 2004 by doxygen 1.3.7-20040718