MCPcopy Create free account
hub / github.com/PDAL/PDAL / isTypeEquivalent

Method isTypeEquivalent

plugins/e57/libE57Format/src/VectorNodeImpl.cpp:40–75  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

38 }
39
40 bool VectorNodeImpl::isTypeEquivalent( NodeImplSharedPtr ni )
41 {
42 // don't checkImageFileOpen
43
44 // Same node type?
45 if ( ni->type() != TypeVector )
46 {
47 return ( false );
48 }
49
50 std::shared_ptr<VectorNodeImpl> ai( std::static_pointer_cast<VectorNodeImpl>( ni ) );
51
52 // allowHeteroChildren must match
53 if ( allowHeteroChildren_ != ai->allowHeteroChildren_ )
54 {
55 return ( false );
56 }
57
58 // Same number of children?
59 if ( childCount() != ai->childCount() )
60 {
61 return ( false );
62 }
63
64 // Check each child, must be in same order
65 for ( unsigned i = 0; i < childCount(); i++ )
66 {
67 if ( !children_.at( i )->isTypeEquivalent( ai->children_.at( i ) ) )
68 {
69 return ( false );
70 }
71 }
72
73 // Types match
74 return ( true );
75 }
76
77 bool VectorNodeImpl::allowHeteroChildren() const
78 {

Callers 1

setMethod · 0.45

Calls 3

atMethod · 0.80
typeMethod · 0.45
childCountMethod · 0.45

Tested by

no test coverage detected