49 std::shared_ptr<VectorNodeImpl> ai( std::static_pointer_cast<VectorNodeImpl>( ni ) );
52 if ( allowHeteroChildren_ != ai->allowHeteroChildren_ )
66 if ( !
children_.at( i )->isTypeEquivalent( ai->children_.at( i ) ) )
79 return allowHeteroChildren_;
85 if ( !allowHeteroChildren_ )
90 if ( !child->isTypeEquivalent( ni ) )
106 if ( forcedFieldName !=
nullptr )
108 fieldName = forcedFieldName;
115 cf <<
space( indent ) <<
"<" << fieldName <<
" type=\"Vector\" allowHeterogeneousChildren=\""
116 <<
static_cast<int64_t
>( allowHeteroChildren_ ) <<
"\">\n";
119 child->writeXml( imf, cf, indent + 2,
"vectorChild" );
121 cf <<
space( indent ) <<
"</" << fieldName <<
">\n";
128 os <<
space( indent ) <<
"type: Vector"
132 for (
unsigned i = 0; i <
children_.size(); i++ )
135 children_.at( i )->dump( indent + 2, os );
void checkImageFileOpen(const char *srcFileName, int srcLineNumber, const char *srcFunctionName) const
virtual void dump(int indent=0, std::ostream &os=std::cout) const
virtual void set(int64_t index, NodeImplSharedPtr ni)
std::vector< NodeImplSharedPtr > children_
virtual int64_t childCount() const
NodeType type() const override
bool allowHeteroChildren() const
void dump(int indent=0, std::ostream &os=std::cout) const override
bool isTypeEquivalent(NodeImplSharedPtr ni) override
void set(int64_t index, NodeImplSharedPtr ni) override
VectorNodeImpl(ImageFileImplWeakPtr destImageFile, bool allowHeteroChildren)
void writeXml(ImageFileImplSharedPtr imf, CheckedFile &cf, int indent, const char *forcedFieldName=nullptr) override
QTextStream & endl(QTextStream &stream)
std::shared_ptr< class NodeImpl > NodeImplSharedPtr
std::weak_ptr< class ImageFileImpl > ImageFileImplWeakPtr
std::shared_ptr< class ImageFileImpl > ImageFileImplSharedPtr
@ E57_ERROR_HOMOGENEOUS_VIOLATION
std::string ustring
UTF-8 encodeded Unicode string.
@ E57_VECTOR
VectorNode class.
std::string space(size_t n)