MCPcopy Create free account
hub / github.com/avast/retdec / XMLPrinter

Method XMLPrinter

deps/tinyxml2/tinyxml2.cpp:2480–2505  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2478}
2479
2480XMLPrinter::XMLPrinter( FILE* file, bool compact, int depth ) :
2481 _elementJustOpened( false ),
2482 _stack(),
2483 _firstElement( true ),
2484 _fp( file ),
2485 _depth( depth ),
2486 _textDepth( -1 ),
2487 _processEntities( true ),
2488 _compactMode( compact ),
2489 _buffer()
2490{
2491 for( int i=0; i<ENTITY_RANGE; ++i ) {
2492 _entityFlag[i] = false;
2493 _restrictedEntityFlag[i] = false;
2494 }
2495 for( int i=0; i<NUM_ENTITIES; ++i ) {
2496 const char entityValue = entities[i].value;
2497 const unsigned char flagIndex = static_cast<unsigned char>(entityValue);
2498 TIXMLASSERT( flagIndex < ENTITY_RANGE );
2499 _entityFlag[flagIndex] = true;
2500 }
2501 _restrictedEntityFlag[static_cast<unsigned char>('&')] = true;
2502 _restrictedEntityFlag[static_cast<unsigned char>('<')] = true;
2503 _restrictedEntityFlag[static_cast<unsigned char>('>')] = true; // not required, but consistency is nice
2504 _buffer.Push( 0 );
2505}
2506
2507
2508void XMLPrinter::Print( const char* format, ... )

Callers

nothing calls this directly

Calls 1

PushMethod · 0.45

Tested by

no test coverage detected