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 [email protected]. *
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         void* Reference(const string& name) const;
00082 
00083         // Returns this class name
00084         virtual string fromClass () const { return("DataSet"); }
00085 
00086         // Creates a copy of an existing DataSet using its id.
00087         DataSet(const hid_t existing_id);
00088 
00089         // Close this dataset.
00090         virtual void close();
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 Mon Oct 31 04:59:47 2005 by  doxygen 1.4.2