![]() |
ACloudViewer
3.9.4
A Modern Library for 3D Data Processing
|
#include <StructureNodeImpl.h>


Public Member Functions | |
| StructureNodeImpl (ImageFileImplWeakPtr destImageFile) | |
| ~StructureNodeImpl () override=default | |
| NodeType | type () const override |
| bool | isTypeEquivalent (NodeImplSharedPtr ni) override |
| bool | isDefined (const ustring &pathName) override |
| void | setAttachedRecursive () override |
| virtual int64_t | childCount () const |
| virtual NodeImplSharedPtr | get (int64_t index) |
| NodeImplSharedPtr | get (const ustring &pathName) override |
| virtual void | set (int64_t index, NodeImplSharedPtr ni) |
| void | set (const ustring &pathName, NodeImplSharedPtr ni, bool autoPathCreate=false) override |
| void | set (const StringList &fields, unsigned level, NodeImplSharedPtr ni, bool autoPathCreate=false) override |
| virtual void | append (NodeImplSharedPtr ni) |
| void | checkLeavesInSet (const StringSet &pathNames, NodeImplSharedPtr origin) override |
| void | writeXml (ImageFileImplSharedPtr imf, CheckedFile &cf, int indent, const char *forcedFieldName=nullptr) override |
| void | dump (int indent=0, std::ostream &os=std::cout) const override |
Public Member Functions inherited from e57::NodeImpl | |
| void | checkImageFileOpen (const char *srcFileName, int srcLineNumber, const char *srcFunctionName) const |
| bool | isRoot () const |
| NodeImplSharedPtr | parent () |
| ustring | pathName () const |
| ustring | relativePathName (const NodeImplSharedPtr &origin, ustring childPathName=ustring()) const |
| ustring | elementName () const |
| ImageFileImplSharedPtr | destImageFile () |
| ustring | imageFileName () const |
| bool | isAttached () const |
| void | setParent (NodeImplSharedPtr parent, const ustring &elementName) |
| bool | isTypeConstrained () |
| void | checkBuffers (const std::vector< SourceDestBuffer > &sdbufs, bool allowMissing) |
| bool | findTerminalPosition (const NodeImplSharedPtr &target, uint64_t &countFromLeft) |
| virtual | ~NodeImpl ()=default |
Protected Member Functions | |
| NodeImplSharedPtr | lookup (const ustring &pathName) override |
Protected Member Functions inherited from e57::NodeImpl | |
| NodeImpl (ImageFileImplWeakPtr destImageFile) | |
| NodeImpl & | operator= (NodeImpl &n) |
| NodeImplSharedPtr | getRoot () |
Protected Attributes | |
| std::vector< NodeImplSharedPtr > | children_ |
Protected Attributes inherited from e57::NodeImpl | |
| ImageFileImplWeakPtr | destImageFile_ |
| NodeImplWeakPtr | parent_ |
| ustring | elementName_ |
| bool | isAttached_ |
Definition at line 35 of file StructureNodeImpl.h.
| StructureNodeImpl::StructureNodeImpl | ( | ImageFileImplWeakPtr | destImageFile | ) |
Definition at line 36 of file StructureNodeImpl.cpp.
References e57::NodeImpl::checkImageFileOpen().
|
overridedefault |
|
virtual |
don't checkImageFileOpen, set() will do it
Create new node at end of list with integer field name
Definition at line 364 of file StructureNodeImpl.cpp.
References childCount(), and set().
|
overridevirtual |
don't checkImageFileOpen
Not a leaf node, so check all our children
Implements e57::NodeImpl.
Definition at line 373 of file StructureNodeImpl.cpp.
References children_.
|
virtual |
Definition at line 117 of file StructureNodeImpl.cpp.
References e57::NodeImpl::checkImageFileOpen(), and children_.
Referenced by append(), e57::NodeImpl::findTerminalPosition(), isTypeEquivalent(), and e57::VectorNodeImpl::isTypeEquivalent().
|
overridevirtual |
don't checkImageFileOpen
Reimplemented from e57::NodeImpl.
Reimplemented in e57::VectorNodeImpl.
Definition at line 458 of file StructureNodeImpl.cpp.
References children_, e57::NodeImpl::dump(), QtCompat::endl(), e57::space(), and type().
|
overridevirtual |
Reimplemented from e57::NodeImpl.
Definition at line 135 of file StructureNodeImpl.cpp.
References e57::NodeImpl::checkImageFileOpen(), e57::E57_ERROR_PATH_UNDEFINED, E57_EXCEPTION2, lookup(), and e57::NodeImpl::pathName().
|
virtual |
Definition at line 123 of file StructureNodeImpl.cpp.
References e57::NodeImpl::checkImageFileOpen(), children_, e57::E57_ERROR_CHILD_INDEX_OUT_OF_BOUNDS, E57_EXCEPTION2, e57::NodeImpl::pathName(), and e57::toString().
|
overridevirtual |
Implements e57::NodeImpl.
Definition at line 98 of file StructureNodeImpl.cpp.
References e57::NodeImpl::checkImageFileOpen(), lookup(), and e57::NodeImpl::pathName().
|
overridevirtual |
don't checkImageFileOpen
Same node type?
Downcast to shared_ptr<StructureNodeImpl>
Same number of children?
Check each child is equivalent
Check if matching field name is in same position (to speed things up)
Children in different order, so lookup by name and check if equal to our child
Types match
Implements e57::NodeImpl.
Reimplemented in e57::VectorNodeImpl.
Definition at line 48 of file StructureNodeImpl.cpp.
References childCount(), children_, and e57::E57_STRUCTURE.
|
overrideprotectedvirtual |
don't checkImageFileOpen
empty pointer
Find child with elementName that matches first field in path
empty pointer
Remove first field in path
Call lookup on child object with remaining fields in path name
Absolute pathname and we aren't at the root
Find root of the tree
Call lookup on root
Reimplemented from e57::NodeImpl.
Definition at line 147 of file StructureNodeImpl.cpp.
References children_, e57::NodeImpl::destImageFile_, fields, e57::NodeImpl::getRoot(), e57::NodeImpl::isRoot(), and e57::NodeImpl::pathName().
Referenced by get(), and isDefined().
|
overridevirtual |
Reimplemented from e57::NodeImpl.
|
overridevirtual |
Path may be absolute or relative with several levels. Break string into individual levels.
Relative path, starting from current object, e.g. "foo/17/bar"
Absolute path (starting from root), e.g. "/foo/17/bar"
Reimplemented from e57::NodeImpl.
Definition at line 253 of file StructureNodeImpl.cpp.
References e57::NodeImpl::checkImageFileOpen(), e57::NodeImpl::destImageFile_, QtCompat::endl(), fields, e57::NodeImpl::getRoot(), e57::NodeImpl::pathName(), and set().
|
virtual |
Allow index == current number of elements, interpret as append
Enforce "set once" policy, only allow append
Verify that child is destined for same ImageFile as this is
Field name is string version of index value, e.g. "14"
If this struct is type constrained, can't add new child
Reimplemented in e57::VectorNodeImpl.
Definition at line 209 of file StructureNodeImpl.cpp.
References e57::NodeImpl::checkImageFileOpen(), children_, e57::NodeImpl::destImageFile(), e57::E57_ERROR_CHILD_INDEX_OUT_OF_BOUNDS, e57::E57_ERROR_DIFFERENT_DEST_IMAGEFILE, e57::E57_ERROR_HOMOGENEOUS_VIOLATION, e57::E57_ERROR_SET_TWICE, E57_EXCEPTION2, e57::NodeImpl::elementName(), e57::NodeImpl::isTypeConstrained(), e57::NodeImpl::pathName(), and e57::toString().
Referenced by append(), set(), and e57::VectorNodeImpl::set().
|
overridevirtual |
Mark this node as attached to an ImageFile
Not a leaf node, so mark all our children
Reimplemented from e57::NodeImpl.
Definition at line 105 of file StructureNodeImpl.cpp.
References children_, and e57::NodeImpl::isAttached_.
|
overridevirtual |
don't checkImageFileOpen
Implements e57::NodeImpl.
Reimplemented in e57::VectorNodeImpl.
Definition at line 41 of file StructureNodeImpl.cpp.
References e57::E57_STRUCTURE.
Referenced by dump().
|
overridevirtual |
don't checkImageFileOpen
If this struct is the root for the E57 file, add name space declarations Note the prototype of a CompressedVector is a separate tree, so don't want to write out namespaces if not the ImageFile root
If user didn't explicitly declare a default namespace, use the current E57 standard one.
Write all children nested inside Structure element
Write closing tag
XML element has no child elements
Implements e57::NodeImpl.
Reimplemented in e57::VectorNodeImpl.
Definition at line 385 of file StructureNodeImpl.cpp.
References children_, e57::E57_V1_0_URI, e57::NodeImpl::elementName_, e57::NodeImpl::isRoot(), and e57::space().
|
protected |
Definition at line 69 of file StructureNodeImpl.h.
Referenced by checkLeavesInSet(), childCount(), dump(), e57::VectorNodeImpl::dump(), get(), isTypeEquivalent(), e57::VectorNodeImpl::isTypeEquivalent(), lookup(), set(), e57::VectorNodeImpl::set(), setAttachedRecursive(), writeXml(), and e57::VectorNodeImpl::writeXml().