libzypp  13.10.6
zypp::xml::parse_def_assign::Builder Struct Reference

Helper class to build a Consumer. More...

#include <ParseDefConsume.h>

Public Member Functions

 Builder ()
 Contruct Consumer. More...
 
template<class _Type >
 Builder (_Type &value_r)
 Contruct Consumer. More...
 
template<class _Type >
 Builder (const std::string &attr_r, _Type &value_r)
 Contruct Consumer. More...
 
template<class _Type >
Builderoperator() (_Type &value_r)
 Extend Consumer. More...
 
template<class _Type >
Builderoperator() (const std::string &attr_r, _Type &value_r)
 Extend Consumer. More...
 
Builderoperator<< (function< void(const Node &)> done_r)
 Set pre notification callback. More...
 
Builderoperator>> (function< void(const Node &)> done_r)
 Set post notification callback. More...
 
 operator shared_ptr< ParseDefConsume > () const
 Type conversion so this can be passed as node consumer to ParseDef. More...
 

Private Attributes

shared_ptr< Consumer_ptr
 

Detailed Description

Helper class to build a Consumer.

The class constructs the consumer, allows to extend it via operator(), and provides a conversion to shared_ptr<ParseDefConsume>, so it can be passed as a node consumer to ParseDef.

You may also set a void( const Node & ) notification callback which is invoked before/after the node was processed.

Note
Use and see xml::parseDefAssign convenience constructor.

Definition at line 281 of file ParseDefConsume.h.

Constructor & Destructor Documentation

zypp::xml::parse_def_assign::Builder::Builder ( )
inline

Contruct Consumer.

Definition at line 284 of file ParseDefConsume.h.

template<class _Type >
zypp::xml::parse_def_assign::Builder::Builder ( _Type &  value_r)
inline

Contruct Consumer.

Definition at line 290 of file ParseDefConsume.h.

template<class _Type >
zypp::xml::parse_def_assign::Builder::Builder ( const std::string &  attr_r,
_Type &  value_r 
)
inline

Contruct Consumer.

Definition at line 296 of file ParseDefConsume.h.

Member Function Documentation

template<class _Type >
Builder& zypp::xml::parse_def_assign::Builder::operator() ( _Type &  value_r)
inline

Extend Consumer.

Definition at line 302 of file ParseDefConsume.h.

template<class _Type >
Builder& zypp::xml::parse_def_assign::Builder::operator() ( const std::string &  attr_r,
_Type &  value_r 
)
inline

Extend Consumer.

Definition at line 307 of file ParseDefConsume.h.

Builder& zypp::xml::parse_def_assign::Builder::operator<< ( function< void(const Node &)>  done_r)
inline

Set pre notification callback.

Definition at line 311 of file ParseDefConsume.h.

Builder& zypp::xml::parse_def_assign::Builder::operator>> ( function< void(const Node &)>  done_r)
inline

Set post notification callback.

Definition at line 315 of file ParseDefConsume.h.

zypp::xml::parse_def_assign::Builder::operator shared_ptr< ParseDefConsume > ( ) const
inline

Type conversion so this can be passed as node consumer to ParseDef.

Definition at line 319 of file ParseDefConsume.h.

Member Data Documentation

shared_ptr<Consumer> zypp::xml::parse_def_assign::Builder::_ptr
private

Definition at line 323 of file ParseDefConsume.h.


The documentation for this struct was generated from the following file: