HDF5 C++ API Reference Manual

 

 

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

H5DataSet.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 // Class DataSet inherits from AbstractDs and provides accesses to a dataset.
00017 
00018 #ifndef _H5DataSet_H
00019 #define _H5DataSet_H
00020 
00021 #ifndef H5_NO_NAMESPACE
00022 namespace H5 {
00023 #endif
00024 
00025 class H5_DLLCPP DataSet : public AbstractDs {
00026    public:
00027         // Close this dataset.
00028         virtual void close();
00029 
00030         // Extends the dataset with unlimited dimension.
00031         void extend( const hsize_t* size ) const;
00032 
00033         // Fills a selection in memory with a value
00034         void fillMemBuf(const void *fill, DataType& fill_type, void *buf, DataType& buf_type, DataSpace& space);
00035         // Fills a selection in memory with zero
00036         void fillMemBuf(void *buf, DataType& buf_type, DataSpace& space);
00037 
00038         // Gets the creation property list of this dataset.
00039         DSetCreatPropList getCreatePlist() const;
00040 
00041         // Returns the address of this dataset in the file.
00042         haddr_t getOffset() const;
00043 
00044         // Gets the dataspace of this dataset.
00045         virtual DataSpace getSpace() const;
00046 
00047         // Determines whether space has been allocated for a dataset.
00048         void getSpaceStatus(H5D_space_status_t& status) const;
00049 
00050         // Returns the amount of storage size required for this dataset.
00051         hsize_t getStorageSize() const;
00052 
00053         // not yet implemented??
00054         hsize_t getVlenBufSize( DataType& type, DataSpace& space ) const;
00055         void vlenReclaim( DataType& type, DataSpace& space, DSetMemXferPropList& xfer_plist, void* buf ) const;
00056 
00057         // Reads the data of this dataset and stores it in the provided buffer.
00058         // The memory and file dataspaces and the transferring property list
00059         // can be defaults.
00060         void read( void* buf, const DataType& mem_type, const DataSpace& mem_space = DataSpace::ALL, const DataSpace& file_space = DataSpace::ALL, const DSetMemXferPropList& xfer_plist = DSetMemXferPropList::DEFAULT ) const;
00061         void read( H5std_string& buf, const DataType& mem_type, const DataSpace& mem_space = DataSpace::ALL, const DataSpace& file_space = DataSpace::ALL, const DSetMemXferPropList& xfer_plist = DSetMemXferPropList::DEFAULT ) const;
00062 
00063         // Writes the buffered data to this dataset.
00064         // The memory and file dataspaces and the transferring property list
00065         // can be defaults.
00066         void write( const void* buf, const DataType& mem_type, const DataSpace& mem_space = DataSpace::ALL, const DataSpace& file_space = DataSpace::ALL, const DSetMemXferPropList& xfer_plist = DSetMemXferPropList::DEFAULT ) const;
00067         void write( const H5std_string& buf, const DataType& mem_type, const DataSpace& mem_space = DataSpace::ALL, const DataSpace& file_space = DataSpace::ALL, const DSetMemXferPropList& xfer_plist = DSetMemXferPropList::DEFAULT ) const;
00068 
00069         // Iterates the selected elements in the specified dataspace - not implemented in C++ style yet
00070         int iterateElems( void* buf, const DataType& type, const DataSpace& space, H5D_operator_t op, void* op_data = NULL );
00071 
00072         // Retrieves the type of object that an object reference points to.
00073         H5G_obj_t getObjType(void *ref, H5R_type_t ref_type) const;
00074 
00075         // Retrieves a dataspace with the region pointed to selected.
00076         DataSpace getRegion(void *ref, H5R_type_t ref_type = H5R_DATASET_REGION) const;
00077 
00078         // Creates a reference to a named Hdf5 object or to a dataset region
00079         // in this object.
00080         void* Reference(const char* name, DataSpace& dataspace, H5R_type_t ref_type = H5R_DATASET_REGION) const;
00081 
00082         // Creates a reference to a named Hdf5 object in this object.
00083         void* Reference(const char* name) const;
00084         void* Reference(const H5std_string& name) const;
00085 
00086         // Returns this class name
00087         virtual H5std_string fromClass () const { return("DataSet"); }
00088 
00089         // Creates a copy of an existing DataSet using its id.
00090         DataSet(const hid_t existing_id);
00091 
00092         // Default constructor.
00093         DataSet();
00094 
00095         // Copy constructor.
00096         DataSet( const DataSet& original );
00097 
00098         // Destructor: properly terminates access to this dataset.
00099         virtual ~DataSet();
00100 
00101    private:
00102         // This function contains the common code that is used by
00103         // getTypeClass and various API functions getXxxType
00104         // defined in AbstractDs for generic datatype and specific
00105         // sub-types
00106         virtual hid_t p_get_type() const;
00107 };
00108 #ifndef H5_NO_NAMESPACE
00109 }
00110 #endif
00111 #endif

Generated on Thu Apr 20 15:16:40 2006 by doxygen 1.3.2