00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017 #ifndef _H5Object_H
00018 #define _H5Object_H
00019
00020 #include "H5Classes.h"
00021
00022
00023
00024
00025
00026 #ifndef H5_NO_NAMESPACE
00027 namespace H5 {
00028 #endif
00029
00030 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00031 class H5_DLLCPP H5Object;
00032
00033
00034 typedef void (*attr_operator_t)( H5Object& loc,
00035 const H5std_string attr_name,
00036 void *operator_data);
00037
00038 class UserData4Aiterate {
00039 public:
00040 attr_operator_t op;
00041 void* opData;
00042 H5Object* object;
00043 };
00044 #endif // DOXYGEN_SHOULD_SKIP_THIS
00045
00046
00047
00048 class H5_DLLCPP H5Object : public IdComponent {
00049 public:
00050
00051
00052 Attribute createAttribute( const char* name, const DataType& type, const DataSpace& space, const PropList& create_plist = PropList::DEFAULT ) const;
00053 Attribute createAttribute( const H5std_string& name, const DataType& type, const DataSpace& space, const PropList& create_plist = PropList::DEFAULT ) const;
00054
00055
00056 Attribute openAttribute( const char* name ) const;
00057 Attribute openAttribute( const H5std_string& name ) const;
00058
00059
00060 Attribute openAttribute( const unsigned int idx ) const;
00061
00062
00063 void flush( H5F_scope_t scope ) const;
00064
00065
00066 H5std_string getFileName() const;
00067
00068
00069 int getNumAttrs() const;
00070
00071
00072 int iterateAttrs( attr_operator_t user_op, unsigned* idx = NULL, void* op_data = NULL );
00073
00074
00075 void removeAttr( const char* name ) const;
00076 void removeAttr( const H5std_string& name ) const;
00077
00078
00079 void renameAttr(const char* oldname, const char* newname) const;
00080 void renameAttr(const H5std_string& oldname, const H5std_string& newname) const;
00081
00082
00083
00084 void reference(void* ref, const char* name, const DataSpace& dataspace,
00085 H5R_type_t ref_type = H5R_DATASET_REGION) const;
00086 void reference(void* ref, const char* name) const;
00087 void reference(void* ref, const H5std_string& name) const;
00088
00089
00090
00091 void dereference(H5File& h5file, const void* ref, H5R_type_t ref_type = H5R_OBJECT);
00092 void dereference(H5Object& obj, const void* ref, H5R_type_t ref_type = H5R_OBJECT);
00093 void dereference(Attribute& attr, const void* ref, H5R_type_t ref_type = H5R_OBJECT);
00094
00095
00096 H5Object(const H5Object& original);
00097
00098
00099 virtual ~H5Object();
00100
00101 protected:
00102 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00103
00104 H5Object();
00105
00106
00107 H5Object( const hid_t object_id );
00108
00109
00110 hid_t p_get_file_id();
00111
00112
00113 void p_reference(void* ref, const char* name, hid_t space_id, H5R_type_t ref_type) const;
00114
00115
00116 hid_t p_dereference(hid_t loc_id, const void* ref, H5R_type_t ref_type);
00117
00118 #ifndef H5_NO_DEPRECATED_SYMBOLS
00119
00120 H5G_obj_t p_get_obj_type(void *ref, H5R_type_t ref_type) const;
00121 #endif
00122
00123
00124 hid_t p_get_region(void *ref, H5R_type_t ref_type) const;
00125
00126 #endif // DOXYGEN_SHOULD_SKIP_THIS
00127
00128 };
00129
00130 #ifndef H5_NO_NAMESPACE
00131 }
00132 #endif
00133 #endif