Public Member Functions | Public Attributes
gap Struct Reference

List of all members.

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 ( ) [inline]

Definition at line 1721 of file pugixml.cpp.

                     : end(0), size(0)
                {
                }

Member Function Documentation

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

Definition at line 1744 of file pugixml.cpp.

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().

                {
                        if (end)
                        {
                                // Move [old_gap_end, current_pos) to [old_gap_start, ...)
                                assert(s >= end);
                                memmove(end - size, end, reinterpret_cast<char*>(s) - reinterpret_cast<char*>(end));

                                return s - size;
                        }
                        else return s;
                }
void gap::push ( char_t *&  s,
size_t  count 
) [inline]

Definition at line 1727 of file pugixml.cpp.

References end.

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().

                {
                        if (end) // there was a gap already; collapse it
                        {
                                // Move [old_gap_end, new_gap_start) to [old_gap_start, ...)
                                assert(s >= end);
                                memmove(end - size, end, reinterpret_cast<char*>(s) - reinterpret_cast<char*>(end));
                        }
                                
                        s += count; // end of current gap
                                
                        // "merge" two gaps
                        end = s;
                        size += count;
                }

Member Data Documentation

char_t* gap::end

Definition at line 1718 of file pugixml.cpp.

Referenced by flush(), and push().

size_t gap::size

Definition at line 1719 of file pugixml.cpp.

Referenced by flush().


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

Generated on Mon Sep 15 2014 01:23:55 for QuickFIX by doxygen 1.7.6.1 written by Dimitri van Heesch, © 1997-2001