libzypp
17.14.0
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
XmlEscape.h
Go to the documentation of this file.
1
/*---------------------------------------------------------------------\
2
| ____ _ __ __ ___ |
3
| |__ / \ / / . \ . \ |
4
| / / \ V /| _/ _/ |
5
| / /__ | | | | | | |
6
| /_____||_| |_| |_| |
7
| |
8
\---------------------------------------------------------------------*/
12
#ifndef ZYPP_PARSER_XML_XMLESCAPE_H
13
#define ZYPP_PARSER_XML_XMLESCAPE_H
14
15
#include <sstream>
16
#include <string>
17
#include "
zypp/APIConfig.h
"
18
20
namespace
zypp
21
{
23
namespace
xml
24
{
26
namespace
detail
27
{
28
struct
EscapedString
29
{
30
EscapedString
(
const
std::string & in_r ) :
_in
( in_r ) {}
31
std::ostream &
dumpOn
( std::ostream & str )
const
;
32
std::string
asString
()
const
33
{ std::ostringstream str;
dumpOn
( str );
return
str.str(); }
34
operator
std::string()
const
35
{
return
asString
(); }
36
private
:
37
const
std::string &
_in
;
38
};
39
41
inline
std::ostream &
operator<<
( std::ostream & str,
const
EscapedString
& obj )
42
{
return
obj.
dumpOn
( str ); }
43
44
}
// detail
46
51
inline
detail::EscapedString
escape
(
const
std::string & in_r )
52
{
return
detail::EscapedString
( in_r ); }
53
55
ZYPP_API
std::string
unescape
(
const
std::string & in_r );
56
57
}
// namespace xml
59
}
// namespace zypp
61
#endif // ZYPP_PARSER_XML_XMLESCAPE_H
zypp
parser
xml
XmlEscape.h
Generated by
1.8.2