mirror of
https://github.com/jbeder/yaml-cpp.git
synced 2025-09-10 04:51:17 +00:00
Fixed several bugs from the new file i/o setup.
In particular: 1. Windows CR/LF weren't read properly (issue #11) 2. Scanning wasn't reading EOF properly 3. Documents may be empty (this was old, I think) Also fixed some VS2008 warnings on /W4.
This commit is contained in:
@@ -25,31 +25,31 @@ namespace YAML
|
||||
virtual void Parse(Scanner *pScanner, const ParserState& state) = 0;
|
||||
virtual void Write(std::ostream& out, int indent, bool startedLine, bool onlyOneCharOnLine) = 0;
|
||||
|
||||
virtual bool GetBegin(std::vector <Node *>::const_iterator& it) const { return false; }
|
||||
virtual bool GetBegin(std::map <Node *, Node *, ltnode>::const_iterator& it) const { return false; }
|
||||
virtual bool GetEnd(std::vector <Node *>::const_iterator& it) const { return false; }
|
||||
virtual bool GetEnd(std::map <Node *, Node *, ltnode>::const_iterator& it) const { return false; }
|
||||
virtual Node *GetNode(unsigned i) const { return 0; }
|
||||
virtual bool GetBegin(std::vector <Node *>::const_iterator&) const { return false; }
|
||||
virtual bool GetBegin(std::map <Node *, Node *, ltnode>::const_iterator&) const { return false; }
|
||||
virtual bool GetEnd(std::vector <Node *>::const_iterator&) const { return false; }
|
||||
virtual bool GetEnd(std::map <Node *, Node *, ltnode>::const_iterator&) const { return false; }
|
||||
virtual Node *GetNode(unsigned) const { return 0; }
|
||||
virtual unsigned GetSize() const { return 0; }
|
||||
virtual bool IsScalar() const { return false; }
|
||||
virtual bool IsMap() const { return false; }
|
||||
virtual bool IsSequence() const { return false; }
|
||||
|
||||
// extraction
|
||||
virtual bool Read(std::string& s) const { return false; }
|
||||
virtual bool Read(int& i) const { return false; }
|
||||
virtual bool Read(unsigned& u) const { return false; }
|
||||
virtual bool Read(long& l) const { return false; }
|
||||
virtual bool Read(float& f) const { return false; }
|
||||
virtual bool Read(double& d) const { return false; }
|
||||
virtual bool Read(char& c) const { return false; }
|
||||
virtual bool Read(bool& b) const { return false; }
|
||||
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; }
|
||||
|
||||
// ordering
|
||||
virtual int Compare(Content *pContent) { return 0; }
|
||||
virtual int Compare(Scalar *pScalar) { return 0; }
|
||||
virtual int Compare(Sequence *pSeq) { return 0; }
|
||||
virtual int Compare(Map *pMap) { return 0; }
|
||||
virtual int Compare(Content *) { return 0; }
|
||||
virtual int Compare(Scalar *) { return 0; }
|
||||
virtual int Compare(Sequence *) { return 0; }
|
||||
virtual int Compare(Map *) { return 0; }
|
||||
|
||||
protected:
|
||||
};
|
||||
|
Reference in New Issue
Block a user