mirror of
https://github.com/jbeder/yaml-cpp.git
synced 2025-09-09 20:51:16 +00:00
Renamed begin/end scalar/group to started/ended scalar/group
This commit is contained in:
@@ -212,7 +212,7 @@ namespace YAML
|
|||||||
|
|
||||||
PrepareNode(m_pState->NextGroupType(GroupType::Seq));
|
PrepareNode(m_pState->NextGroupType(GroupType::Seq));
|
||||||
|
|
||||||
m_pState->BeginGroup(GroupType::Seq);
|
m_pState->StartedGroup(GroupType::Seq);
|
||||||
}
|
}
|
||||||
|
|
||||||
// EmitEndSeq
|
// EmitEndSeq
|
||||||
@@ -221,7 +221,7 @@ namespace YAML
|
|||||||
if(!good())
|
if(!good())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
m_pState->EndGroup(GroupType::Seq);
|
m_pState->EndedGroup(GroupType::Seq);
|
||||||
}
|
}
|
||||||
|
|
||||||
// EmitBeginMap
|
// EmitBeginMap
|
||||||
@@ -232,7 +232,7 @@ namespace YAML
|
|||||||
|
|
||||||
PrepareNode(m_pState->NextGroupType(GroupType::Map));
|
PrepareNode(m_pState->NextGroupType(GroupType::Map));
|
||||||
|
|
||||||
m_pState->BeginGroup(GroupType::Map);
|
m_pState->StartedGroup(GroupType::Map);
|
||||||
}
|
}
|
||||||
|
|
||||||
// EmitEndMap
|
// EmitEndMap
|
||||||
@@ -241,7 +241,7 @@ namespace YAML
|
|||||||
if(!good())
|
if(!good())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
m_pState->EndGroup(GroupType::Map);
|
m_pState->EndedGroup(GroupType::Map);
|
||||||
}
|
}
|
||||||
|
|
||||||
// EmitNewline
|
// EmitNewline
|
||||||
@@ -438,7 +438,7 @@ namespace YAML
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
m_pState->BeginScalar();
|
m_pState->StartedScalar();
|
||||||
|
|
||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
@@ -493,7 +493,7 @@ namespace YAML
|
|||||||
if(!good())
|
if(!good())
|
||||||
return *this;
|
return *this;
|
||||||
|
|
||||||
m_pState->BeginScalar();
|
m_pState->StartedScalar();
|
||||||
|
|
||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
@@ -503,7 +503,7 @@ namespace YAML
|
|||||||
if(!good())
|
if(!good())
|
||||||
return *this;
|
return *this;
|
||||||
|
|
||||||
m_pState->BeginScalar();
|
m_pState->StartedScalar();
|
||||||
|
|
||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
@@ -525,7 +525,7 @@ namespace YAML
|
|||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
m_pState->BeginScalar();
|
m_pState->StartedScalar();
|
||||||
|
|
||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
@@ -592,7 +592,7 @@ namespace YAML
|
|||||||
if(!good())
|
if(!good())
|
||||||
return *this;
|
return *this;
|
||||||
|
|
||||||
m_pState->BeginScalar();
|
m_pState->StartedScalar();
|
||||||
|
|
||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
@@ -602,7 +602,7 @@ namespace YAML
|
|||||||
if(!good())
|
if(!good())
|
||||||
return *this;
|
return *this;
|
||||||
|
|
||||||
m_pState->BeginScalar();
|
m_pState->StartedScalar();
|
||||||
|
|
||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
@@ -614,7 +614,7 @@ namespace YAML
|
|||||||
if(!good())
|
if(!good())
|
||||||
return *this;
|
return *this;
|
||||||
|
|
||||||
m_pState->BeginScalar();
|
m_pState->StartedScalar();
|
||||||
|
|
||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
@@ -58,7 +58,7 @@ namespace YAML
|
|||||||
m_hasNonContent = true;
|
m_hasNonContent = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
void EmitterState::BeginNode()
|
void EmitterState::StartedNode()
|
||||||
{
|
{
|
||||||
if(!m_groups.empty())
|
if(!m_groups.empty())
|
||||||
m_groups.top().childCount++;
|
m_groups.top().childCount++;
|
||||||
@@ -87,14 +87,14 @@ namespace YAML
|
|||||||
return EmitterNodeType::None;
|
return EmitterNodeType::None;
|
||||||
}
|
}
|
||||||
|
|
||||||
void EmitterState::BeginScalar()
|
void EmitterState::StartedScalar()
|
||||||
{
|
{
|
||||||
BeginNode();
|
StartedNode();
|
||||||
}
|
}
|
||||||
|
|
||||||
void EmitterState::BeginGroup(GroupType::value type)
|
void EmitterState::StartedGroup(GroupType::value type)
|
||||||
{
|
{
|
||||||
BeginNode();
|
StartedNode();
|
||||||
|
|
||||||
const int lastGroupIndent = (m_groups.empty() ? 0 : m_groups.top().indent);
|
const int lastGroupIndent = (m_groups.empty() ? 0 : m_groups.top().indent);
|
||||||
m_curIndent += lastGroupIndent;
|
m_curIndent += lastGroupIndent;
|
||||||
@@ -114,7 +114,7 @@ namespace YAML
|
|||||||
m_groups.push(pGroup);
|
m_groups.push(pGroup);
|
||||||
}
|
}
|
||||||
|
|
||||||
void EmitterState::EndGroup(GroupType::value type)
|
void EmitterState::EndedGroup(GroupType::value type)
|
||||||
{
|
{
|
||||||
if(m_groups.empty())
|
if(m_groups.empty())
|
||||||
return SetError(ErrorMsg::UNMATCHED_GROUP_TAG);
|
return SetError(ErrorMsg::UNMATCHED_GROUP_TAG);
|
||||||
|
@@ -37,9 +37,9 @@ namespace YAML
|
|||||||
void SetAnchor();
|
void SetAnchor();
|
||||||
void SetTag();
|
void SetTag();
|
||||||
void SetNonContent();
|
void SetNonContent();
|
||||||
void BeginScalar();
|
void StartedScalar();
|
||||||
void BeginGroup(GroupType::value type);
|
void StartedGroup(GroupType::value type);
|
||||||
void EndGroup(GroupType::value type);
|
void EndedGroup(GroupType::value type);
|
||||||
|
|
||||||
EmitterNodeType::value NextGroupType(GroupType::value type) const;
|
EmitterNodeType::value NextGroupType(GroupType::value type) const;
|
||||||
EmitterNodeType::value CurGroupNodeType() const;
|
EmitterNodeType::value CurGroupNodeType() const;
|
||||||
@@ -100,7 +100,7 @@ namespace YAML
|
|||||||
template <typename T>
|
template <typename T>
|
||||||
void _Set(Setting<T>& fmt, T value, FmtScope::value scope);
|
void _Set(Setting<T>& fmt, T value, FmtScope::value scope);
|
||||||
|
|
||||||
void BeginNode();
|
void StartedNode();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
// basic state ok?
|
// basic state ok?
|
||||||
|
Reference in New Issue
Block a user