MCPcopy Create free account
hub / github.com/MediaArea/MediaInfoLib / CloseElement

Method CloseElement

Source/ThirdParty/tinyxml2/tinyxml2.cpp:2622–2647  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2620
2621
2622void XMLPrinter::CloseElement( bool compactMode )
2623{
2624 --_depth;
2625 const char* name = _stack.Pop();
2626
2627 if ( _elementJustOpened ) {
2628 Write( "/>" );
2629 }
2630 else {
2631 if ( _textDepth < 0 && !compactMode) {
2632 Putc( '\n' );
2633 PrintSpace( _depth );
2634 }
2635 Write ( "</" );
2636 Write ( name );
2637 Write ( ">" );
2638 }
2639
2640 if ( _textDepth == _depth ) {
2641 _textDepth = -1;
2642 }
2643 if ( _depth == 0 && !compactMode) {
2644 Putc( '\n' );
2645 }
2646 _elementJustOpened = false;
2647}
2648
2649
2650void XMLPrinter::SealElementIfJustOpened()

Callers

nothing calls this directly

Calls 2

WriteFunction · 0.85
PopMethod · 0.80

Tested by

no test coverage detected