My Project
Public Member Functions | List of all members
YAML::Parser Class Reference

A parser turns a stream of bytes into one stream of "events" per YAML document in the input stream. More...

#include <parser.h>

Public Member Functions

 Parser ()
 Constructs an empty parser (with no input. More...
 
 Parser (const Parser &)=delete
 
 Parser (Parser &&)=delete
 
Parseroperator= (const Parser &)=delete
 
Parseroperator= (Parser &&)=delete
 
 Parser (std::istream &in)
 Constructs a parser from the given input stream. More...
 
 operator bool () const
 Evaluates to true if the parser has some valid input to be read. More...
 
void Load (std::istream &in)
 Resets the parser with the given input stream. More...
 
bool HandleNextDocument (EventHandler &eventHandler)
 Handles the next document by calling events on the. More...
 
void PrintTokens (std::ostream &out)
 

Detailed Description

A parser turns a stream of bytes into one stream of "events" per YAML document in the input stream.

Constructor & Destructor Documentation

◆ Parser() [1/2]

YAML::Parser::Parser ( )

Constructs an empty parser (with no input.

◆ Parser() [2/2]

YAML::Parser::Parser ( std::istream &  in)
explicit

Constructs a parser from the given input stream.

The input stream must live as long as the parser.

Member Function Documentation

◆ HandleNextDocument()

bool YAML::Parser::HandleNextDocument ( EventHandler eventHandler)

Handles the next document by calling events on the.

eventHandler

.

Exceptions
aParserException on error.
Returns
false if there are no more documents

◆ Load()

void YAML::Parser::Load ( std::istream &  in)

Resets the parser with the given input stream.

Any existing state is erased.

◆ operator bool()

YAML::Parser::operator bool ( ) const
explicit

Evaluates to true if the parser has some valid input to be read.


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