HDF5 C++ API Reference Manual

 

 

 

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

Generated on Sat Apr 23 16:19:44 2005 by  doxygen 1.4.2