openvrml::x3d_vrml_parse_error_handler Struct Reference

A Spirit error handler that emits error and warning messages to a std::ostream. More...

#include <openvrml/x3d_vrml_grammar.h>

Public Member Functions

 x3d_vrml_parse_error_handler (std::ostream &out=std::cerr)
 Construct.
template<typename ScannerT , typename ErrorT >
boost::spirit::classic::error_status operator() (const ScannerT &scan, const ErrorT &err) const
 Handle a parser error.

Detailed Description

A Spirit error handler that emits error and warning messages to a std::ostream.

The following openvrml::vrml_parse_errors are treated as warnings:

  • rotation_axis_not_normalized
  • eventin_deprecated
  • eventout_deprecated
  • exposedfield_deprecated
  • field_deprecated

All other vrml_parse_errors are treated as errors.

Constructor & Destructor Documentation

openvrml::x3d_vrml_parse_error_handler::x3d_vrml_parse_error_handler ( std::ostream &  out = std::cerr)
inlineexplicit

Construct.

Parameters
[in]outoutput stream.

Member Function Documentation

template<typename ScannerT , typename ErrorT >
boost::spirit::error_status<> openvrml::x3d_vrml_parse_error_handler::operator() ( const ScannerT &  scan,
const ErrorT &  err 
) const
inline

Handle a parser error.

Parameters
[in]scanthe scanner.
[in]erra boost::spirit::parser_error.