00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 #ifndef HDF_VD_FIELD_HPP
00022 #define HDF_VD_FIELD_HPP
00023
00024 #include <iostream>
00025 #include <string>
00026 #include "mfhdf.h"
00027 #include "Hdf_attr.hpp"
00028
00032 class Hdf_vd_field {
00033 string name;
00034 int32 type;
00035 int32 order;
00036 int32 size;
00040 vector<Hdf_attr> attrs;
00046 int32 get_attr_idx(const char* attr_name) const;
00047 public:
00056 Hdf_vd_field(const char *vd_name,const int32 &type, const int32 &order, const int32 &size, const int32 &vd_id=-1, const int32& field_idx=-1);
00057 Hdf_vd_field();
00058 Hdf_vd_field(const Hdf_vd_field &hdf_vd);
00059 ~Hdf_vd_field(){};
00060 Hdf_vd_field &operator= (const Hdf_vd_field &hdf_vd);
00061
00062 std::string get_name() const { return name; }
00063 int32 get_type() const { return type; }
00064 int32 get_order() const { return order; }
00065 int32 get_size() const { return size; }
00066 void set_name(const string& name) { this->name = name; }
00067 void set_type(const int32& type) { this->type = type; }
00068 void set_order(const int32& order) { this->order = order; }
00069 void set_size(const int32& size) { this->size = size; }
00070
00071 int32 get_nb_attr() const { return attrs.size(); };
00078 Hdf_attr get_attribute(const char *attr_name) const;
00085 Hdf_attr get_attribute(const int32 &attr_idx) const;
00091 const bool has_attr( const char * attr_name ) const;
00098 void get_attr_value(const char *attr_name,void *value, int32 ival = 0) const;
00099
00100 std::string to_string() const;
00101 };
00102
00103 #endif