mirror of
https://github.com/jbeder/yaml-cpp.git
synced 2025-09-10 04:51:17 +00:00
Changed the way we read different types of scalars.
It's better organized now, I think - nodes only offer a single main way of getting the fundamental scalar (as a string), and now we can specialize a single template to read specific types.
This commit is contained in:
@@ -63,44 +63,9 @@ namespace YAML
|
||||
return m_pRef->IsSequence();
|
||||
}
|
||||
|
||||
bool Alias::Read(std::string& v) const
|
||||
bool Alias::GetScalar(std::string& scalar) const
|
||||
{
|
||||
return m_pRef->Read(v);
|
||||
}
|
||||
|
||||
bool Alias::Read(int& v) const
|
||||
{
|
||||
return m_pRef->Read(v);
|
||||
}
|
||||
|
||||
bool Alias::Read(unsigned& v) const
|
||||
{
|
||||
return m_pRef->Read(v);
|
||||
}
|
||||
|
||||
bool Alias::Read(long& v) const
|
||||
{
|
||||
return m_pRef->Read(v);
|
||||
}
|
||||
|
||||
bool Alias::Read(float& v) const
|
||||
{
|
||||
return m_pRef->Read(v);
|
||||
}
|
||||
|
||||
bool Alias::Read(double& v) const
|
||||
{
|
||||
return m_pRef->Read(v);
|
||||
}
|
||||
|
||||
bool Alias::Read(char& v) const
|
||||
{
|
||||
return m_pRef->Read(v);
|
||||
}
|
||||
|
||||
bool Alias::Read(bool& v) const
|
||||
{
|
||||
return m_pRef->Read(v);
|
||||
return m_pRef->GetScalar(scalar);
|
||||
}
|
||||
|
||||
int Alias::Compare(Content *pContent)
|
||||
|
Reference in New Issue
Block a user