Esempio n. 1
0
 void Create(H5::H5Location &object, const std::string & name, const std::vector<std::string> &vect) {
     hsize_t length = vect.size();
     H5::StrType strType(0,H5T_VARIABLE);
     H5::ArrayType arrayDataType(strType, 1, &length);
     attribute = object.createAttribute(name.c_str(), strType, H5::DataSpace(1, &length));
     attribute.write(strType, &((vect)[0]));    
 }
Esempio n. 2
0
void HDFAtom<std::vector<int> >::Write(const std::vector<int> vect) {
  hsize_t  length = vect.size();
  H5::DataType baseType = H5::PredType::NATIVE_INT;
  H5::ArrayType arrayDataType(baseType, 1, &length);
  attribute.write(arrayDataType, &((vect)[0]));
}
Esempio n. 3
0
 void Create(H5::H5Location &object, const std::string & name, std::vector<int> &vect) {
     hsize_t length = vect.size();
     H5::ArrayType arrayDataType(H5::PredType::NATIVE_INT, 1, &length);
     attribute = object.createAttribute(name.c_str(), H5::PredType::NATIVE_INT, H5::DataSpace(1, &length));
     attribute.write(H5::PredType::NATIVE_INT, &((vect)[0]));    
 }