Merged r444:449 from the node refactoring branch to the trunk

This commit is contained in:
Jesse Beder
2011-03-03 00:19:26 +00:00
parent ced50538fe
commit ca5992b971
35 changed files with 421 additions and 860 deletions

View File

@@ -6,10 +6,10 @@
#endif
#include "yaml-cpp/eventhandler.h"
#include "ptr_stack.h"
#include <map>
#include <memory>
#include <stack>
#include <vector>
namespace YAML
{
@@ -24,7 +24,7 @@ namespace YAML
virtual void OnDocumentStart(const Mark& mark);
virtual void OnDocumentEnd();
virtual void OnNull(const std::string& tag, anchor_t anchor);
virtual void OnNull(const Mark& mark, anchor_t anchor);
virtual void OnAlias(const Mark& mark, anchor_t anchor);
virtual void OnScalar(const Mark& mark, const std::string& tag, anchor_t anchor, const std::string& value);
@@ -40,19 +40,19 @@ namespace YAML
Node& Top();
void Pop();
void Insert(std::auto_ptr<Node> pNode);
void RegisterAnchor(anchor_t anchor, const Node& node);
void Insert(Node& node);
void RegisterAnchor(anchor_t anchor, Node& node);
private:
Node& m_root;
bool m_initializedRoot;
bool m_finished;
ptr_stack<Node> m_stack;
ptr_stack<Node> m_pendingKeys;
std::stack<Node *> m_stack;
std::stack<Node *> m_pendingKeys;
std::stack<bool> m_didPushKey;
typedef std::vector<const Node *> Anchors;
typedef std::vector<Node *> Anchors;
Anchors m_anchors;
};
}