common: win32utils - compile fix
[supercollider.git] / external_libraries / yaml-cpp-0.2.6 / include / yaml-cpp / parser.h
blob32a2d1668b243a615286b699701be2047c80b029
1 #ifndef PARSER_H_62B23520_7C8E_11DE_8A39_0800200C9A66
2 #define PARSER_H_62B23520_7C8E_11DE_8A39_0800200C9A66
4 #if !defined(__GNUC__) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4) || (__GNUC__ >= 4) // GCC supports "pragma once" correctly since 3.4
5 #pragma once
6 #endif
9 #include "yaml-cpp/dll.h"
10 #include "yaml-cpp/noncopyable.h"
11 #include <ios>
12 #include <memory>
14 namespace YAML
16 struct Directives;
17 struct Mark;
18 struct Token;
19 class EventHandler;
20 class Node;
21 class Scanner;
23 class YAML_CPP_API Parser: private noncopyable
25 public:
26 Parser();
27 Parser(std::istream& in);
28 ~Parser();
30 operator bool() const;
32 void Load(std::istream& in);
33 bool HandleNextDocument(EventHandler& eventHandler);
35 bool GetNextDocument(Node& document);
36 void PrintTokens(std::ostream& out);
38 private:
39 void ParseDirectives();
40 void HandleDirective(const Token& token);
41 void HandleYamlDirective(const Token& token);
42 void HandleTagDirective(const Token& token);
44 private:
45 std::auto_ptr<Scanner> m_pScanner;
46 std::auto_ptr<Directives> m_pDirectives;
50 #endif // PARSER_H_62B23520_7C8E_11DE_8A39_0800200C9A66