libzypp 17.37.17
ztui::Out::XmlNode Class Reference

XML only: RAII writing a XML nodes start/end tag. More...

#include <zypp-tui/output/Out.h>

Inheritance diagram for ztui::Out::XmlNode:

Public Types

using Attr = zypp::xmlout::Node::Attr

Public Member Functions

 XmlNode (Out &out_r, const std::string &name_r, const std::initializer_list< Attr > &attrs_r={})
 Ctor taking nodename and attribute list.
 XmlNode (Out &out_r, const std::string &name_r, Attr attr_r)
 Convenience ctor for one attribute pair.
 XmlNode (XmlNode &&rhs) noexcept
 Move ctor.

Private Attributes

zypp::scoped_ptr< zypp::xmlout::Node_node

Additional Inherited Members

Protected Member Functions inherited from ztui::Out::ParentOut
 ParentOut (Out &out_r)
Outout ()

Detailed Description

XML only: RAII writing a XML nodes start/end tag.

{
XmlNode( "node", { "attr", "val" } ); // <node attr="val">
...
} // </node>
XmlNode(Out &out_r, const std::string &name_r, const std::initializer_list< Attr > &attrs_r={})
Ctor taking nodename and attribute list.
Definition Out.h:484

Definition at line 479 of file Out.h.

Member Typedef Documentation

◆ Attr

Definition at line 481 of file Out.h.

Constructor & Destructor Documentation

◆ XmlNode() [1/3]

ztui::Out::XmlNode::XmlNode ( Out & out_r,
const std::string & name_r,
const std::initializer_list< Attr > & attrs_r = {} )
inline

Ctor taking nodename and attribute list.

Definition at line 484 of file Out.h.

◆ XmlNode() [2/3]

ztui::Out::XmlNode::XmlNode ( Out & out_r,
const std::string & name_r,
Attr attr_r )
inline

Convenience ctor for one attribute pair.

Definition at line 492 of file Out.h.

◆ XmlNode() [3/3]

ztui::Out::XmlNode::XmlNode ( XmlNode && rhs)
inlinenoexcept

Move ctor.

Definition at line 497 of file Out.h.

Member Data Documentation

◆ _node

zypp::scoped_ptr<zypp::xmlout::Node> ztui::Out::XmlNode::_node
private

Definition at line 500 of file Out.h.


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