HDF5 C++ API Reference Manual

 

 

 

Main Page | Namespace List | Class Hierarchy | Class List | File List | Class 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 // Gets the name of this attribute. 00026 ssize_t getName( size_t buf_size, string& attr_name ) const; 00027 string getName( size_t buf_size ) const; // returns name, not its length 00028 string getName() const; // returns name, no argument 00029 00030 // Gets a copy of the dataspace for this attribute. 00031 virtual DataSpace getSpace() const; 00032 00033 // Reads data from this attribute. 00034 void read( const DataType& mem_type, void *buf ) const; 00035 void read( const DataType& mem_type, string& strg ) const; 00036 00037 // Writes data to this attribute. 00038 void write(const DataType& mem_type, const void *buf ) const; 00039 void write(const DataType& mem_type, const string& strg ) const; 00040 00041 // Creates a copy of an existing attribute using the attribute id 00042 Attribute( const hid_t attr_id ); 00043 00044 // Copy constructor: makes a copy of an existing Attribute object. 00045 Attribute( const Attribute& original ); 00046 00047 #ifndef DOXYGEN_SHOULD_SKIP_THIS 00048 // Used by the API to appropriately close an attribute 00049 virtual void p_close() const; 00050 #endif // DOXYGEN_SHOULD_SKIP_THIS 00051 00052 // Destructor: properly terminates access to this attribute. 00053 virtual ~Attribute(); 00054 00055 private: 00056 // This function contains the common code that is used by 00057 // getTypeClass and various API functions getXxxType 00058 // defined in AbstractDs for generic datatype and specific 00059 // sub-types 00060 virtual hid_t p_get_type() const; 00061 00062 // do not inherit iterateAttrs from H5Object 00063 int iterateAttrs() { return 0; } 00064 00065 // Default constructor 00066 Attribute(); 00067 }; 00068 #ifndef H5_NO_NAMESPACE 00069 } 00070 #endif 00071 #endif

Generated on Thu Aug 5 00:22:37 2004 by doxygen 1.3.7-20040718