Removed old emitter state machine

This commit is contained in:
Jesse Beder
2012-05-21 16:31:07 -05:00
parent 41c2ddc03e
commit 5a2183f55b
4 changed files with 13 additions and 638 deletions

View File

@@ -4,11 +4,8 @@
namespace YAML
{
EmitterState::EmitterState(): m_isGood(true), m_curIndent(0), m_requiresSoftSeparation(false), m_requiresHardSeparation(false)
EmitterState::EmitterState(): m_isGood(true), m_curIndent(0)
{
// start up
m_stateStack.push(ES_WAITING_FOR_DOC);
// set default global manipulators
m_charset.set(EmitNonAscii);
m_strFmt.set(Auto);
@@ -59,7 +56,6 @@ namespace YAML
// set up group
pGroup->flow = GetFlowType(type);
pGroup->indent = GetIndent();
pGroup->usingLongKey = (GetMapKeyFormat() == LongKey ? true : false);
m_groups.push(pGroup);
}
@@ -101,25 +97,6 @@ namespace YAML
return (m_groups.top().flow == Flow ? FlowType::Flow : FlowType::Block);
}
bool EmitterState::CurrentlyInLongKey()
{
if(m_groups.empty())
return false;
return m_groups.top().usingLongKey;
}
void EmitterState::StartLongKey()
{
if(!m_groups.empty())
m_groups.top().usingLongKey = true;
}
void EmitterState::StartSimpleKey()
{
if(!m_groups.empty())
m_groups.top().usingLongKey = false;
}
void EmitterState::ClearModifiedSettings()
{