Static Public Member Functions
strconv_attribute_impl< opt_escape > Struct Template Reference

List of all members.

Static Public Member Functions

static char_t * parse_wnorm (char_t *s, char_t end_quote)
static char_t * parse_wconv (char_t *s, char_t end_quote)
static char_t * parse_eol (char_t *s, char_t end_quote)
static char_t * parse_simple (char_t *s, char_t end_quote)

Detailed Description

template<typename opt_escape>
struct strconv_attribute_impl< opt_escape >

Definition at line 2040 of file pugixml.cpp.


Member Function Documentation

template<typename opt_escape >
static char_t* strconv_attribute_impl< opt_escape >::parse_eol ( char_t *  s,
char_t  end_quote 
) [inline, static]

Definition at line 2130 of file pugixml.cpp.

References ct_parse_attr, gap::flush(), PUGI__IS_CHARTYPE, PUGI__SCANWHILE_UNROLL, gap::push(), and strconv_escape().

                {
                        gap g;

                        while (true)
                        {
                                PUGI__SCANWHILE_UNROLL(!PUGI__IS_CHARTYPE(*s, ct_parse_attr));
                                
                                if (*s == end_quote)
                                {
                                        *g.flush(s) = 0;
                                
                                        return s + 1;
                                }
                                else if (*s == '\r')
                                {
                                        *s++ = '\n';
                                        
                                        if (*s == '\n') g.push(s, 1);
                                }
                                else if (opt_escape::value && *s == '&')
                                {
                                        s = strconv_escape(s, g);
                                }
                                else if (!*s)
                                {
                                        return 0;
                                }
                                else ++s;
                        }
                }
template<typename opt_escape >
static char_t* strconv_attribute_impl< opt_escape >::parse_simple ( char_t *  s,
char_t  end_quote 
) [inline, static]

Definition at line 2162 of file pugixml.cpp.

References ct_parse_attr, gap::flush(), PUGI__IS_CHARTYPE, PUGI__SCANWHILE_UNROLL, and strconv_escape().

                {
                        gap g;

                        while (true)
                        {
                                PUGI__SCANWHILE_UNROLL(!PUGI__IS_CHARTYPE(*s, ct_parse_attr));
                                
                                if (*s == end_quote)
                                {
                                        *g.flush(s) = 0;
                                
                                        return s + 1;
                                }
                                else if (opt_escape::value && *s == '&')
                                {
                                        s = strconv_escape(s, g);
                                }
                                else if (!*s)
                                {
                                        return 0;
                                }
                                else ++s;
                        }
                }
template<typename opt_escape >
static char_t* strconv_attribute_impl< opt_escape >::parse_wconv ( char_t *  s,
char_t  end_quote 
) [inline, static]

Definition at line 2094 of file pugixml.cpp.

References ct_parse_attr_ws, ct_space, gap::flush(), PUGI__IS_CHARTYPE, PUGI__SCANWHILE_UNROLL, gap::push(), and strconv_escape().

                {
                        gap g;

                        while (true)
                        {
                                PUGI__SCANWHILE_UNROLL(!PUGI__IS_CHARTYPE(*s, ct_parse_attr_ws));
                                
                                if (*s == end_quote)
                                {
                                        *g.flush(s) = 0;
                                
                                        return s + 1;
                                }
                                else if (PUGI__IS_CHARTYPE(*s, ct_space))
                                {
                                        if (*s == '\r')
                                        {
                                                *s++ = ' ';
                                
                                                if (*s == '\n') g.push(s, 1);
                                        }
                                        else *s++ = ' ';
                                }
                                else if (opt_escape::value && *s == '&')
                                {
                                        s = strconv_escape(s, g);
                                }
                                else if (!*s)
                                {
                                        return 0;
                                }
                                else ++s;
                        }
                }
template<typename opt_escape >
static char_t* strconv_attribute_impl< opt_escape >::parse_wnorm ( char_t *  s,
char_t  end_quote 
) [inline, static]

Definition at line 2042 of file pugixml.cpp.

References ct_parse_attr_ws, ct_space, gap::flush(), PUGI__IS_CHARTYPE, PUGI__SCANWHILE_UNROLL, gap::push(), and strconv_escape().

                {
                        gap g;

                        // trim leading whitespaces
                        if (PUGI__IS_CHARTYPE(*s, ct_space))
                        {
                                char_t* str = s;
                                
                                do ++str;
                                while (PUGI__IS_CHARTYPE(*str, ct_space));
                                
                                g.push(s, str - s);
                        }

                        while (true)
                        {
                                PUGI__SCANWHILE_UNROLL(!PUGI__IS_CHARTYPE(*s, ct_parse_attr_ws | ct_space));
                                
                                if (*s == end_quote)
                                {
                                        char_t* str = g.flush(s);
                                        
                                        do *str-- = 0;
                                        while (PUGI__IS_CHARTYPE(*str, ct_space));
                                
                                        return s + 1;
                                }
                                else if (PUGI__IS_CHARTYPE(*s, ct_space))
                                {
                                        *s++ = ' ';
                
                                        if (PUGI__IS_CHARTYPE(*s, ct_space))
                                        {
                                                char_t* str = s + 1;
                                                while (PUGI__IS_CHARTYPE(*str, ct_space)) ++str;
                                                
                                                g.push(s, str - s);
                                        }
                                }
                                else if (opt_escape::value && *s == '&')
                                {
                                        s = strconv_escape(s, g);
                                }
                                else if (!*s)
                                {
                                        return 0;
                                }
                                else ++s;
                        }
                }

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