diff --git a/tools/hdf5_file_writer.cpp b/tools/hdf5_file_writer.cpp index 1043070..6e73dcf 100644 --- a/tools/hdf5_file_writer.cpp +++ b/tools/hdf5_file_writer.cpp @@ -325,11 +325,6 @@ bool HDF5_File_Writer::WriteData(std::string dataSetName, float const* field_buf return true; } -bool HDF5_File_Writer::WriteAtrribute(std::string locName, std::string attr_name, float const* value, hsize_t size) -{ - return WriteAtrribute(locName,attr_name, value, size, H5T_NATIVE_FLOAT); -} - bool HDF5_File_Writer::WriteAtrribute(std::string locName, std::string attr_name, void const* value, hsize_t size, hid_t mem_type) { hid_t hdf5_file = H5Fopen( m_filename.c_str(), H5F_ACC_RDWR, H5P_DEFAULT ); @@ -383,10 +378,33 @@ bool HDF5_File_Writer::WriteAtrribute(std::string locName, std::string attr_name return true; } +bool HDF5_File_Writer::WriteAtrribute(std::string locName, std::string attr_name, float const* value, hsize_t size) +{ + return WriteAtrribute(locName,attr_name, value, size, H5T_NATIVE_FLOAT); +} + bool HDF5_File_Writer::WriteAtrribute(std::string locName, std::string attr_name, vector values) { float val[values.size()]; for (size_t n=0;n values) +{ + float val[values.size()]; + for (size_t n=0;n values); + bool WriteAtrribute(std::string locName, std::string attr_name, std::vector values); + bool WriteAtrribute(std::string locName, std::string attr_name, float value); + bool WriteAtrribute(std::string locName, std::string attr_name, double value); void SetCurrentGroup(std::string group, bool createGrp=true);