rapidyaml  0.8.0
parse and emit YAML, and do it fast
c4::yml::ParserOptions Struct Reference

Options to give to the parser to control its behavior. More...

#include <parse_engine.hpp>

Public Member Functions

 ParserOptions ()=default
 
source location tracking
ParserOptionslocations (bool enabled) noexcept
 enable/disable source location tracking More...
 
bool locations () const noexcept
 query source location tracking status More...
 
scalar filtering status (experimental; disable at your discretion)
ParserOptionsscalar_filtering (bool enabled) noexcept
 enable/disable scalar filtering while parsing More...
 
bool scalar_filtering () const noexcept
 query scalar filtering status More...
 

Detailed Description

Options to give to the parser to control its behavior.

Definition at line 213 of file parse_engine.hpp.

Constructor & Destructor Documentation

◆ ParserOptions()

c4::yml::ParserOptions::ParserOptions ( )
default

Member Function Documentation

◆ locations() [1/2]

ParserOptions& c4::yml::ParserOptions::locations ( bool  enabled)
inlinenoexcept

enable/disable source location tracking

Definition at line 235 of file parse_engine.hpp.

236  {
237  if(enabled)
238  flags |= LOCATIONS;
239  else
240  flags &= ~LOCATIONS;
241  return *this;
242  }

Referenced by sample::sample_location_tracking().

◆ locations() [2/2]

bool c4::yml::ParserOptions::locations ( ) const
inlinenoexcept

query source location tracking status

Definition at line 244 of file parse_engine.hpp.

244 { return (flags & LOCATIONS); }

◆ scalar_filtering() [1/2]

ParserOptions& c4::yml::ParserOptions::scalar_filtering ( bool  enabled)
inlinenoexcept

enable/disable scalar filtering while parsing

Definition at line 254 of file parse_engine.hpp.

255  {
256  if(enabled)
257  flags |= SCALAR_FILTERING;
258  else
259  flags &= ~SCALAR_FILTERING;
260  return *this;
261  }

◆ scalar_filtering() [2/2]

bool c4::yml::ParserOptions::scalar_filtering ( ) const
inlinenoexcept

query scalar filtering status

Definition at line 263 of file parse_engine.hpp.

263 { return (flags & SCALAR_FILTERING); }

The documentation for this struct was generated from the following file: