56 if ( !prototype->isRoot() )
59 "this->pathName=" + this->
pathName() +
" prototype->pathName=" + prototype->pathName() );
65 if ( thisDest != prototypeDest )
68 " prototype->destImageFile" +
69 prototypeDest->fileName() );
73 prototype_ = prototype;
82 return ( prototype_ );
100 if ( !codecs->isRoot() )
103 "this->pathName=" + this->
pathName() +
" codecs->pathName=" + codecs->pathName() );
109 if ( thisDest != codecsDest )
112 " codecs->destImageFile" +
113 codecsDest->fileName() );
140 std::shared_ptr<CompressedVectorNodeImpl> cvi( std::static_pointer_cast<CompressedVectorNodeImpl>( ni ) );
143 if ( recordCount_ != cvi->recordCount_ )
149 if ( !prototype_->isTypeEquivalent( cvi->prototype_ ) )
153 if ( !codecs_->isTypeEquivalent( cvi->codecs_ ) )
174 prototype_->setAttachedRecursive();
180 codecs_->setAttachedRecursive();
187 return ( recordCount_ );
200 const char *forcedFieldName )
205 if ( forcedFieldName !=
nullptr )
207 fieldName = forcedFieldName;
216 cf <<
space( indent ) <<
"<" << fieldName <<
" type=\"CompressedVector\"";
217 cf <<
" fileOffset=\"" << physicalStart;
218 cf <<
"\" recordCount=\"" << recordCount_ <<
"\">\n";
222 prototype_->writeXml( imf, cf, indent + 2,
"prototype" );
226 codecs_->writeXml( imf, cf, indent + 2,
"codecs" );
228 cf <<
space( indent ) <<
"</" << fieldName <<
">\n";
234 os <<
space( indent ) <<
"type: CompressedVector"
240 prototype_->dump( indent + 2, os );
249 codecs_->dump( indent + 2, os );
255 os <<
space( indent ) <<
"recordCount: " << recordCount_ <<
std::endl;
256 os <<
space( indent ) <<
"binarySectionLogicalStart: " << binarySectionLogicalStart_ <<
std::endl;
302 std::shared_ptr<CompressedVectorNodeImpl> cai( std::static_pointer_cast<CompressedVectorNodeImpl>( ni ) );
345 #ifdef E57_MAX_VERBOSE
351 std::shared_ptr<CompressedVectorNodeImpl> cai( std::static_pointer_cast<CompressedVectorNodeImpl>( ni ) );
352 #ifdef E57_MAX_VERBOSE
static uint64_t logicalToPhysical(uint64_t logicalOffset)
void setPrototype(const NodeImplSharedPtr &prototype)
NodeType type() const override
void setAttachedRecursive() override
bool isDefined(const ustring &pathName) override
CompressedVectorNodeImpl(ImageFileImplWeakPtr destImageFile)
void checkLeavesInSet(const StringSet &pathNames, NodeImplSharedPtr origin) override
void setCodecs(const std::shared_ptr< VectorNodeImpl > &codecs)
int64_t childCount() const
void dump(int indent=0, std::ostream &os=std::cout) const override
std::shared_ptr< CompressedVectorWriterImpl > writer(std::vector< SourceDestBuffer > sbufs)
Iterator constructors.
std::shared_ptr< CompressedVectorReaderImpl > reader(std::vector< SourceDestBuffer > dbufs)
bool isTypeEquivalent(NodeImplSharedPtr ni) override
void writeXml(ImageFileImplSharedPtr imf, CheckedFile &cf, int indent, const char *forcedFieldName=nullptr) override
friend class CompressedVectorReaderImpl
NodeImplSharedPtr getPrototype() const
std::shared_ptr< VectorNodeImpl > getCodecs() const
ImageFileImplWeakPtr destImageFile_
ImageFileImplSharedPtr destImageFile()
void checkImageFileOpen(const char *srcFileName, int srcLineNumber, const char *srcFunctionName) const
virtual void dump(int indent=0, std::ostream &os=std::cout) const
friend class CompressedVectorWriterImpl
QTextStream & endl(QTextStream &stream)
std::shared_ptr< class NodeImpl > NodeImplSharedPtr
std::weak_ptr< class ImageFileImpl > ImageFileImplWeakPtr
std::shared_ptr< class ImageFileImpl > ImageFileImplSharedPtr
@ E57_ERROR_FILE_IS_READ_ONLY
can't modify read only file
@ E57_ERROR_TOO_MANY_READERS
too many open CompressedVectorReaders of an ImageFile
@ E57_ERROR_INTERNAL
An unrecoverable inconsistent internal state was detected.
@ E57_ERROR_SET_TWICE
attempted to set an existing child element to a new value
@ E57_ERROR_BAD_API_ARGUMENT
bad API function argument provided by user
@ E57_ERROR_NODE_UNATTACHED
node is not yet attached to tree of ImageFile
@ E57_ERROR_NOT_IMPLEMENTED
functionality not implemented
@ E57_ERROR_TOO_MANY_WRITERS
too many open CompressedVectorWriters of an ImageFile
@ E57_ERROR_ALREADY_HAS_PARENT
node already has a parent
@ E57_ERROR_DIFFERENT_DEST_IMAGEFILE
nodes were constructed with different destImageFiles
std::string ustring
UTF-8 encodeded Unicode string.
std::set< std::string > StringSet
@ E57_COMPRESSED_VECTOR
CompressedVectorNode class.
std::string toString(T x)
std::string space(size_t n)