mirror of
https://github.com/jbeder/yaml-cpp.git
synced 2025-09-10 04:51:17 +00:00
Added Node::Clone function
This commit is contained in:
@@ -13,6 +13,12 @@ namespace YAML
|
||||
|
||||
}
|
||||
|
||||
Sequence::Sequence(const std::vector<Node *>& data)
|
||||
{
|
||||
for(std::size_t i=0;i<data.size();i++)
|
||||
m_data.push_back(data[i]->Clone().release());
|
||||
}
|
||||
|
||||
Sequence::~Sequence()
|
||||
{
|
||||
Clear();
|
||||
@@ -25,6 +31,11 @@ namespace YAML
|
||||
m_data.clear();
|
||||
}
|
||||
|
||||
Content *Sequence::Clone() const
|
||||
{
|
||||
return new Sequence(m_data);
|
||||
}
|
||||
|
||||
bool Sequence::GetBegin(std::vector <Node *>::const_iterator& it) const
|
||||
{
|
||||
it = m_data.begin();
|
||||
|
Reference in New Issue
Block a user