HDF5 C++ API Reference Manual

- Main Page
- Namespaces
- Classes
- Files
- Examples

- File List
- File Members

# H5PropList.h

Go to the documentation of this file.

    00001 // C++ informative line for the emacs editor: -*- C++ -*-
    00002 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
    00003  * Copyright by The HDF Group.                                               *
    00004  * Copyright by the Board of Trustees of the University of Illinois.         *
    00005  * All rights reserved.                                                      *
    00006  *                                                                           *
    00007  * This file is part of HDF5.  The full HDF5 copyright notice, including     *
    00008  * terms governing use, modification, and redistribution, is contained in    *
    00009  * the files COPYING and Copyright.html.  COPYING can be found at the root   *
    00010  * of the source code distribution tree; Copyright.html can be found at the  *
    00011  * root level of an installed copy of the electronic HDF5 document set and   *
    00012  * is linked from the top-level documents page.  It can also be found at     *
    00013  * http://hdfgroup.org/HDF5/doc/Copyright.html.  If you do not have          *
    00014  * access to either file, you may request a copy from help@hdfgroup.org.     *
    00015  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
    00016
    00017 #ifndef _H5PropList_H
    00018 #define _H5PropList_H
    00019
    00020 #ifndef H5_NO_NAMESPACE
    00021 namespace H5 {
    00022 #endif
    00023
    00024 class H5_DLLCPP PropList : public IdComponent {
    00025    public:
    00026         // Default property list
    00027         static const PropList DEFAULT;
    00028
    00029         // Creates a property list of a given type or creates a copy of an
    00030         // existing property list giving the property list id.
    00031         PropList(const hid_t plist_id);
    00032
    00033         // Make a copy of the given property list using assignment statement
    00034         PropList& operator=( const PropList& rhs );
    00035
    00036         // Compares this property list or class against the given list or class.
    00037         bool operator==(const PropList& rhs) const;
    00038
    00039         // Close this property list.
    00040         virtual void close();
    00041
    00042         // Close a property list class.
    00043         void closeClass() const;
    00044
    00045         // Makes a copy of the given property list.
    00046         void copy( const PropList& like_plist );
    00047
    00048         // Copies a property from this property list or class to another
    00049         void copyProp( PropList& dest, const char* name) const;
    00050         void copyProp( PropList& dest, const H5std_string& name) const;
    00051
    00052         // Copies a property from one property list or property class to another
    00053         void copyProp( PropList& dest, PropList& src, const char* name) const;
    00054         void copyProp( PropList& dest, PropList& src, const H5std_string& name) const;
    00055
    00056         // Gets the class of this property list, i.e. H5P_FILE_CREATE,
    00057         // H5P_FILE_ACCESS, ...
    00058         hid_t getClass() const;
    00059
    00060         // Return the name of a generic property list class.
    00061         H5std_string getClassName() const;
    00062
    00063         // Returns the parent class of a generic property class.
    00064         PropList getClassParent() const;
    00065
    00066         // Returns the number of properties in this property list or class.
    00067         size_t getNumProps() const;
    00068
    00069         // Query the value of a property in a property list.
    00070         void getProperty(const char* name, void* value) const;
    00071         void getProperty(const H5std_string& name, void* value) const;
    00072         H5std_string getProperty(const char* name) const;
    00073         H5std_string getProperty(const H5std_string& name) const;
    00074
    00075         // Set a property's value in a property list.
    00076         void setProperty(const char* name, void* value) const;
    00077         void setProperty(const char* name, const char* charptr) const;
    00078         void setProperty(const char* name, H5std_string& strg) const;
    00079         void setProperty(const H5std_string& name, void* value) const;
    00080         void setProperty(const H5std_string& name, H5std_string& strg) const;
    00081
    00082         // Query the size of a property in a property list or class.
    00083         size_t getPropSize(const char *name) const;
    00084         size_t getPropSize(const H5std_string& name) const;
    00085
    00086         // Determines whether a property list is a certain class.
    00087         bool isAClass(const PropList& prop_class) const;
    00088
    00090         bool propExist(const char* name) const;
    00091         bool propExist(const H5std_string& name) const;
    00092
    00093         // Removes a property from a property list.
    00094         void removeProp(const char *name) const;
    00095         void removeProp(const H5std_string& name) const;
    00096
    00097         // Returns this class name
    00098         virtual H5std_string fromClass () const { return("PropList"); }
    00099
    00100         // Default constructor: creates a stub PropList object.
    00101         PropList();
    00102
    00103         // Copy constructor: creates a copy of a PropList object.
    00104         PropList(const PropList& original);
    00105
    00106         // Gets the property list id.
    00107         virtual hid_t getId() const;
    00108
    00109         // Destructor: properly terminates access to this property list.
    00110         virtual ~PropList();
    00111
    00112    protected:
    00113         hid_t id;       // HDF5 property list id
    00114
    00115         // Sets the property list id.
    00116         virtual void p_setId(const hid_t new_id);
    00117 };
    00118
    00119 #ifndef H5_NO_NAMESPACE
    00120 }
    00121 #endif
    00122 #endif  // _H5PropList_H