forked from jbeder/yaml-cpp
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merged aliases branch into trunk, changes r100:150
- Loading branch information
Showing
13 changed files
with
308 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,125 @@ | ||
#include "crt.h" | ||
#include "alias.h" | ||
#include <iostream> | ||
|
||
namespace YAML | ||
{ | ||
Alias::Alias(Content* pNodeContent) | ||
: m_pRef(pNodeContent) | ||
{ | ||
} | ||
|
||
void Alias::Parse(Scanner *pScanner, const ParserState& state) | ||
{ | ||
} | ||
|
||
void Alias::Write(std::ostream& out, int indent, bool startedLine, bool onlyOneCharOnLine) | ||
{ | ||
out << "\n"; | ||
} | ||
|
||
bool Alias::GetBegin(std::vector <Node *>::const_iterator& i) const | ||
{ | ||
return m_pRef->GetBegin(i); | ||
} | ||
|
||
bool Alias::GetBegin(std::map <Node *, Node *, ltnode>::const_iterator& i) const | ||
{ | ||
return m_pRef->GetBegin(i); | ||
} | ||
|
||
bool Alias::GetEnd(std::vector <Node *>::const_iterator& i) const | ||
{ | ||
return m_pRef->GetEnd(i); | ||
} | ||
|
||
bool Alias::GetEnd(std::map <Node *, Node *, ltnode>::const_iterator& i) const | ||
{ | ||
return m_pRef->GetEnd(i); | ||
} | ||
|
||
Node* Alias::GetNode(unsigned n) const | ||
{ | ||
return m_pRef->GetNode(n); | ||
} | ||
|
||
unsigned Alias::GetSize() const | ||
{ | ||
return m_pRef->GetSize(); | ||
} | ||
|
||
bool Alias::IsScalar() const | ||
{ | ||
return m_pRef->IsScalar(); | ||
} | ||
|
||
bool Alias::IsMap() const | ||
{ | ||
return m_pRef->IsMap(); | ||
} | ||
|
||
bool Alias::IsSequence() const | ||
{ | ||
return m_pRef->IsSequence(); | ||
} | ||
|
||
bool Alias::Read(std::string& v) 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); | ||
} | ||
|
||
int Alias::Compare(Content *pContent) | ||
{ | ||
return m_pRef->Compare(pContent); | ||
} | ||
|
||
int Alias::Compare(Scalar *pScalar) | ||
{ | ||
return m_pRef->Compare(pScalar); | ||
} | ||
|
||
int Alias::Compare(Sequence *pSequence) | ||
{ | ||
return m_pRef->Compare(pSequence); | ||
} | ||
|
||
int Alias::Compare(Map *pMap) | ||
{ | ||
return m_pRef->Compare(pMap); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
#pragma once | ||
|
||
#include "content.h" | ||
|
||
namespace YAML | ||
{ | ||
class Alias : public Content | ||
{ | ||
public: | ||
Alias(Content *pNodeContent); | ||
|
||
virtual void Parse(Scanner* pScanner, const ParserState& state); | ||
virtual void Write(std::ostream& out, int indent, bool startedLine, bool onlyOneCharOnLine); | ||
|
||
virtual bool GetBegin(std::vector <Node *>::const_iterator&) const; | ||
virtual bool GetBegin(std::map <Node *, Node *, ltnode>::const_iterator&) const; | ||
virtual bool GetEnd(std::vector <Node *>::const_iterator&) const; | ||
virtual bool GetEnd(std::map <Node *, Node *, ltnode>::const_iterator&) const; | ||
virtual Node* GetNode(unsigned) const; | ||
virtual unsigned GetSize() const; | ||
virtual bool IsScalar() const; | ||
virtual bool IsMap() const; | ||
virtual bool IsSequence() const; | ||
|
||
virtual bool Read(std::string&) const; | ||
virtual bool Read(int&) const; | ||
virtual bool Read(unsigned&) const; | ||
virtual bool Read(long&) const; | ||
virtual bool Read(float&) const; | ||
virtual bool Read(double&) const; | ||
virtual bool Read(char&) const; | ||
virtual bool Read(bool&) const; | ||
|
||
virtual int Compare(Content *); | ||
virtual int Compare(Scalar *); | ||
virtual int Compare(Sequence *); | ||
virtual int Compare(Map *); | ||
|
||
private: | ||
Content* m_pRef; | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.