Warning, file /include/yaml-cpp/parser.h was not indexed
or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).
0001 #ifndef PARSER_H_62B23520_7C8E_11DE_8A39_0800200C9A66
0002 #define PARSER_H_62B23520_7C8E_11DE_8A39_0800200C9A66
0003
0004 #if defined(_MSC_VER) || \
0005 (defined(__GNUC__) && (__GNUC__ == 3 && __GNUC_MINOR__ >= 4) || \
0006 (__GNUC__ >= 4))
0007 #pragma once
0008 #endif
0009
0010 #include <ios>
0011 #include <memory>
0012
0013 #include "yaml-cpp/dll.h"
0014
0015 namespace YAML {
0016 class EventHandler;
0017 class Node;
0018 class Scanner;
0019 struct Directives;
0020 struct Token;
0021
0022
0023
0024
0025
0026 class YAML_CPP_API Parser {
0027 public:
0028
0029 Parser();
0030
0031 Parser(const Parser&) = delete;
0032 Parser(Parser&&) = delete;
0033 Parser& operator=(const Parser&) = delete;
0034 Parser& operator=(Parser&&) = delete;
0035
0036
0037
0038
0039
0040 explicit Parser(std::istream& in);
0041
0042 ~Parser();
0043
0044
0045 explicit operator bool() const;
0046
0047
0048
0049
0050
0051 void Load(std::istream& in);
0052
0053
0054
0055
0056
0057
0058
0059 bool HandleNextDocument(EventHandler& eventHandler);
0060
0061 void PrintTokens(std::ostream& out);
0062
0063 private:
0064
0065
0066
0067
0068 void ParseDirectives();
0069
0070 void HandleDirective(const Token& token);
0071
0072
0073
0074
0075
0076 void HandleYamlDirective(const Token& token);
0077
0078
0079
0080
0081
0082 void HandleTagDirective(const Token& token);
0083
0084 private:
0085 std::unique_ptr<Scanner> m_pScanner;
0086 std::unique_ptr<Directives> m_pDirectives;
0087 };
0088 }
0089
0090 #endif