libzypp: zypp/parser/xml/ParseDefConsume.cc Source File

libzypp 17.36.6

ParseDefConsume.cc
Go to the documentation of this file.
1/*---------------------------------------------------------------------\
2| ____ _ __ __ ___ |
3| |__ / \ / / . \ . \ |
4| / / \ V /| _/ _/ |
5| / /__ | | | | | | |
6| /_____||_| |_| |_| |
7| |
8\---------------------------------------------------------------------*/
12#include <zypp/parser/xml/ParseDefConsume.h>
13
15namespace zypp
16{
18 namespace xml
19 {
20
22 //
23 // CLASS NAME : ParseDefConsume
24 //
26
27 ParseDefConsume::~ParseDefConsume()
28 {}
29
30 void ParseDefConsume::start( const Node & _node )
31 {}
32
33 void ParseDefConsume::text( const Node & _node )
34 {}
35
36 void ParseDefConsume::cdata( const Node & _node )
37 {}
38
39 void ParseDefConsume::done( const Node & _node )
40 {}
41
42 void ParseDefConsume::startSubnode( const Node & _node )
43 {}
44
45 void ParseDefConsume::doneSubnode( const Node & _node )
46 {}
47
49 //
50 // CLASS NAME : ParseDefConsumeRedirect
51 //
53
54 ParseDefConsumeRedirect::ParseDefConsumeRedirect()
55 {}
56
57 ParseDefConsumeRedirect::ParseDefConsumeRedirect( shared_ptr<ParseDefConsume> target_r )
58 : _target( std::move(target_r) )
59 {}
60
61 ParseDefConsumeRedirect::ParseDefConsumeRedirect( ParseDefConsume * allocatedTarget_r )
62 : _target( allocatedTarget_r )
63 {}
64
65 ParseDefConsumeRedirect::ParseDefConsumeRedirect( ParseDefConsume & target_r )
66 : _target( &target_r, NullDeleter() )
67 {}
68
69 ParseDefConsumeRedirect::~ParseDefConsumeRedirect()
70 {}
71
72 void ParseDefConsumeRedirect::setRedirect( shared_ptr<ParseDefConsume> target_r )
73 { _target = std::move(target_r); }
74
75 void ParseDefConsumeRedirect::setRedirect( ParseDefConsume * allocatedTarget_r )
76 { _target.reset( allocatedTarget_r ); }
77
78 void ParseDefConsumeRedirect::setRedirect( ParseDefConsume & target_r )
79 { _target.reset( &target_r, NullDeleter() ); }
80
81 void ParseDefConsumeRedirect::cancelRedirect()
82 { _target.reset(); }
83
84 shared_ptr<ParseDefConsume> ParseDefConsumeRedirect::getRedirect() const
85 { return _target; }
86
87 void ParseDefConsumeRedirect::start( const Node & _node )
88 {
89 if ( _target )
90 _target->start( _node );
91 }
92
93 void ParseDefConsumeRedirect::text( const Node & _node )
94 {
95 if ( _target )
96 _target->text( _node );
97 }
98
99 void ParseDefConsumeRedirect::cdata( const Node & _node )
100 {
101 if ( _target )
102 _target->cdata( _node );
103 }
104
105 void ParseDefConsumeRedirect::done( const Node & _node )
106 {
107 if ( _target )
108 _target->done( _node );
109 }
110
111 void ParseDefConsumeRedirect::startSubnode( const Node & _node )
112 {
113 if ( _target )
114 _target->startSubnode( _node );
115 }
116
117 void ParseDefConsumeRedirect::doneSubnode ( const Node & _node )
118 {
119 if ( _target )
120 _target->doneSubnode( _node );
121 }
122
124 //
125 // CLASS NAME : ParseDefConsumeCallback
126 //
128
129 ParseDefConsumeCallback::ParseDefConsumeCallback()
130 {}
131
132 ParseDefConsumeCallback::~ParseDefConsumeCallback()
133 {}
134
135 void ParseDefConsumeCallback::start( const Node & node_r )
136 {
137 if ( _start )
138 _start( node_r );
139 }
140
141 void ParseDefConsumeCallback::text( const Node & node_r )
142 {
143 if ( _text )
144 _text( node_r );
145 }
146
147 void ParseDefConsumeCallback::cdata( const Node & node_r )
148 {
149 if ( _cdata )
150 _cdata( node_r );
151 }
152
153 void ParseDefConsumeCallback::done( const Node & node_r )
154 {
155 if ( _done )
156 _done( node_r );
157 }
158
159 void ParseDefConsumeCallback::startSubnode( const Node & node_r )
160 {
161 if ( _startSubnode )
162 _startSubnode( node_r );
163 }
164
165 void ParseDefConsumeCallback::doneSubnode( const Node & node_r )
166 {
167 if ( _doneSubnode )
168 _doneSubnode( node_r );
169 }
170
172 } // namespace xml
175} // namespace zypp
ParseDefConsume.h
shared_ptr
zypp::xml::Node
xmlTextReader based interface to Reader's current node.
Definition Node.h:36
zypp::xml::ParseDefConsumeCallback::_startSubnode
Callback _startSubnode
Definition ParseDefConsume.h:120
zypp::xml::ParseDefConsumeCallback::startSubnode
void startSubnode(const Node &node_r) override
Definition ParseDefConsume.cc:159
zypp::xml::ParseDefConsumeCallback::_cdata
Callback _cdata
Definition ParseDefConsume.h:118
zypp::xml::ParseDefConsumeCallback::_doneSubnode
Callback _doneSubnode
Definition ParseDefConsume.h:121
zypp::xml::ParseDefConsumeCallback::_start
Callback _start
Definition ParseDefConsume.h:116
zypp::xml::ParseDefConsumeCallback::_text
Callback _text
Definition ParseDefConsume.h:117
zypp::xml::ParseDefConsumeCallback::cdata
void cdata(const Node &node_r) override
Definition ParseDefConsume.cc:147
zypp::xml::ParseDefConsumeCallback::start
void start(const Node &node_r) override
Definition ParseDefConsume.cc:135
zypp::xml::ParseDefConsumeCallback::done
void done(const Node &node_r) override
Definition ParseDefConsume.cc:153
zypp::xml::ParseDefConsumeCallback::text
void text(const Node &node_r) override
Definition ParseDefConsume.cc:141
zypp::xml::ParseDefConsumeCallback::ParseDefConsumeCallback
ParseDefConsumeCallback()
Definition ParseDefConsume.cc:129
zypp::xml::ParseDefConsumeCallback::doneSubnode
void doneSubnode(const Node &node_r) override
Definition ParseDefConsume.cc:165
zypp::xml::ParseDefConsumeCallback::~ParseDefConsumeCallback
~ParseDefConsumeCallback() override
Definition ParseDefConsume.cc:132
zypp::xml::ParseDefConsumeCallback::_done
Callback _done
Definition ParseDefConsume.h:119
zypp::xml::ParseDefConsumeRedirect::text
void text(const Node &_node) override
Definition ParseDefConsume.cc:93
zypp::xml::ParseDefConsumeRedirect::cdata
void cdata(const Node &_node) override
Definition ParseDefConsume.cc:99
zypp::xml::ParseDefConsumeRedirect::cancelRedirect
void cancelRedirect()
Definition ParseDefConsume.cc:81
zypp::xml::ParseDefConsumeRedirect::startSubnode
void startSubnode(const Node &_node) override
Definition ParseDefConsume.cc:111
zypp::xml::ParseDefConsumeRedirect::getRedirect
shared_ptr< ParseDefConsume > getRedirect() const
Definition ParseDefConsume.cc:84
zypp::xml::ParseDefConsumeRedirect::ParseDefConsumeRedirect
ParseDefConsumeRedirect()
Definition ParseDefConsume.cc:54
zypp::xml::ParseDefConsumeRedirect::_target
shared_ptr< ParseDefConsume > _target
Definition ParseDefConsume.h:88
zypp::xml::ParseDefConsumeRedirect::doneSubnode
void doneSubnode(const Node &_node) override
Definition ParseDefConsume.cc:117
zypp::xml::ParseDefConsumeRedirect::setRedirect
void setRedirect(shared_ptr< ParseDefConsume > target_r)
Definition ParseDefConsume.cc:72
zypp::xml::ParseDefConsumeRedirect::done
void done(const Node &_node) override
Definition ParseDefConsume.cc:105
zypp::xml::ParseDefConsumeRedirect::~ParseDefConsumeRedirect
~ParseDefConsumeRedirect() override
Definition ParseDefConsume.cc:69
zypp::xml::ParseDefConsumeRedirect::start
void start(const Node &_node) override
Definition ParseDefConsume.cc:87
std
Definition Arch.h:364
zypp::xml
Definition libxmlfwd.cc:22
zypp
Easy-to use interface to the ZYPP dependency resolver.
Definition Application.cc:20
zypp::NullDeleter
shared_ptr custom deleter doing nothing.
Definition PtrTypes.h:84
zypp::xml::ParseDefConsume
Base class for ParseDef consumer.
Definition ParseDefConsume.h:40
zypp::xml::ParseDefConsume::start
virtual void start(const Node &_node)
Definition ParseDefConsume.cc:30
zypp::xml::ParseDefConsume::text
virtual void text(const Node &_node)
Definition ParseDefConsume.cc:33
zypp::xml::ParseDefConsume::cdata
virtual void cdata(const Node &_node)
Definition ParseDefConsume.cc:36
zypp::xml::ParseDefConsume::~ParseDefConsume
virtual ~ParseDefConsume()
Definition ParseDefConsume.cc:27
zypp::xml::ParseDefConsume::doneSubnode
virtual void doneSubnode(const Node &_node)
Definition ParseDefConsume.cc:45
zypp::xml::ParseDefConsume::done
virtual void done(const Node &_node)
Definition ParseDefConsume.cc:39
zypp::xml::ParseDefConsume::startSubnode
virtual void startSubnode(const Node &_node)
Definition ParseDefConsume.cc:42