libzypp 17.31.23
ParseDefConsume.cc
Go to the documentation of this file.
1/*---------------------------------------------------------------------\
2| ____ _ __ __ ___ |
3| |__ / \ / / . \ . \ |
4| / / \ V /| _/ _/ |
5| / /__ | | | | | | |
6| /_____||_| |_| |_| |
7| |
8\---------------------------------------------------------------------*/
13
15namespace zypp
16{
18 namespace xml
19 {
20
22 //
23 // CLASS NAME : ParseDefConsume
24 //
26
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
55 {}
56
57 ParseDefConsumeRedirect::ParseDefConsumeRedirect( const shared_ptr<ParseDefConsume> & target_r )
58 : _target( target_r )
59 {}
60
62 : _target( allocatedTarget_r )
63 {}
64
66 : _target( &target_r, NullDeleter() )
67 {}
68
70 {}
71
72 void ParseDefConsumeRedirect::setRedirect( const shared_ptr<ParseDefConsume> & target_r )
73 { _target = target_r; }
74
76 { _target.reset( allocatedTarget_r ); }
77
79 { _target.reset( &target_r, NullDeleter() ); }
80
82 { _target.reset(); }
83
84 shared_ptr<ParseDefConsume> ParseDefConsumeRedirect::getRedirect() const
85 { return _target; }
86
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
100 {
101 if ( _target )
102 _target->cdata( _node );
103 }
104
106 {
107 if ( _target )
108 _target->done( _node );
109 }
110
112 {
113 if ( _target )
114 _target->startSubnode( _node );
115 }
116
118 {
119 if ( _target )
120 _target->doneSubnode( _node );
121 }
122
124 //
125 // CLASS NAME : ParseDefConsumeCallback
126 //
128
130 {}
131
133 {}
134
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
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
160 {
161 if ( _startSubnode )
162 _startSubnode( node_r );
163 }
164
166 {
167 if ( _doneSubnode )
168 _doneSubnode( node_r );
169 }
170
172 } // namespace xml
175} // namespace zypp
xmlTextReader based interface to Reader's current node.
Definition: Node.h:36
virtual void done(const Node &node_r)
virtual void text(const Node &node_r)
virtual void start(const Node &node_r)
virtual void cdata(const Node &node_r)
virtual void startSubnode(const Node &node_r)
virtual void doneSubnode(const Node &node_r)
virtual void start(const Node &_node)
virtual void startSubnode(const Node &_node)
virtual void doneSubnode(const Node &_node)
virtual void done(const Node &_node)
shared_ptr< ParseDefConsume > getRedirect() const
virtual void text(const Node &_node)
shared_ptr< ParseDefConsume > _target
void setRedirect(const shared_ptr< ParseDefConsume > &target_r)
virtual void cdata(const Node &_node)
Easy-to use interface to the ZYPP dependency resolver.
Definition: CodePitfalls.doc:2
shared_ptr custom deleter doing nothing.
Definition: PtrTypes.h:83
Base class for ParseDef consumer.
virtual void start(const Node &_node)
virtual void text(const Node &_node)
virtual void cdata(const Node &_node)
virtual void doneSubnode(const Node &_node)
virtual void done(const Node &_node)
virtual void startSubnode(const Node &_node)