MCPcopy Create free account
hub / github.com/MaxBelkov/visualsyslog / CloseElement

Method CloseElement

sourcecommon/tinyxml2.cpp:2059–2082  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2057
2058
2059void XMLPrinter::CloseElement( bool compactMode )
2060{
2061 --_depth;
2062 const char* name = _stack.Pop();
2063
2064 if ( _elementJustOpened ) {
2065 Print( "/>" );
2066 }
2067 else {
2068 if ( _textDepth < 0 && !compactMode) {
2069 Print( "\n" );
2070 PrintSpace( _depth );
2071 }
2072 Print( "</%s>", name );
2073 }
2074
2075 if ( _textDepth == _depth ) {
2076 _textDepth = -1;
2077 }
2078 if ( _depth == 0 && !compactMode) {
2079 Print( "\n" );
2080 }
2081 _elementJustOpened = false;
2082}
2083
2084
2085void XMLPrinter::SealElement()

Callers

nothing calls this directly

Calls 1

PopMethod · 0.80

Tested by

no test coverage detected