Source
Attribute H5Object::createAttribute( const string& name, const DataType& data_type, const DataSpace& data_space, const PropList& create_plist ) const
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* Copyright by the Board of Trustees of the University of Illinois. *
* All rights reserved. *
* *
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the files COPYING and Copyright.html. COPYING can be found at the root *
* of the source code distribution tree; Copyright.html can be found at the *
* root level of an installed copy of the electronic HDF5 document set and *
* is linked from the top-level documents page. It can also be found at *
* http://hdf.ncsa.uiuc.edu/HDF5/doc/Copyright.html. If you do not have *
* access to either file, you may request a copy from hdfhelp@ncsa.uiuc.edu. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
namespace H5 {
// userAttrOpWrpr simply interfaces between the user's function and the
// C library function H5Aiterate; used to resolve the different prototype
// problem. May be moved to Iterator later.
extern "C" herr_t userAttrOpWrpr( hid_t loc_id, const char* attr_name, void* op_data )
{
string s_attr_name = string( attr_name );
UserData4Aiterate* myData = (UserData4Aiterate *) op_data;
UserData4Aiterate* myData = static_cast <UserData4Aiterate *> (op_data);
myData->op( *myData->object, s_attr_name, myData->opData );
return 0;
}
//--------------------------------------------------------------------------
// Function: H5Object default constructor (protected)
// Description
// The id is set to 0 here but subclass constructor will set
// it to a valid HDF5 id.
// Programmer Binh-Minh Ribler - 2000