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

Method FlowSeqPrepareNode

lib/yamlcpp/src/emitter.cpp:328–357  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

326}
327
328void Emitter::FlowSeqPrepareNode(EmitterNodeType::value child) {
329 const std::size_t lastIndent = m_pState->LastIndent();
330
331 if (!m_pState->HasBegunNode()) {
332 if (m_stream.comment())
333 m_stream << "\n";
334 m_stream << IndentTo(lastIndent);
335 if (m_pState->CurGroupChildCount() == 0)
336 m_stream << "[";
337 else
338 m_stream << ",";
339 }
340
341 switch (child) {
342 case EmitterNodeType::NoType:
343 break;
344 case EmitterNodeType::Property:
345 case EmitterNodeType::Scalar:
346 case EmitterNodeType::FlowSeq:
347 case EmitterNodeType::FlowMap:
348 SpaceOrIndentTo(
349 m_pState->HasBegunContent() || m_pState->CurGroupChildCount() > 0,
350 lastIndent);
351 break;
352 case EmitterNodeType::BlockSeq:
353 case EmitterNodeType::BlockMap:
354 assert(false);
355 break;
356 }
357}
358
359void Emitter::BlockSeqPrepareNode(EmitterNodeType::value child) {
360 const std::size_t curIndent = m_pState->CurIndent();

Callers

nothing calls this directly

Calls 5

IndentToClass · 0.85
LastIndentMethod · 0.80
HasBegunNodeMethod · 0.80
CurGroupChildCountMethod · 0.80
HasBegunContentMethod · 0.80

Tested by

no test coverage detected