------------------------------------------------------------------------------
| 2677 | |
| 2678 | //------------------------------------------------------------------------------ |
| 2679 | void vtkMPASReader::UpdateDimensions(bool force) |
| 2680 | { |
| 2681 | if (!force && this->Internals->dimMetaDataTime < this->Internals->extraDimTime) |
| 2682 | { |
| 2683 | return; |
| 2684 | } |
| 2685 | |
| 2686 | this->Internals->extraDims->Reset(); |
| 2687 | |
| 2688 | if (!this->Internals->ncFile) |
| 2689 | { |
| 2690 | this->Internals->extraDimTime.Modified(); |
| 2691 | return; |
| 2692 | } |
| 2693 | |
| 2694 | std::set<std::string> dimSet; |
| 2695 | |
| 2696 | typedef Internal::DimMetaDataMap::const_iterator Iter; |
| 2697 | const Internal::DimMetaDataMap& map = this->Internals->dimMetaDataMap; |
| 2698 | for (Iter it = map.begin(), itEnd = map.end(); it != itEnd; ++it) |
| 2699 | { |
| 2700 | if (this->Internals->isExtraDim(it->first)) |
| 2701 | { |
| 2702 | dimSet.insert(it->first); |
| 2703 | } |
| 2704 | } |
| 2705 | |
| 2706 | typedef std::set<std::string>::const_iterator SetIter; |
| 2707 | this->Internals->extraDims->Allocate(static_cast<vtkIdType>(dimSet.size())); |
| 2708 | for (SetIter it = dimSet.begin(), itEnd = dimSet.end(); it != itEnd; ++it) |
| 2709 | { |
| 2710 | this->Internals->extraDims->InsertNextValue(it->c_str()); |
| 2711 | } |
| 2712 | |
| 2713 | this->Internals->extraDimTime.Modified(); |
| 2714 | } |
| 2715 | |
| 2716 | //------------------------------------------------------------------------------ |
| 2717 | // Return the output. |
no test coverage detected