Public Member Functions | Public Attributes | List of all members
gap Struct Reference

Public Member Functions

 gap ()
 
void push (char_t *&s, size_t count)
 
char_t * flush (char_t *s)
 

Public Attributes

char_t * end
 
size_t size
 

Detailed Description

Definition at line 1716 of file pugixml.cpp.

Constructor & Destructor Documentation

◆ gap()

gap::gap ( )
inline

Definition at line 1721 of file pugixml.cpp.

1721 : end(0), size(0)
1722 {
1723 }
char_t * end
Definition pugixml.cpp:1718
size_t size
Definition pugixml.cpp:1719

Member Function Documentation

◆ flush()

char_t * gap::flush ( char_t *  s)
inline

Definition at line 1744 of file pugixml.cpp.

1745 {
1746 if (end)
1747 {
1748 // Move [old_gap_end, current_pos) to [old_gap_start, ...)
1749 assert(s >= end);
1750 memmove(end - size, end, reinterpret_cast<char*>(s) - reinterpret_cast<char*>(end));
1751
1752 return s - size;
1753 }
1754 else return s;
1755 }

References end, and size.

Referenced by strconv_pcdata_impl< opt_trim, opt_eol, opt_escape >::parse(), strconv_attribute_impl< opt_escape >::parse_eol(), strconv_attribute_impl< opt_escape >::parse_simple(), strconv_attribute_impl< opt_escape >::parse_wconv(), strconv_attribute_impl< opt_escape >::parse_wnorm(), strconv_cdata(), and strconv_comment().

◆ push()

void gap::push ( char_t *&  s,
size_t  count 
)
inline

Definition at line 1727 of file pugixml.cpp.

1728 {
1729 if (end) // there was a gap already; collapse it
1730 {
1731 // Move [old_gap_end, new_gap_start) to [old_gap_start, ...)
1732 assert(s >= end);
1733 memmove(end - size, end, reinterpret_cast<char*>(s) - reinterpret_cast<char*>(end));
1734 }
1735
1736 s += count; // end of current gap
1737
1738 // "merge" two gaps
1739 end = s;
1740 size += count;
1741 }

References end, and size.

Referenced by strconv_pcdata_impl< opt_trim, opt_eol, opt_escape >::parse(), strconv_attribute_impl< opt_escape >::parse_eol(), strconv_attribute_impl< opt_escape >::parse_wconv(), strconv_attribute_impl< opt_escape >::parse_wnorm(), strconv_cdata(), strconv_comment(), and strconv_escape().

Member Data Documentation

◆ end

char_t* gap::end

Definition at line 1718 of file pugixml.cpp.

Referenced by flush(), and push().

◆ size

size_t gap::size

Definition at line 1719 of file pugixml.cpp.

Referenced by flush(), and push().


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

Generated on Thu May 22 2025 08:23:50 for QuickFIX by doxygen 1.9.8 written by Dimitri van Heesch, © 1997-2001