[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)
This commit is contained in:
Binh-Minh Ribler
2004-08-19 23:29:58 -05:00
parent 226df40694
commit 4a04b0c05c
8 changed files with 360 additions and 171 deletions

View File

@@ -22,22 +22,25 @@ namespace H5 {
class H5_DLLCPP H5File : public IdComponent, public CommonFG {
public:
// Default constructor
H5File();
// copy constructor: makes a copy of the original H5File object.
H5File(const H5File& original );
// Creates or opens an HDF5 file.
H5File( const string& name, unsigned int flags,
const FileCreatPropList& create_plist = FileCreatPropList::DEFAULT,
const FileAccPropList& access_plist = FileAccPropList::DEFAULT );
H5File( const char* name, unsigned int flags,
const FileCreatPropList& create_plist = FileCreatPropList::DEFAULT,
const FileAccPropList& access_plist = FileAccPropList::DEFAULT );
H5File( const string& name, unsigned int flags,
const FileCreatPropList& create_plist = FileCreatPropList::DEFAULT,
const FileAccPropList& access_plist = FileAccPropList::DEFAULT );
// Gets the file id
virtual hid_t getLocId() const;
// Gets the access property list of this file.
FileAccPropList getAccessPlist() const;
// Gets the creation property list of this file.
FileCreatPropList getCreatePlist() const;
// Gets the name of this file.
string getFileName() const;
// Retrieves the file size of an opened file.
hsize_t getFileSize() const;
// Returns the amount of free space in the file.
hssize_t getFreeSpace() const;
@@ -51,42 +54,43 @@ class H5_DLLCPP H5File : public IdComponent, public CommonFG {
// and datatypes) in the same file.
void getObjIDs(unsigned types, int max_objs, hid_t *oid_list) const;
// Returns the pointer to the file handle of the low-level file driver.
void getVFDHandle(FileAccPropList& fapl, void **file_handle) const;
void getVFDHandle(void **file_handle) const;
// Determines if a file, specified by its name, is in HDF5 format
static bool isHdf5(const string& name );
static bool isHdf5(const char* name );
// Creates a reference to a named Hdf5 object in this object.
void* Reference(const char* name) const;
// Creates a reference to a named Hdf5 object or to a dataset region
// in this object.
void* Reference(const char* name, DataSpace& dataspace, H5R_type_t ref_type = H5R_DATASET_REGION) const;
// Retrieves the type of object that an object reference points to.
H5G_obj_t getObjType(void *ref, H5R_type_t ref_type) const;
// Retrieves a dataspace with the region pointed to selected.
DataSpace getRegion(void *ref, H5R_type_t ref_type = H5R_DATASET_REGION) const;
// Retrieves the file size of an opened file.
hsize_t getFileSize() const;
// Returns the pointer to the file handle of the low-level file driver.
void getVFDHandle(FileAccPropList& fapl, void **file_handle) const;
void getVFDHandle(void **file_handle) const;
// Determines if a file, specified by its name, is in HDF5 format
static bool isHdf5(const char* name );
static bool isHdf5(const string& name );
// Reopens this file.
void reOpen(); // added for better name
void reopen();
// Gets the creation property list of this file.
FileCreatPropList getCreatePlist() const;
// Creates a reference to a named Hdf5 object or to a dataset region
// in this object.
void* Reference(const char* name, DataSpace& dataspace, H5R_type_t ref_type = H5R_DATASET_REGION) const;
// Gets the access property list of this file.
FileAccPropList getAccessPlist() const;
// Creates a reference to a named Hdf5 object in this object.
void* Reference(const char* name) const;
// Throw file exception.
virtual void throwException(const string func_name, const string msg) const;
// Gets the file id
virtual hid_t getLocId() const;
// Default constructor
H5File();
// Copy constructor: makes a copy of the original H5File object.
H5File(const H5File& original);
// H5File destructor.
virtual ~H5File();