rapidyaml  0.7.2
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 212 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 234 of file parse_engine.hpp.

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

Referenced by sample::sample_location_tracking().

◆ locations() [2/2]

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

query source location tracking status

Definition at line 243 of file parse_engine.hpp.

243 { 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 253 of file parse_engine.hpp.

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

◆ scalar_filtering() [2/2]

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

query scalar filtering status

Definition at line 262 of file parse_engine.hpp.

262 { return (flags & SCALAR_FILTERING); }

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