libzypp: zypp/parser/xml/Parse.h Source File

libzypp 17.38.15

Parse.h
Go to the documentation of this file.
1/*---------------------------------------------------------------------\
2| ____ _ __ __ ___ |
3| |__ / \ / / . \ . \ |
4| / / \ V /| _/ _/ |
5| / /__ | | | | | | |
6| /_____||_| |_| |_| |
7| |
8\---------------------------------------------------------------------*/
12#ifndef ZYPP_PARSER_XML_PARSE_H
13#define ZYPP_PARSER_XML_PARSE_H
14
15#include <iosfwd>
16
17#include <zypp/parser/xml/Reader.h>
18#include <zypp/parser/xml/ParseDef.h>
19#include <zypp/parser/xml/ParseDefConsume.h>
20
22namespace zypp
23{
25 namespace xml
26 {
27
96 template<class TData>
97 inline void rnParse( const InputStream & input_r, TData & data_r )
98 {
99 typedef typename TData::RootNode RootNode;
100 TData pdata;
101
102 xml::Reader reader( input_r );
103 RootNode rootNode( pdata );
104 rootNode.take( reader );
105
106 data_r = pdata;
107 }
108
110 } // namespace xml
113} // namespace zypp
115#endif // ZYPP_PARSER_XML_PARSEDEF_H
ParseDefConsume.h
ParseDef.h
Reader.h
zypp::InputStream
Helper to create and pass std::istream.
Definition inputstream.h:57
zypp::xml::Reader
xmlTextReader based interface to iterate xml streams.
Definition Reader.h:96
zypp::xml
Definition libxmlfwd.cc:22
zypp::xml::rnParse
void rnParse(const InputStream &input_r, TData &data_r)
Parse xml input_r and store data in data_r.
Definition Parse.h:97
zypp
Easy-to use interface to the ZYPP dependency resolver.
Definition CodePitfalls.doc:2