| 101 | } |
| 102 | |
| 103 | void VectorNodeImpl::writeXml( ImageFileImplSharedPtr imf, CheckedFile &cf, int indent, |
| 104 | const char *forcedFieldName ) |
| 105 | { |
| 106 | // don't checkImageFileOpen |
| 107 | |
| 108 | ustring fieldName; |
| 109 | if ( forcedFieldName != nullptr ) |
| 110 | { |
| 111 | fieldName = forcedFieldName; |
| 112 | } |
| 113 | else |
| 114 | { |
| 115 | fieldName = elementName_; |
| 116 | } |
| 117 | |
| 118 | cf << space( indent ) << "<" << fieldName << " type=\"Vector\" allowHeterogeneousChildren=\"" |
| 119 | << static_cast<int64_t>( allowHeteroChildren_ ) << "\">\n"; |
| 120 | for ( auto &child : children_ ) |
| 121 | { |
| 122 | child->writeXml( imf, cf, indent + 2, "vectorChild" ); |
| 123 | } |
| 124 | cf << space( indent ) << "</" << fieldName << ">\n"; |
| 125 | } |
| 126 | |
| 127 | #ifdef E57_ENABLE_DIAGNOSTIC_OUTPUT |
| 128 | void VectorNodeImpl::dump( int indent, std::ostream &os ) const |