MCPcopy Create free account
hub / github.com/FlaxEngine/FlaxEngine / node_output

Function node_output

Source/ThirdParty/pugixml/pugixml.cpp:3600–3687  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3598 };
3599
3600 PUGI__FN void node_output(xml_buffered_writer& writer, xml_node_struct* root, const char_t* indent, unsigned int flags, unsigned int depth)
3601 {
3602 size_t indent_length = ((flags & (format_indent | format_raw)) == format_indent) ? strlength(indent) : 0;
3603 unsigned int indent_flags = indent_indent;
3604
3605 xml_node_struct* node = root;
3606
3607 do
3608 {
3609 assert(node);
3610
3611 // begin writing current node
3612 if (PUGI__NODETYPE(node) == node_pcdata || PUGI__NODETYPE(node) == node_cdata)
3613 {
3614 node_output_simple(writer, node, flags);
3615
3616 indent_flags = 0;
3617 }
3618 else
3619 {
3620 if ((indent_flags & indent_newline) && (flags & format_raw) == 0)
3621 writer.write('\n');
3622
3623 if ((indent_flags & indent_indent) && indent_length)
3624 text_output_indent(writer, indent, indent_length, depth);
3625
3626 if (PUGI__NODETYPE(node) == node_element)
3627 {
3628 indent_flags = indent_newline | indent_indent;
3629
3630 if (node_output_start(writer, node, flags))
3631 {
3632 node = node->first_child;
3633 depth++;
3634 continue;
3635 }
3636 }
3637 else if (PUGI__NODETYPE(node) == node_document)
3638 {
3639 indent_flags = indent_indent;
3640
3641 if (node->first_child)
3642 {
3643 node = node->first_child;
3644 continue;
3645 }
3646 }
3647 else
3648 {
3649 node_output_simple(writer, node, flags);
3650
3651 indent_flags = indent_newline | indent_indent;
3652 }
3653 }
3654
3655 // continue to the next node
3656 while (node != root)
3657 {

Callers 2

printMethod · 0.85
saveMethod · 0.85

Calls 6

strlengthFunction · 0.85
node_output_simpleFunction · 0.85
text_output_indentFunction · 0.85
node_output_startFunction · 0.85
node_output_endFunction · 0.85
writeMethod · 0.45

Tested by

no test coverage detected