DocWire SDK
DocWire SDK: Award-winning modern data processing in C++20. SourceForge Community Choice & Microsoft support. AI-driven processing. Supports nearly 100 data formats, including email boxes and OCR. Boost efficiency in text extraction, web data extraction, data mining, document analysis. Offline processing possible for security and confidentiality
docwire::xml::iterator_state< safety_level > Struct Template Reference

Shared state for XML iterators to coordinate traversal. More...

#include <xml_iterator_state.h>

Public Member Functions

 iterator_state (reader< safety_level > &reader)
 Constructs the state with a reference to the XML reader.
 

Public Attributes

reader< safety_level > & xml_reader
 Reference to the underlying XML reader.
 
bool m_node_ahead_flag = false
 A shared flag indicating that the reader has been advanced one step ahead. More...
 

Detailed Description

template<safety_policy safety_level>
struct docwire::xml::iterator_state< safety_level >

Shared state for XML iterators to coordinate traversal.

Template Parameters
safety_levelThe safety policy.

Definition at line 25 of file xml_iterator_state.h.

Member Data Documentation

◆ m_node_ahead_flag

template<safety_policy safety_level>
bool docwire::xml::iterator_state< safety_level >::m_node_ahead_flag = false

A shared flag indicating that the reader has been advanced one step ahead.

This is a crucial part of the shared state for coordinating multiple iterators operating on the single underlying xml::reader cursor. When an iterator (like descendants_view::iterator) needs to "peek ahead" to check a stopping condition, it advances the reader and sets this flag. The next iterator to be incremented must check this flag, consume the current node without advancing the reader again, and then clear the flag. It MUST be part of the shared state.

Definition at line 44 of file xml_iterator_state.h.


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