------------------------------------------------------------------------------
| 95 | |
| 96 | //------------------------------------------------------------------------------ |
| 97 | int vtkCompositeDataReader::ReadOutputType() |
| 98 | { |
| 99 | char line[256]; |
| 100 | if (!this->OpenVTKFile() || !this->ReadHeader()) |
| 101 | { |
| 102 | return -1; |
| 103 | } |
| 104 | |
| 105 | // Determine dataset type |
| 106 | // |
| 107 | if (!this->ReadString(line)) |
| 108 | { |
| 109 | vtkDebugMacro(<< "Premature EOF reading dataset keyword"); |
| 110 | return -1; |
| 111 | } |
| 112 | |
| 113 | if (strncmp(this->LowerCase(line), "dataset", static_cast<unsigned long>(7)) == 0) |
| 114 | { |
| 115 | // See iftype is recognized. |
| 116 | // |
| 117 | if (!this->ReadString(line)) |
| 118 | { |
| 119 | vtkDebugMacro(<< "Premature EOF reading type"); |
| 120 | this->CloseVTKFile(); |
| 121 | return -1; |
| 122 | } |
| 123 | this->CloseVTKFile(); |
| 124 | |
| 125 | if (strncmp(this->LowerCase(line), "multiblock", strlen("multiblock")) == 0) |
| 126 | { |
| 127 | return VTK_MULTIBLOCK_DATA_SET; |
| 128 | } |
| 129 | if (strncmp(this->LowerCase(line), "multipiece", strlen("multipiece")) == 0) |
| 130 | { |
| 131 | return VTK_MULTIPIECE_DATA_SET; |
| 132 | } |
| 133 | if (strncmp(this->LowerCase(line), "overlapping_amr", strlen("overlapping_amr")) == 0) |
| 134 | { |
| 135 | return VTK_OVERLAPPING_AMR; |
| 136 | } |
| 137 | if (strncmp(this->LowerCase(line), "non_overlapping_amr", strlen("non_overlapping_amr")) == 0) |
| 138 | { |
| 139 | return VTK_NON_OVERLAPPING_AMR; |
| 140 | } |
| 141 | if (strncmp(this->LowerCase(line), "hierarchical_box", strlen("hierarchical_box")) == 0) |
| 142 | { |
| 143 | return VTK_HIERARCHICAL_BOX_DATA_SET; |
| 144 | } |
| 145 | if (strncmp( |
| 146 | this->LowerCase(line), "partitioned_collection", strlen("partitioned_collection")) == 0) |
| 147 | { |
| 148 | return VTK_PARTITIONED_DATA_SET_COLLECTION; |
| 149 | } |
| 150 | if (strncmp(this->LowerCase(line), "partitioned", strlen("partitioned")) == 0) |
| 151 | { |
| 152 | return VTK_PARTITIONED_DATA_SET; |
| 153 | } |
| 154 | } |
no test coverage detected