singledocparser.h
Go to the documentation of this file.
1 #ifndef SINGLEDOCPARSER_H_62B23520_7C8E_11DE_8A39_0800200C9A66_PM
2 #define SINGLEDOCPARSER_H_62B23520_7C8E_11DE_8A39_0800200C9A66_PM
3 
4 #if defined(_MSC_VER) || (defined(__GNUC__) && (__GNUC__ == 3 && __GNUC_MINOR__ >= 4) || (__GNUC__ >= 4)) // GCC supports "pragma once" correctly since 3.4
5 #pragma once
6 #endif
7 
8 
9 #include "yaml-cpp-pm/anchor.h"
11 #include <string>
12 #include <map>
13 #include <memory>
14 
15 namespace YAML_PM
16 {
17  struct Directives;
18  struct Mark;
19  struct Token;
20  class CollectionStack;
21  class EventHandler;
22  class Node;
23  class Scanner;
24 
26  {
27  public:
28  SingleDocParser(Scanner& scanner, const Directives& directives);
30 
31  void HandleDocument(EventHandler& eventHandler);
32 
33  private:
34  void HandleNode(EventHandler& eventHandler);
35 
36  void HandleSequence(EventHandler& eventHandler);
37  void HandleBlockSequence(EventHandler& eventHandler);
38  void HandleFlowSequence(EventHandler& eventHandler);
39 
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);
45 
46  void ParseProperties(std::string& tag, anchor_t& anchor);
47  void ParseTag(std::string& tag);
48  void ParseAnchor(anchor_t& anchor);
49 
51  anchor_t LookupAnchor(const Mark& mark, const std::string& name) const;
52 
53  private:
56  std::auto_ptr<CollectionStack> m_pCollectionStack;
57 
58  typedef std::map<std::string, anchor_t> Anchors;
59  Anchors m_anchors;
60 
62  };
63 }
64 
65 #endif // SINGLEDOCPARSER_H_62B23520_7C8E_11DE_8A39_0800200C9A66_PM
void HandleFlowSequence(EventHandler &eventHandler)
std::map< std::string, anchor_t > Anchors
void ParseTag(std::string &tag)
std::size_t anchor_t
Definition: anchor.h:12
SingleDocParser(Scanner &scanner, const Directives &directives)
std::auto_ptr< CollectionStack > m_pCollectionStack
::std::string string
Definition: gtest.h:1979
void HandleSequence(EventHandler &eventHandler)
void HandleDocument(EventHandler &eventHandler)
void ParseProperties(std::string &tag, anchor_t &anchor)
anchor_t LookupAnchor(const Mark &mark, const std::string &name) const
void HandleBlockMap(EventHandler &eventHandler)
void HandleFlowMap(EventHandler &eventHandler)
void HandleNode(EventHandler &eventHandler)
void ParseAnchor(anchor_t &anchor)
void HandleMap(EventHandler &eventHandler)
const Directives & m_directives
void HandleCompactMap(EventHandler &eventHandler)
void HandleCompactMapWithNoKey(EventHandler &eventHandler)
void HandleBlockSequence(EventHandler &eventHandler)
anchor_t RegisterAnchor(const std::string &name)


libpointmatcher
Author(s):
autogenerated on Sat May 27 2023 02:38:03