1 #ifndef SINGLEDOCPARSER_H_62B23520_7C8E_11DE_8A39_0800200C9A66
2 #define SINGLEDOCPARSER_H_62B23520_7C8E_11DE_8A39_0800200C9A66
4 #if defined(_MSC_VER) || (defined(__GNUC__) && (__GNUC__ == 3 && __GNUC_MINOR__ >= 4) || (__GNUC__ >= 4)) // GCC supports "pragma once" correctly since 3.4
9 #include "yaml-cpp/anchor.h"
10 #include "yaml-cpp/noncopyable.h"
20 class CollectionStack
;
25 class SingleDocParser
: private noncopyable
28 SingleDocParser(Scanner
& scanner
, const Directives
& directives
);
31 void HandleDocument(EventHandler
& eventHandler
);
34 void HandleNode(EventHandler
& eventHandler
);
36 void HandleSequence(EventHandler
& eventHandler
);
37 void HandleBlockSequence(EventHandler
& eventHandler
);
38 void HandleFlowSequence(EventHandler
& eventHandler
);
40 void HandleMap(EventHandler
& eventHandler
);
41 void HandleBlockMap(EventHandler
& eventHandler
);
42 void HandleFlowMap(EventHandler
& eventHandler
);
43 void HandleCompactMap(EventHandler
& eventHandler
);
44 void HandleCompactMapWithNoKey(EventHandler
& eventHandler
);
46 void ParseProperties(std::string
& tag
, anchor_t
& anchor
);
47 void ParseTag(std::string
& tag
);
48 void ParseAnchor(anchor_t
& anchor
);
50 anchor_t
RegisterAnchor(const std::string
& name
);
51 anchor_t
LookupAnchor(const Mark
& mark
, const std::string
& name
) const;
55 const Directives
& m_directives
;
56 std::auto_ptr
<CollectionStack
> m_pCollectionStack
;
58 typedef std::map
<std::string
, anchor_t
> Anchors
;
65 #endif // SINGLEDOCPARSER_H_62B23520_7C8E_11DE_8A39_0800200C9A66