| 682 | } |
| 683 | |
| 684 | void E57XmlParser::endElement( const XMLCh *const uri, const XMLCh *const localName, |
| 685 | const XMLCh *const qName ) |
| 686 | { |
| 687 | #ifdef E57_VERBOSE |
| 688 | std::cout << "endElement" << std::endl; |
| 689 | #endif |
| 690 | |
| 691 | // Pop the node that just ended |
| 692 | ParseInfo pi = stack_.top(); //??? really want to make a copy here? |
| 693 | stack_.pop(); |
| 694 | #ifdef E57_VERBOSE |
| 695 | pi.dump( 4 ); |
| 696 | #endif |
| 697 | |
| 698 | // We should now have all the info we need to create the node |
| 699 | NodeImplSharedPtr current_ni; |
| 700 | |
| 701 | switch ( pi.nodeType ) |
| 702 | { |
| 703 | case TypeStructure: |
| 704 | case TypeVector: |
| 705 | current_ni = pi.container_ni; |
| 706 | break; |
| 707 | case TypeCompressedVector: |
| 708 | { |
| 709 | // Verify that both prototype and codecs child elements were defined |
| 710 | // ??? |
| 711 | current_ni = pi.container_ni; |
| 712 | } |
| 713 | break; |
| 714 | case TypeInteger: |
| 715 | { |
| 716 | // Convert child text (if any) to value, else default to 0 |
| 717 | int64_t intValue = 0; |
| 718 | bool foundValue = false; |
| 719 | |
| 720 | if ( pi.childText.length() > 0 ) |
| 721 | { |
| 722 | intValue = convertStrToLL( pi.childText ); |
| 723 | foundValue = true; |
| 724 | } |
| 725 | |
| 726 | std::shared_ptr<IntegerNodeImpl> i_ni( |
| 727 | new IntegerNodeImpl( imf_, intValue, pi.minimum, pi.maximum ) ); |
| 728 | |
| 729 | if ( foundValue ) |
| 730 | { |
| 731 | i_ni->validateValue(); |
| 732 | } |
| 733 | |
| 734 | current_ni = i_ni; |
| 735 | } |
| 736 | break; |
| 737 | case TypeScaledInteger: |
| 738 | { |
| 739 | // Convert child text (if any) to value, else default to 0 |
| 740 | int64_t intValue = 0; |
| 741 | bool foundValue = false; |
nothing calls this directly
no test coverage detected