Function duplicate

Synopsis

#include <src/c4/yml/node.hpp>

NodeRef duplicate(NodeRef const parent, NodeRef const after) const

Description

No description yet.

Source

Lines 663-679 in src/c4/yml/node.hpp.

inline NodeRef duplicate(NodeRef const parent, NodeRef const after) const
{
    _C4RV();
    RYML_ASSERT(parent.m_tree == after.m_tree);
    if(parent.m_tree == m_tree)
    {
        size_t dup = m_tree->duplicate(m_id, parent.m_id, after.m_id);
        NodeRef r(m_tree, dup);
        return r;
    }
    else
    {
        size_t dup = parent.m_tree->duplicate(m_tree, m_id, parent.m_id, after.m_id);
        NodeRef r(parent.m_tree, dup);
        return r;
    }
}





Add Discussion as Guest

Log in