------------------------------------------------------------------------------
| 665 | |
| 666 | //------------------------------------------------------------------------------ |
| 667 | bool vtkHDFWriter::Implementation::AddOrCreateSingleValueDataset( |
| 668 | hid_t group, const char* name, vtkIdType value, bool offset, bool trim) |
| 669 | { |
| 670 | // Assume that when subfiles are set, we don't need to write data unless |
| 671 | // SubFilesReady is set, which means all subfiles have been written. |
| 672 | if (!this->Subfiles.empty() && (group != this->StepsGroup || this->Writer->NbPieces > 1)) |
| 673 | { |
| 674 | if (this->SubFilesReady) |
| 675 | { |
| 676 | return this->CreateVirtualDataset(group, name, H5T_STD_I64LE, 1); |
| 677 | } |
| 678 | return true; |
| 679 | } |
| 680 | |
| 681 | if (!H5Lexists(group, name, H5P_DEFAULT)) |
| 682 | { |
| 683 | // Dataset needs to be created |
| 684 | return this->CreateSingleValueDataset(group, name, value) != H5I_INVALID_HID; |
| 685 | } |
| 686 | else |
| 687 | { |
| 688 | // Append the value to an existing dataset |
| 689 | vtkHDF::ScopedH5DHandle dataset = H5Dopen(group, name, H5P_DEFAULT); |
| 690 | if (dataset == H5I_INVALID_HID) |
| 691 | { |
| 692 | return false; |
| 693 | } |
| 694 | return this->AddSingleValueToDataset(dataset, value, offset, trim); |
| 695 | } |
| 696 | } |
| 697 | |
| 698 | //------------------------------------------------------------------------------ |
| 699 | bool vtkHDFWriter::Implementation::AddOrCreateFieldDataSizeValueDataset( |
no test coverage detected