38 static_cast<const char *
>( __FUNCTION__ ) );
48 srcLineNumber, srcFunctionName );
66 return shared_from_this();
96 if ( origin == shared_from_this() )
98 return ( childPathName );
105 "this->elementName=" + this->
elementName() +
" childPathName=" + childPathName );
111 if ( childPathName.empty() )
116 return p->relativePathName( origin,
elementName_ +
"/" + childPathName );
152 return imf->fileName();
171 "this->pathName=" + this->
pathName() +
" newParent->pathName=" + parent->pathName() );
178 if (
parent->isAttached() )
186 while ( !p->isRoot() )
202 while ( !p->isRoot() )
212 std::shared_ptr<VectorNodeImpl> ai( std::static_pointer_cast<VectorNodeImpl>( p ) );
216 if ( !ai->allowHeteroChildren() && ai->childCount() > 1 )
240 _verifyPathNameAbsolute(
pathName );
255 _verifyPathNameAbsolute(
pathName );
260 root->set(
pathName, ni, autoPathCreate );
280 for (
unsigned i = 0; i < sdbufs.size(); i++ )
285 if ( sdbufs.at( i ).impl()->capacity() != sdbufs.at( 0 ).impl()->capacity() )
288 "this->pathName=" + this->
pathName() +
" sdbuf.pathName=" + pathName +
289 " firstCapacity=" +
toString( sdbufs.at( 0 ).impl()->capacity() ) +
290 " secondCapacity=" +
toString( sdbufs.at( i ).impl()->capacity() ) );
295 if ( !pathNames.insert(
pathName ).second )
297 "this->pathName=" + this->
pathName() +
" sdbuf.pathName=" + pathName );
302 "this->pathName=" + this->
pathName() +
" sdbuf.pathName=" + pathName );
317 if (
this == &*target )
330 for ( int64_t i = 0; i < childCount; ++i )
332 if ( sni->get( i )->findTerminalPosition( target, countFromLeft ) )
346 for ( int64_t i = 0; i < childCount; ++i )
348 if ( vni->get( i )->findTerminalPosition( target, countFromLeft ) )
380 bool NodeImpl::_verifyPathNameAbsolute(
const ustring &inPathName )
385 bool isRelative =
false;
386 std::vector<ustring>
fields;
389 imf->pathNameParse( inPathName, isRelative,
408 switch ( root->type() )
std::vector< PCLPointField > fields
Object thrown by E57 API functions to communicate the conditions of an error.
ustring imageFileName() const
ImageFileImplWeakPtr destImageFile_
ImageFileImplSharedPtr destImageFile()
virtual NodeType type() const =0
NodeImpl(ImageFileImplWeakPtr destImageFile)
ustring relativePathName(const NodeImplSharedPtr &origin, ustring childPathName=ustring()) const
bool findTerminalPosition(const NodeImplSharedPtr &target, uint64_t &countFromLeft)
void checkBuffers(const std::vector< SourceDestBuffer > &sdbufs, bool allowMissing)
virtual void setAttachedRecursive()
virtual void set(const ustring &pathName, NodeImplSharedPtr ni, bool autoPathCreate=false)
void checkImageFileOpen(const char *srcFileName, int srcLineNumber, const char *srcFunctionName) const
NodeImplSharedPtr getRoot()
virtual bool isDefined(const ustring &pathName)=0
ustring elementName() const
virtual void checkLeavesInSet(const StringSet &pathNames, NodeImplSharedPtr origin)=0
NodeImplSharedPtr parent()
virtual NodeImplSharedPtr get(const ustring &pathName)
void setParent(NodeImplSharedPtr parent, const ustring &elementName)
virtual void dump(int indent=0, std::ostream &os=std::cout) const
virtual int64_t childCount() const
QTextStream & endl(QTextStream &stream)
std::shared_ptr< class NodeImpl > NodeImplSharedPtr
std::weak_ptr< class ImageFileImpl > ImageFileImplWeakPtr
std::shared_ptr< class ImageFileImpl > ImageFileImplSharedPtr
@ E57_ERROR_BUFFER_DUPLICATE_PATHNAME
duplicate pathname in CompressedVectorNode read/write
@ E57_ERROR_INTERNAL
An unrecoverable inconsistent internal state was detected.
@ E57_ERROR_IMAGEFILE_NOT_OPEN
destImageFile is no longer open
@ E57_ERROR_BUFFER_SIZE_MISMATCH
SourceDestBuffers not all same size.
@ E57_ERROR_ALREADY_HAS_PARENT
node already has a parent
@ E57_ERROR_BAD_PATH_NAME
E57 path name is not well formed.
@ E57_ERROR_PATH_UNDEFINED
E57 element path well formed but not defined.
std::string ustring
UTF-8 encodeded Unicode string.
std::set< std::string > StringSet
@ E57_COMPRESSED_VECTOR
CompressedVectorNode class.
@ E57_BLOB
BlobNode class.
@ E57_STRUCTURE
StructureNode class.
@ E57_VECTOR
VectorNode class.
@ E57_INTEGER
IntegerNode class.
@ E57_SCALED_INTEGER
ScaledIntegerNode class.
@ E57_FLOAT
FloatNode class.
@ E57_STRING
StringNode class.
std::string toString(T x)
std::vector< std::string > StringList
std::string space(size_t n)