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

Helper class to build a Consumer. More...

#include <parser/xml/ParseDefConsume.h>

Public Member Functions

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

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 280 of file ParseDefConsume.h.

Constructor & Destructor Documentation

◆ Builder() [1/3]

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

Contruct Consumer.

Definition at line 283 of file ParseDefConsume.h.

◆ Builder() [2/3]

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

Contruct Consumer.

Definition at line 289 of file ParseDefConsume.h.

◆ Builder() [3/3]

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

Contruct Consumer.

Definition at line 295 of file ParseDefConsume.h.

Member Function Documentation

◆ operator()() [1/2]

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

Extend Consumer.

Definition at line 301 of file ParseDefConsume.h.

◆ operator()() [2/2]

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

Extend Consumer.

Definition at line 306 of file ParseDefConsume.h.

◆ operator<<()

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

Set pre notification callback.

Definition at line 310 of file ParseDefConsume.h.

◆ operator>>()

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

Set post notification callback.

Definition at line 314 of file ParseDefConsume.h.

◆ operator shared_ptr< ParseDefConsume >()

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 318 of file ParseDefConsume.h.

Member Data Documentation

◆ _ptr

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

Definition at line 322 of file ParseDefConsume.h.


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