HoverRace  2.0
Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes | List of all members
HoverRace::Util::yaml::Parser Class Reference

Wrapper for the LibYAML parser. More...

#include <Parser.h>

Public Member Functions

 Parser (FILE *file)
 Create a new parser for a file handle. More...
 
 Parser (std::istream &is)
 Create a new parser for an input stream. More...
 
virtual ~Parser ()
 Destructor. More...
 
NodeGetRootNode () const
 

Protected Member Functions

void InitParser ()
 Initialize the LibYAML parser. More...
 
void InitStream ()
 

Private Member Functions

 Parser ()=delete
 
void Cleanup ()
 

Private Attributes

yaml_document_t * doc
 
yaml_parser_t parser
 
Noderoot
 

Detailed Description

Wrapper for the LibYAML parser.

Constructor & Destructor Documentation

HoverRace::Util::yaml::Parser::Parser ( )
privatedelete
HoverRace::Util::yaml::Parser::Parser ( FILE *  file)

Create a new parser for a file handle.

Parameters
fileAn open file for reading (may not be null). It is the caller's job to close the file when the emitter is destroyed.
HoverRace::Util::yaml::Parser::Parser ( std::istream &  is)

Create a new parser for an input stream.

Parameters
isThe input stream.
HoverRace::Util::yaml::Parser::~Parser ( )
virtual

Destructor.

Member Function Documentation

void HoverRace::Util::yaml::Parser::Cleanup ( )
private
Node* HoverRace::Util::yaml::Parser::GetRootNode ( ) const
inline
void HoverRace::Util::yaml::Parser::InitParser ( )
protected

Initialize the LibYAML parser.

void HoverRace::Util::yaml::Parser::InitStream ( )
protected

Member Data Documentation

yaml_document_t* HoverRace::Util::yaml::Parser::doc
private
yaml_parser_t HoverRace::Util::yaml::Parser::parser
private
Node* HoverRace::Util::yaml::Parser::root
private

The documentation for this class was generated from the following files: