mirror of
https://github.com/RPCS3/yaml-cpp.git
synced 2026-01-31 01:25:20 +01:00
It seems that it's not necessary to export those members (as long as you can't access them), and most of them are STL instances, which apparently cause lots of problems for DLLs. (For example, you simply can't export instances of std::map; see http://support.microsoft.com/kb/168958.)
51 lines
1.1 KiB
C++
51 lines
1.1 KiB
C++
#ifndef PARSER_H_62B23520_7C8E_11DE_8A39_0800200C9A66
|
|
#define PARSER_H_62B23520_7C8E_11DE_8A39_0800200C9A66
|
|
|
|
#if !defined(__GNUC__) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4) || (__GNUC__ >= 4) // GCC supports "pragma once" correctly since 3.4
|
|
#pragma once
|
|
#endif
|
|
|
|
|
|
#include "yaml-cpp/dll.h"
|
|
#include "yaml-cpp/noncopyable.h"
|
|
#include <ios>
|
|
#include <memory>
|
|
|
|
namespace YAML
|
|
{
|
|
struct Directives;
|
|
struct Mark;
|
|
struct Token;
|
|
class EventHandler;
|
|
class Node;
|
|
class Scanner;
|
|
|
|
class YAML_CPP_API Parser: private noncopyable
|
|
{
|
|
public:
|
|
Parser();
|
|
Parser(std::istream& in);
|
|
~Parser();
|
|
|
|
operator bool() const;
|
|
|
|
void Load(std::istream& in);
|
|
bool HandleNextDocument(EventHandler& eventHandler);
|
|
|
|
bool GetNextDocument(Node& document);
|
|
void PrintTokens(std::ostream& out);
|
|
|
|
private:
|
|
void ParseDirectives();
|
|
void HandleDirective(const Token& token);
|
|
void HandleYamlDirective(const Token& token);
|
|
void HandleTagDirective(const Token& token);
|
|
|
|
private:
|
|
std::auto_ptr<Scanner> m_pScanner;
|
|
std::auto_ptr<Directives> m_pDirectives;
|
|
};
|
|
}
|
|
|
|
#endif // PARSER_H_62B23520_7C8E_11DE_8A39_0800200C9A66
|