/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Copyright (C) 2011-2015 by The HDF Group. * * All rights reserved. * * * * This file is part of the H4CF conversion toolkit. The full H4CF conversion* * toolkit copyright notice including terms governing use, modification, and * * redistribution, is contained in the files COPYING and Copyright.html. * * COPYING and Copyright.html can be found at the root of the source code * * distribution tree. * * For questions contact eoshelp@hdfgroup.org or help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /***************************************************************************** Category: Header file for the HDF4 namespace Description: This file includes the definition of an HDF4 vdata field and includes related method declarations. The class VDATA defined in the header file hdf4_vdata.h contains a class member that is vector of pointer of the instances of the class defined here. *****************************************************************************/ #ifndef HDF4_VDATA_FIELD_H #define HDF4_VDATA_FIELD_H #include #include "eoslib_defs.h" #include "hdf4_types.h" #include "hdf4_attr.h" using namespace eoslib; namespace hdf4 { using namespace eoslib; class hdf4_var_vdfield : public var { public: // Default constructor. hdf4_var_vdfield(); // Default destructor. ~hdf4_var_vdfield(); // Get the name of this field. const std::string & get_name () const { return this->m_name; } // Get the new name of this field. const std::string & get_new_name () const { return this->newname; } // Get the dimension rank of this field. int32 get_rank () const { return this->rank; } // Obtain attributes. std::vector < hdf4_attr * >&get_attributes () { return this->attrs; } // Get the order of this field. int32 get_order ()const { return this->order; } // Get the field size. int32 get_field_size () const { return this->size; } // Get the number of record. int32 get_num_rec () const { return this->numrec; } // Get field value. const std::vector < char >&get_value () const { return this->value; } // Get field value and store the value in the vector user provides. void get_all_values(std::vector *pbuf) const { pbuf->resize(value.size()); for(size_t k=0; k *buf) const ; virtual var *_clone() const; virtual bool same_obj_test(var* v) const; public: // order: array size. // size: total bytes. // numrec: the number of records. int32 order; int32 size; int32 numrec; // Store field value. std::vector< char > value; // Name plus full path. std::string newname; // rank for vdata field should either be 1 or 2. int32 rank; //type: data type. int32 type; // Store field attributes. std::vector< hdf4_attr * > attrs; int32 vdata_id; friend class VDATA; friend class hdf4_file; }; } //end of namespace #endif