12 #ifndef ZYPP_PARSER_XML_PARSEDEF_H
13 #define ZYPP_PARSER_XML_PARSEDEF_H
28 class ParseDefConsume;
143 ParseDef(
const std::string & name_r,
Mode mode_r,
const shared_ptr<ParseDefConsume> & target_r );
148 const std::string &
name()
const;
170 ParseDef &
addNode(
const std::string & name_r,
Mode mode_r,
const shared_ptr<ParseDefConsume> & target_r )
177 {
return addNode( subnode_r ); }
180 {
return addNode( name_r, mode_r ); }
183 {
return addNode( name_r, mode_r, target_r ); }
192 void setConsumer(
const shared_ptr<ParseDefConsume> & target_r );
224 ParseDef(
const shared_ptr<Impl> & pimpl_r );
245 #endif // ZYPP_PARSER_XML_PARSEDEF_H
RW_pointer< Impl > _pimpl
Pointer to implementation (shared!)
ParseDef(const std::string &name_r, Mode mode_r)
Define a xml node structure to parse.
ParseDef & operator()(ParseDef &subnode_r)
Add subnode definition.
ParseDef & operator()(const std::string &name_r, Mode mode_r)
shared_ptr< ParseDefConsume > getConsumer() const
Get data consumer.
const std::string & name() const
void take(Reader &reader_r)
Parse the node.
ParseDef & operator()(const std::string &name_r, Mode mode_r, const shared_ptr< ParseDefConsume > &target_r)
Base class for ParseDef consumer.
ParseDef & addNode(const std::string &name_r, Mode mode_r)
ParseDef & addNode(ParseDef &subnode_r)
Add subnode definition.
std::ostream & operator<<(std::ostream &str, const ReadState &obj)
void cancelConsumer()
Unset data consumer.
friend std::ostream & operator<<(std::ostream &str, const ParseDef &obj)
Wrapper for const correct access via Smart pointer types.
ParseDef operator[](const std::string &name_r)
Get subnode by name.
void setConsumer(const shared_ptr< ParseDefConsume > &target_r)
Set data consumer.
ParseDef & addNode(const std::string &name_r, Mode mode_r, const shared_ptr< ParseDefConsume > &target_r)
xmlTextReader based interface to iterate xml streams.