1 #ifndef BOOST_ARCHIVE_ITERATORS_XML_ESCAPE_HPP
2 #define BOOST_ARCHIVE_ITERATORS_XML_ESCAPE_HPP
4 // MS compatible compilers support #pragma once
9 /////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8
12 // (C) Copyright 2002 Robert Ramey - http://www.rrsd.com .
13 // Use, modification and distribution is subject to the Boost Software
14 // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
15 // http://www.boost.org/LICENSE_1_0.txt)
17 // See http://www.boost.org for updates, documentation, and revision history.
19 #include <boost/assert.hpp>
20 #include <boost/archive/iterators/escape.hpp>
26 /////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8
27 // insert escapes into xml text
31 : public escape<xml_escape<Base>, Base>
33 friend class boost::iterator_core_access;
35 typedef escape<xml_escape<Base>, Base> super_t;
38 char fill(const char * & bstart, const char * & bend);
39 wchar_t fill(const wchar_t * & bstart, const wchar_t * & bend);
43 super_t(Base(static_cast< T >(start)))
45 // intel 7.1 doesn't like default copy constructor
46 xml_escape(const xml_escape & rhs) :
47 super_t(rhs.base_reference())
52 char xml_escape<Base>::fill(
53 const char * & bstart,
56 char current_value = * this->base_reference();
57 switch(current_value){
85 wchar_t xml_escape<Base>::fill(
86 const wchar_t * & bstart,
87 const wchar_t * & bend
89 wchar_t current_value = * this->base_reference();
90 switch(current_value){
112 return current_value;
117 } // namespace iterators
118 } // namespace archive
121 #endif // BOOST_ARCHIVE_ITERATORS_XML_ESCAPE_HPP