Added writing integral types

This commit is contained in:
Jesse Beder
2012-05-22 13:57:44 -05:00
parent cc559956a0
commit c95bcae49f
3 changed files with 44 additions and 7 deletions

View File

@@ -74,6 +74,9 @@ namespace YAML
template<typename T> void SetStreamablePrecision(std::stringstream&) {}
unsigned GetFloatPrecision() const;
unsigned GetDoublePrecision() const;
void PrepareIntegralStream(std::stringstream& stream) const;
void StartedScalar();
private:
void EmitBeginDoc();
@@ -111,6 +114,15 @@ namespace YAML
if(!good())
return *this;
PrepareNode(EmitterNodeType::Scalar);
std::stringstream stream;
PrepareIntegralStream(stream);
stream << value;
m_stream << stream.str();
StartedScalar();
return *this;
}