HDF5 C++ API Reference Manual

 

 

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

H5Attribute.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 #ifndef _H5Attribute_H
00017 #define _H5Attribute_H
00018 
00019 #ifndef H5_NO_NAMESPACE
00020 namespace H5 {
00021 #endif
00022 
00023 class H5_DLLCPP Attribute : public AbstractDs {
00024    public:
00025         // Closes this attribute.
00026         virtual void close();
00027 
00028         // Gets the name of this attribute.
00029         ssize_t getName( size_t buf_size, H5std_string& attr_name ) const;
00030         H5std_string getName( size_t buf_size ) const; // returns name, not its length
00031         H5std_string getName() const; // returns name, no argument
00032 
00033         // Gets a copy of the dataspace for this attribute.
00034         virtual DataSpace getSpace() const;
00035 
00036         // Returns the amount of storage size required for this attribute.
00037         hsize_t getStorageSize() const;
00038 
00039         // Reads data from this attribute.
00040         void read( const DataType& mem_type, void *buf ) const;
00041         void read( const DataType& mem_type, H5std_string& strg ) const;
00042 
00043         // Writes data to this attribute.
00044         void write(const DataType& mem_type, const void *buf ) const;
00045         void write(const DataType& mem_type, const H5std_string& strg ) const;
00046 
00047         // Returns this class name
00048         virtual H5std_string fromClass () const { return("Attribute"); }
00049 
00050         // Creates a copy of an existing attribute using the attribute id
00051         Attribute( const hid_t attr_id );
00052 
00053         // Copy constructor: makes a copy of an existing Attribute object.
00054         Attribute( const Attribute& original );
00055 
00056         // Destructor: properly terminates access to this attribute.
00057         virtual ~Attribute();
00058 
00059    private:
00060         // This function contains the common code that is used by
00061         // getTypeClass and various API functions getXxxType
00062         // defined in AbstractDs for generic datatype and specific
00063         // sub-types
00064         virtual hid_t p_get_type() const;
00065 
00066         // do not inherit iterateAttrs from H5Object
00067         int iterateAttrs() { return 0; }
00068 
00069         // do not inherit iterateAttrs from H5Object
00070         void rename() {}
00071 
00072         // Default constructor
00073         Attribute();
00074 };
00075 #ifndef H5_NO_NAMESPACE
00076 }
00077 #endif
00078 #endif

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