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 
50  anchor_t RegisterAnchor(const std::string& name);
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;
60 
62  };
63 }
64 
65 #endif // SINGLEDOCPARSER_H_62B23520_7C8E_11DE_8A39_0800200C9A66_PM
YAML_PM::SingleDocParser::SingleDocParser
SingleDocParser(Scanner &scanner, const Directives &directives)
Definition: singledocparser.cpp:15
YAML_PM::SingleDocParser::HandleCompactMapWithNoKey
void HandleCompactMapWithNoKey(EventHandler &eventHandler)
Definition: singledocparser.cpp:311
YAML_PM::SingleDocParser::ParseAnchor
void ParseAnchor(anchor_t &anchor)
Definition: singledocparser.cpp:355
YAML_PM::SingleDocParser::~SingleDocParser
~SingleDocParser()
Definition: singledocparser.cpp:19
YAML_PM
Definition: aliasmanager.h:11
YAML_PM::SingleDocParser::HandleBlockMap
void HandleBlockMap(EventHandler &eventHandler)
Definition: singledocparser.cpp:206
YAML_PM::Directives
Definition: directives.h:19
YAML_PM::EventHandler
Definition: eventhandler.h:15
YAML_PM::SingleDocParser::HandleMap
void HandleMap(EventHandler &eventHandler)
Definition: singledocparser.cpp:194
YAML_PM::SingleDocParser::m_curAnchor
anchor_t m_curAnchor
Definition: singledocparser.h:61
YAML_PM::SingleDocParser::ParseProperties
void ParseProperties(std::string &tag, anchor_t &anchor)
Definition: singledocparser.cpp:327
YAML_PM::SingleDocParser::ParseTag
void ParseTag(std::string &tag)
Definition: singledocparser.cpp:344
anchor.h
YAML_PM::SingleDocParser::LookupAnchor
anchor_t LookupAnchor(const Mark &mark, const std::string &name) const
Definition: singledocparser.cpp:373
testing::internal::string
::std::string string
Definition: gtest.h:1979
YAML_PM::SingleDocParser::HandleSequence
void HandleSequence(EventHandler &eventHandler)
Definition: singledocparser.cpp:121
YAML_PM::SingleDocParser::m_anchors
Anchors m_anchors
Definition: singledocparser.h:59
YAML_PM::SingleDocParser::HandleBlockSequence
void HandleBlockSequence(EventHandler &eventHandler)
Definition: singledocparser.cpp:131
YAML_PM::SingleDocParser::HandleFlowMap
void HandleFlowMap(EventHandler &eventHandler)
Definition: singledocparser.cpp:245
YAML_PM::SingleDocParser::HandleDocument
void HandleDocument(EventHandler &eventHandler)
Definition: singledocparser.cpp:26
YAML_PM::SingleDocParser::HandleFlowSequence
void HandleFlowSequence(EventHandler &eventHandler)
Definition: singledocparser.cpp:164
YAML_PM::SingleDocParser::m_scanner
Scanner & m_scanner
Definition: singledocparser.h:54
YAML_PM::SingleDocParser::HandleCompactMap
void HandleCompactMap(EventHandler &eventHandler)
Definition: singledocparser.cpp:290
YAML_PM::SingleDocParser::m_directives
const Directives & m_directives
Definition: singledocparser.h:55
noncopyable.h
YAML_PM::Mark
Definition: mark.h:13
YAML_PM::SingleDocParser::Anchors
std::map< std::string, anchor_t > Anchors
Definition: singledocparser.h:58
YAML_PM::SingleDocParser
Definition: singledocparser.h:25
YAML_PM::SingleDocParser::m_pCollectionStack
std::auto_ptr< CollectionStack > m_pCollectionStack
Definition: singledocparser.h:56
YAML_PM::SingleDocParser::RegisterAnchor
anchor_t RegisterAnchor(const std::string &name)
Definition: singledocparser.cpp:365
YAML_PM::anchor_t
std::size_t anchor_t
Definition: anchor.h:12
YAML_PM::Scanner
Definition: scanner.h:24
YAML_PM::SingleDocParser::HandleNode
void HandleNode(EventHandler &eventHandler)
Definition: singledocparser.cpp:47
YAML_PM::noncopyable
Definition: noncopyable.h:13


mp2p_icp
Author(s):
autogenerated on Fri Dec 20 2024 03:46:00