| 416 | #endif |
| 417 | |
| 418 | NodeImplSharedPtr NodeImpl::_verifyAndGetRoot() |
| 419 | { |
| 420 | // Find root of the tree |
| 421 | NodeImplSharedPtr root( shared_from_this()->getRoot() ); |
| 422 | |
| 423 | // Check to make sure root node is non-terminal type (otherwise have stack overflow). |
| 424 | switch ( root->type() ) |
| 425 | { |
| 426 | case TypeStructure: |
| 427 | case TypeVector: //??? COMPRESSED_VECTOR? |
| 428 | break; |
| 429 | default: |
| 430 | throw E57_EXCEPTION2( ErrorInternal, |
| 431 | "root invalid for this->pathName=" + this->pathName() ); |
| 432 | } |
| 433 | |
| 434 | return root; |
| 435 | } |