MCPcopy Create free account
hub / github.com/apache/trafficserver / BlockMapPrepareSimpleKeyValue

Method BlockMapPrepareSimpleKeyValue

lib/yamlcpp/src/emitter.cpp:645–670  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

643}
644
645void Emitter::BlockMapPrepareSimpleKeyValue(EmitterNodeType::value child) {
646 const std::size_t curIndent = m_pState->CurIndent();
647 const std::size_t nextIndent = curIndent + m_pState->CurGroupIndent();
648
649 if (!m_pState->HasBegunNode()) {
650 if (m_pState->HasAlias()) {
651 m_stream << " ";
652 }
653 m_stream << ":";
654 }
655
656 switch (child) {
657 case EmitterNodeType::NoType:
658 break;
659 case EmitterNodeType::Property:
660 case EmitterNodeType::Scalar:
661 case EmitterNodeType::FlowSeq:
662 case EmitterNodeType::FlowMap:
663 SpaceOrIndentTo(true, nextIndent);
664 break;
665 case EmitterNodeType::BlockSeq:
666 case EmitterNodeType::BlockMap:
667 m_stream << "\n";
668 break;
669 }
670}
671
672// SpaceOrIndentTo
673// . Prepares for some more content by proper spacing

Callers

nothing calls this directly

Calls 4

CurIndentMethod · 0.80
CurGroupIndentMethod · 0.80
HasBegunNodeMethod · 0.80
HasAliasMethod · 0.80

Tested by

no test coverage detected