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:
Jesse Beder
2009-05-23 23:51:01 +00:00
parent b952bc594f
commit e76521c0e9
12 changed files with 158 additions and 270 deletions

View File

@@ -36,14 +36,7 @@ namespace YAML
virtual bool IsSequence() const { return false; }
// extraction
virtual bool Read(std::string&) const { return false; }
virtual bool Read(int&) const { return false; }
virtual bool Read(unsigned&) const { return false; }
virtual bool Read(long&) const { return false; }
virtual bool Read(float&) const { return false; }
virtual bool Read(double&) const { return false; }
virtual bool Read(char&) const { return false; }
virtual bool Read(bool&) const { return false; }
virtual bool GetScalar(std::string&) const { return false; }
// ordering
virtual int Compare(Content *) { return 0; }