aliascontent.cpp 1.64 KB
Newer Older
1
2
3
4
5
6
7
8
9
#include "aliascontent.h"

namespace YAML
{
	AliasContent::AliasContent(Content* pNodeContent)
		: m_pRef(pNodeContent)
	{
	}

Jesse Beder's avatar
Jesse Beder committed
10
11
12
13
14
	Content *AliasContent::Clone() const
	{
		return 0; // TODO: how to clone an alias?
	}

15
	void AliasContent::Parse(Scanner * /*pScanner*/, const ParserState& /*state*/)
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
	{
	}

	void AliasContent::Write(Emitter&) const
	{
		// no content (just an alias)
	}

	bool AliasContent::GetBegin(std::vector <Node *>::const_iterator& i) const
	{
		return m_pRef->GetBegin(i);
	}

	bool AliasContent::GetBegin(std::map <Node *, Node *, ltnode>::const_iterator& i) const
	{
		return m_pRef->GetBegin(i);
	}

	bool AliasContent::GetEnd(std::vector <Node *>::const_iterator& i) const
	{
		return m_pRef->GetEnd(i);
	}

	bool AliasContent::GetEnd(std::map <Node *, Node *, ltnode>::const_iterator& i) const
	{
		return m_pRef->GetEnd(i);
	}

44
	Node* AliasContent::GetNode(std::size_t n) const
45
46
47
48
	{
		return m_pRef->GetNode(n);
	}

49
	std::size_t AliasContent::GetSize() const
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
	{
		return m_pRef->GetSize();
	}

	bool AliasContent::IsScalar() const
	{
		return m_pRef->IsScalar();
	}

	bool AliasContent::IsMap() const
	{
		return m_pRef->IsMap();
	}

	bool AliasContent::IsSequence() const
	{
		return m_pRef->IsSequence();
	}

	bool AliasContent::GetScalar(std::string& scalar) const
	{
		return m_pRef->GetScalar(scalar);
	}

	int AliasContent::Compare(Content *pContent)
	{
		return m_pRef->Compare(pContent);
	}

	int AliasContent::Compare(Scalar *pScalar)
	{
		return m_pRef->Compare(pScalar);
	}

	int AliasContent::Compare(Sequence *pSequence)
	{
		return m_pRef->Compare(pSequence);
	}

	int AliasContent::Compare(Map *pMap)
	{
		return m_pRef->Compare(pMap);
	}
}