| 64 | } |
| 65 | |
| 66 | std::map<std::string, std::string> |
| 67 | XdmfArrayReference::getItemProperties() const |
| 68 | { |
| 69 | std::map<std::string, std::string> referenceProperties; |
| 70 | |
| 71 | referenceProperties["ConstructedType"] = mConstructedType; |
| 72 | |
| 73 | for (std::map<std::string, std::string>::const_iterator constructedIt = mConstructedProperties.begin(); |
| 74 | constructedIt != mConstructedProperties.end(); |
| 75 | ++constructedIt) { |
| 76 | referenceProperties[constructedIt->first] = constructedIt->second; |
| 77 | } |
| 78 | |
| 79 | // An array is missing a lot of data if not read first |
| 80 | if (mConstructedType.compare(XdmfArray::ItemTag) == 0) { |
| 81 | shared_ptr<XdmfArray> resultArray = this->read(); |
| 82 | shared_ptr<const XdmfArrayType> resultArrayType = resultArray->getArrayType(); |
| 83 | std::map<std::string, std::string> arrayTypeProperties; |
| 84 | resultArrayType->getProperties(arrayTypeProperties); |
| 85 | for (std::map<std::string, std::string>::const_iterator arrayTypeIt = arrayTypeProperties.begin(); |
| 86 | arrayTypeIt != arrayTypeProperties.end(); |
| 87 | ++arrayTypeIt) { |
| 88 | referenceProperties[arrayTypeIt->first] = arrayTypeIt->second; |
| 89 | } |
| 90 | referenceProperties["Format"] = "XML"; |
| 91 | referenceProperties["Dimensions"] = resultArray->getDimensionsString(); |
| 92 | } |
| 93 | |
| 94 | return referenceProperties; |
| 95 | } |
| 96 | |
| 97 | void |
| 98 | XdmfArrayReference::setConstructedProperties(std::map<std::string, std::string> newProperties) |
no test coverage detected