HDF5 C++ API Reference Manual

 

 

 

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

H5Idtemplates.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 _H5Idtemplates_h 00017 #define _H5Idtemplates_h 00018 00019 #include "H5IdComponent.h" 00020 00021 #ifndef H5_NO_NAMESPACE 00022 namespace H5 { 00023 #endif 00024 00025 #ifndef DOXYGEN_SHOULD_SKIP_THIS 00026 //-------------------------------------------------------------------------- 00027 // Function: resetIdComponent 00037 // 00038 // Note: Some older compilers don't support template member functions; 00039 // so at this time, resetIdComponent is not a member function so 00040 // it can be template to work around that problem. 00041 // Programmer Binh-Minh Ribler - 2000 00042 //-------------------------------------------------------------------------- 00043 template <class Type> 00044 H5_DLLCPP void resetIdComponent( 00045 Type* obj ) // pointer to object to be reset 00046 { 00047 if( obj->noReference()) // ref count of this object is decremented here 00048 { 00049 if( obj->getId() > 0 ) 00050 { 00051 obj->p_close(); // which p_close depends on whom this 00052 // IdComponent object belongs to 00053 } 00054 obj->reset(); // delete ref_count from IdComponent 00055 } 00056 } 00057 #endif // DOXYGEN_SHOULD_SKIP_THIS 00058 #ifndef H5_NO_NAMESPACE 00059 } 00060 #endif 00061 #endif

Generated on Thu Aug 5 00:22:37 2004 by doxygen 1.3.7-20040718